users@glassfish.java.net

Bug in Glassfish keystore and cacerts handling, can not recover key

From: Legolas Woodland <legolas.w_at_gmail.com>
Date: Thu, 5 Apr 2007 14:30:33 +0330

Hi
thank you for reading my post
I think there is a bug in glasfish way of handling keystore and cacerts.

as you can see in attached image (which is made using netbeans keytool
module) I have two keys in my keystore file.
when i start glassfish it shows an error like:

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.sun.enterprise.server.PELaunch.main(PELaunch.java:272)
Caused by: java.lang.ExceptionInInitializerError
        at com.sun.enterprise.security.SecurityLifecycle.onInitialization(
SecurityLifecycle.java:88)
        at com.sun.enterprise.server.ApplicationServer.onInitialization(
ApplicationServer.java:240)
        at
com.sun.enterprise.server.ondemand.OnDemandServer.onInitialization(
OnDemandServer.java:93)
        at com.sun.enterprise.server.PEMain.run(PEMain.java:316)
        at com.sun.enterprise.server.PEMain.main(PEMain.java:260)
        ... 5 more
Caused by: java.lang.IllegalStateException:
java.security.UnrecoverableKeyException: Cannot recover key
        at com.sun.enterprise.security.SSLUtils.<clinit>(SSLUtils.java:112)
        ... 10 more
Caused by: java.security.UnrecoverableKeyException: Cannot recover key
        at sun.security.provider.KeyProtector.recover(KeyProtector.java:301)
        at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java
:120)
        at java.security.KeyStore.getKey(KeyStore.java:731)
        at com.sun.net.ssl.internal.ssl.SunX509KeyManagerImpl.<init>(
SunX509KeyManagerImpl.java:111)
        at
com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl$SunX509.engineInit(
KeyManagerFactoryImpl.java:41)
        at javax.net.ssl.KeyManagerFactory.init(KeyManagerFactory.java:192)
        at com.sun.enterprise.security.SSLUtils.initKeyManagers(
SSLUtils.java:303)
        at com.sun.enterprise.security.SSLUtils.<clinit>(SSLUtils.java:89)
        ... 10 more



do you know what is problem?





untitled.JPG
(image/jpeg attachment: untitled.JPG)