Gava 8 certandkeygen exception exception at runtime

I have a third party java package that is compiled using Java 6 version and this package is deployed in java 8 environment. Now I see the following exception at runtime.

Exception in thread "AWT-EventQueue-2" java.lang.NoClassDefFoundError: sun/security/x509/CertAndKeyGen
       at com.xxx.ws.security.impl.DefaultSecurityStore.generateSelfSignedEntry(Unknown Source)
       at com.xxx.ws.security.impl.SecurityPluginUtil.sign(Unknown Source)
       at com.xxx.ws.security.impl.ProcessingContext.processOutbound(Unknown Source)
       at com.xxx.ws.security.impl.BaseSecurityEnvironment.secureOutboundMessage(Unknown Source)
       at com.xxx.em.launch.message.LaunchRequestMessage.sendTo(Unknown Source)

      

I researched this exception and I found that Java 8 has ported the class CertAndKeyGen

to sun.security.tools.keytool

. But in this case, this package is compiled using java 6 and is referencing the package sun.security.x509.CertAndKeyGen

. What could be an alternative approach to mitigate this problem. , Thank you for your time.

+3


source to share





All Articles