获取异常java.lang.NoClassDefFoundError:sun / security / tools / keytool / CertAndKeyGen

时间:2017-11-19 15:25:28

标签: java security encryption jboss java-8

我在jre 1.8上使用Java SUSE linux,我在sun/security/tools/keytool/CertAndKeyGen课程上遇到异常。我使用带有maven参数的JDK 1.8构建我的代码

<compilerArgument>-XDignore.symbol.file<compilerArgument> 

用于sun / security / tools / keytool / on java 8。构建成功。在jboss上部署后,我收到了java.lang.NoClassDefFoundError的错误。这是完整的堆栈跟踪:

JBWEB000309: type JBWEB000066: Exception report

JBWEB000068: message Handler processing failed; nested exception is java.lang.NoClassDefFoundError: sun/security/tools/keytool/CertAndKeyGen

JBWEB000069: description JBWEB000145: The server encountered an internal error that prevented it from fulfilling this request.

JBWEB000070: exception

java.lang.NoClassDefFoundError: sun/security/tools/keytool/CertAndKeyGen
    com.sample.test.security.certificate.OracleJDKCertificateHelper.resetCertificate(OracleJDKCertificateHelper.java:68)
    com.sample.test.service.singleton.CertificateService.resetCertificate(CertificateService.java:229)
    com.sample.test.service.singleton.CertificateService.resetCertificate(CertificateService.java:219)
    com.sample.test.service.singleton.LicenseService.postSaveOrUpdate(LicenseService.java:138)
    com.sample.test.service.singleton.LicenseService.postSaveOrUpdate(LicenseService.java:54)
    com.sample.test.service.singleton.SingletonServiceImpl.saveOrUpdate(SingletonServiceImpl.java:102)
    com.sample.test.web.controllers.singleton.BaseSingletonController$2.doInSyncMode(BaseSingletonController.java:110)
    com.sample.test.web.controllers.singleton.BaseSingletonController.doIfNotAsyncAction(BaseSingletonController.java:143)
    com.sample.test.web.controllers.singleton.BaseSingletonController.processSubmit(BaseSingletonController.java:103)
    sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

我从SUSE rt.jar中提取了Jre1.8。我可以看到rt.jar\sun\security\tools\keytool\CertAndKeyGen.class存在于其中。那我为什么得到java.lang.NoClassDefFoundError?

任何帮助或建议?

0 个答案:

没有答案