payarajceks

Payara Refuses to Start: java.security.KeyStoreException: JCEKS not found


Running a Java EE 8 web Application on Payara 5.194. it has been a while since I started Payara and the application.

When I start the server: I gets messages for 6 expired certificates.

 Subject: CN=Staat der Nederlanden Root CA - G2, O=Staat der Nederlanden, C=NL
 Subject: CN=Staat der Nederlanden Root CA - G2, O=Staat der Nederlanden, C=NL
 Subject: CN=AddTrust Qualified CA Root, OU=AddTrust TTP Network, O=AddTrust AB, C=SE
 Subject: CN=AddTrust Class 1 CA Root, OU=AddTrust TTP Network, O=AddTrust AB, C=SE
 Subject: CN=KEYNECTIS ROOT CA, OU=ROOT, O=KEYNECTIS, C=FR
 Subject: CN=Entrust.net Certification Authority (2048), OU=(c) 1999 Entrust.net Limited, OU=www.entrust.net/CPS_2048 incorp. by ref. (limits liab.), O=Entrust.net

After that I get this exception

[#|2020-05-30T10:47:11.755+0000|INFO|Payara 5.194|javax.enterprise.system.core|_ThreadID=22;_ThreadName=RunLevelControllerThread-1590835619275;_TimeMillis=1590835631755;_LevelValue=800;_MessageID=NCLS-CORE-00015;|
  Shutdown requested
MultiException stack 1 of 2
java.lang.RuntimeException: java.lang.RuntimeException: java.security.KeyStoreException: JCEKS not found
        at org.glassfish.security.services.impl.JCEKSPasswordAliasStore.containsKey(JCEKSPasswordAliasStore.java:169)
        at fish.payara.nucleus.microprofile.config.source.PasswordAliasConfigSource.getValue(PasswordAliasConfigSource.java:84)
        at fish.payara.nucleus.microprofile.config.spi.PayaraConfig.getValue(PayaraConfig.java:166)
        at fish.payara.nucleus.microprofile.config.spi.PayaraConfig.getOptionalValue(PayaraConfig.java:88)
        at fish.payara.microprofile.healthcheck.HealthCheckService.postConstruct(HealthCheckService.java:120)
        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:1268)
        at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:309)
        at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:351)
        at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:463)
        at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:281)
        at org.glassfish.hk2.runlevel.RunLevelContext.findOrCreate(RunLevelContext.java:65)
        at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2102)
        at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
        at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:67)
        at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:1213)
        at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:1144)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: java.security.KeyStoreException: JCEKS not found
        at org.glassfish.security.services.impl.JCEKSPasswordAliasStore.pa(JCEKSPasswordAliasStore.java:103)
        at org.glassfish.security.services.impl.JCEKSPasswordAliasStore.containsKey(JCEKSPasswordAliasStore.java:167)
        ... 22 more
Caused by: java.security.KeyStoreException: JCEKS not found
        at java.security.KeyStore.getInstance(KeyStore.java:851)
        at com.sun.enterprise.security.store.PasswordAdapter.loadKeyStore(PasswordAdapter.java:131)
        at com.sun.enterprise.security.store.PasswordAdapter.<init>(PasswordAdapter.java:110)
        at org.glassfish.security.services.impl.JCEKSPasswordAliasStore.pa(JCEKSPasswordAliasStore.java:101)
        ... 23 more
Caused by: java.security.NoSuchAlgorithmException: JCEKS KeyStore not available
        at sun.security.jca.GetInstance.getInstance(GetInstance.java:159)
        at java.security.Security.getImpl(Security.java:697)
        at java.security.KeyStore.getInstance(KeyStore.java:848)

No Code has been changed, nothing. Payara just won't start.


Solution

  • So I found the issue. I did upgrade to JDK 9 and so my JAVA_HOME and path env variables were pointing to the JDK 9. So I changed them to point back to JDK 8 for the time being. and everything works.