My Oracle Support Banner

OPSS - Admin Server Startup Fails With javax.crypto.BadPaddingException: Invalid pad value: -31 (Doc ID 2423463.1)

Last updated on JULY 23, 2018

Applies to:

Oracle Platform Security for Java - Version 12.2.1.3.0 to 12.2.1.3.0 [Release 12c]
Information in this document applies to any platform.

Symptoms

On : 12.2.1.3.0 version, Java Platform Security, Admin Server startup fails with JPS error

Below error is seen, when starting the Admin Server.

oracle.security.jps.JpsException: oracle.security.jps.service.keystore.KeyStoreServiceException: Failed to perform cryptographic operation
at oracle.security.jps.internal.config.OpssCommonStartup.preStart(OpssCommonStartup.java:418)
at oracle.security.jps.JpsStartup.preStart(JpsStartup.java:358)
at oracle.security.jps.wls.JpsBootStrapService.start(JpsBootStrapService.java:80)
at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:76)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.glassfish.hk2.utilities.reflection.ReflectionHelper.invoke(ReflectionHelper.java:1287)
at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:333)
at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:375)
at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:487)
at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:305)
at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:85)
at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2126)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:116)
at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:90)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1237)
at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1168)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: oracle.security.jps.service.keystore.KeyStoreServiceException: Failed to perform cryptographic operation
at oracle.security.jps.internal.keystore.util.CryptoUtil.decrypt(CryptoUtil.java:619)
at oracle.security.jps.internal.keystore.util.CryptoUtil.decodeAliasWithEncryptedContent(CryptoUtil.java:696)
at oracle.security.jps.internal.keystore.util.CryptoUtil.decryptPrivateKey(CryptoUtil.java:912)
at oracle.security.jps.internal.keystore.config.jaxb.adapters.PrivateKeyAdapter.unmarshal(PrivateKeyAdapter.java:63)
at oracle.security.jps.internal.keystore.config.jaxb.KeyPair.retrievePrivateKey(KeyPair.java:113)
at oracle.security.jps.internal.keystore.util.KeyStoreServiceUtil.getDemoCAKey(KeyStoreServiceUtil.java:691)
at oracle.security.jps.internal.keystore.util.KeyStoreServiceUtil.getDemoCAKey(KeyStoreServiceUtil.java:663)
at oracle.security.jps.internal.keystore.file.FileKeyStoreManager.reloadFromFKSUnlocked(FileKeyStoreManager.java:546)
at oracle.security.jps.internal.keystore.file.FileKeyStoreManager.openKeyStore(FileKeyStoreManager.java:531)
at oracle.security.jps.internal.keystore.file.FileKeyStoreManager.openKeyStore(FileKeyStoreManager.java:439)
at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.doInit(FileKeyStoreServiceImpl.java:162)
at oracle.security.jps.internal.keystore.file.FileKeyStoreServiceImpl.start(FileKeyStoreServiceImpl.java:1272)
at oracle.security.opss.internal.runtime.ServiceContextImpl.start(ServiceContextImpl.java:220)
at oracle.security.opss.internal.runtime.ServiceContextManagerImpl.createContext(ServiceContextManagerImpl.java:615)
at oracle.security.opss.internal.runtime.ServiceContextManagerImpl.initBootstrap(ServiceContextManagerImpl.java:174)
at oracle.security.opss.internal.runtime.ServiceContextManagerImpl.initBootstrap(ServiceContextManagerImpl.java:154)
at oracle.security.jps.internal.config.OpssCommonStartup$3.run(OpssCommonStartup.java:399)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.internal.config.OpssCommonStartup.preStart(OpssCommonStartup.java:352)
... 21 more
Caused by: javax.crypto.BadPaddingException: Invalid pad value: -31
at com.oracle.security.ucrypto.NativeCipherWithJavaPadding$PKCS5Padding.unpad(NativeCipherWithJavaPadding.java:167)
at com.oracle.security.ucrypto.NativeCipherWithJavaPadding.engineDoFinal(NativeCipherWithJavaPadding.java:400)
at com.oracle.security.ucrypto.NativeCipherWithJavaPadding.engineDoFinal(NativeCipherWithJavaPadding.java:365)
at javax.crypto.Cipher.doFinal(Cipher.java:2165)
at oracle.security.jps.internal.keystore.util.CryptoUtil.decrypt(CryptoUtil.java:592)
... 39 more



Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.