我需要一些建议来解决这个问题,如果有的话。
问题是,我们无法在每次部署后创建合作伙伴用户,如果我们再次重新启动tomcat服务,那么它的工作正常。
当我们尝试在部署后创建合作伙伴用户时,我们在日志中遇到错误。
20-Dec-2017 13:27:35.388 | ERROR | [ http-apr-28080-exec-78] | SecurityAdminServiceManagerImpl:1986 - Error in generateCertificateDetails
org.bouncycastle.operator.OperatorCreationException: cannot create signer: class configured for Signature (provider: BC) cannot be found.
at org.bouncycastle.operator.jcajce.JcaContentSignerBuilder.build(Unknown Source) ~[bcpkix-jdk15on-156.jar:1.56.0.0]
at com.northgateis.gem.security.cipher.CertificateHelper.signCertificate(CertificateHelper.java:298) ~[classes/:26696]
at com.northgateis.gem.security.cipher.CertificateHelper.createClientCertificate(CertificateHelper.java:256) ~[classes/:26696]
at com.northgateis.gem.security.service.impl.SecurityAdminServiceManagerImpl.generateCertificateDetails(SecurityAdminServiceManagerImpl.java:1979) [classes/:26696]
20-Dec-2017 13:56:44.158 INFO [http-apr-28080-exec-69] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [org.bouncycastle.jcajce.provider.asymmetric.rsa.DigestSignatureSpi$SHA256]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [org.bouncycastle.jcajce.provider.asymmetric.rsa.DigestSignatureSpi$SHA256]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access.
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1325)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1313)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1178)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1139)
答案 0 :(得分:0)
如果您重新部署应用程序,就像您在开发过程中经常那样,它会停止工作。 JNI是另一个遭受这个问题的事情。
我更喜欢使用应用程序运送jar,而不必手动将其复制到容器lib目录。
您可以在lib文件夹中添加javapns.jar和bcprove-jdk15on-1.47.jar文件
将BouncyCastle作为提供者添加到JRE / JDK $ JAVA_HOME/jre/lib/security/java.security
文件中(确保将其添加到运行时使用的JRE中,例如,如果安装了多个JRE / JDK)