2017-07-04 1 views
0

Je reçois ci-dessous erreur lorsque je déploie l'oreille sur wildfly 10.Migration :: Jboss 6.0 pae toWildfly 10,01 + Java 8 java.security.NoSuchProviderException: JCE ne peut pas authentifier le fournisseur BC

J'ai utilisé le dernier pot (bcprov-jdk16-1.46.jar et bcmail-jdk16-1.46.jar) mais pas travaillé.

13:46:35,654 ERROR [stderr] (ServerService Thread Pool -- 76) java.security.NoSuchProviderException: JCE cannot authenticate the provider BC 
13:46:35,654 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JceSecurity.getInstance(JceSecurity.java:100) 
13:46:35,669 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:204) 
13:46:35,669 ERROR [stderr] (ServerService Thread Pool -- 76) at com.generic.util.EncryptionUtils.getKey(EncryptionUtils.java:165) 
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at com.generic.util.EncryptionUtils.initializeDecryptionCipher(EncryptionUtils.java:230) 
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at com.generic.util.EncryptionUtils.isEncrypted(EncryptionUtils.java:93) 
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at com.generic.system.SystemStartup.loadDefaulBSettings(SystemStartup.java:286) 
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at com.generic.system.SystemStartup.startUp(SystemStartup.java:120) 
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at sample.servlets.tartup.init(Startup.java:187) 
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:117) 
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at org.wildfly.extension.undertow.security.RunAsLifecycleInterceptor.init(RunAsLifecycleInterceptor.java:78) 
13:46:35,685 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:103) 
13:46:35,700 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:250) 
13:46:35,700 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:133) 
13:46:35,700 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:546) 
13:46:35,700 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:517) 
13:46:35,700 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) 
13:46:35,700 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) 
13:46:35,716 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) 
13:46:35,716 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) 
13:46:35,716 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) 
13:46:35,716 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) 
13:46:35,716 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44) 
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:559) 
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:101) 
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82) 
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at java.lang.Thread.run(Thread.java:748) 
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) at org.jboss.threads.JBossThread.run(JBossThread.java:320) 
13:46:35,732 ERROR [stderr] (ServerService Thread Pool -- 76) Caused by: java.lang.SecurityException: Cannot verify jar:vfs:/E:/myprj/wildfly-10.1.0.Final/bin/content/myapp.ear/lib/tik 
a-app-1.4.jar!/ 
13:46:35,747 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JarVerifier.verifySingleJar(JarVerifier.java:446) 
13:46:35,747 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JarVerifier.verifyJars(JarVerifier.java:361) 
13:46:35,747 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JarVerifier.verify(JarVerifier.java:289) 
13:46:35,747 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JceSecurity.verifyProviderJar(JceSecurity.java:159) 
13:46:35,747 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JceSecurity.getVerificationResult(JceSecurity.java:185) 
13:46:35,747 ERROR [stderr] (ServerService Thread Pool -- 76) at javax.crypto.JceSecurity.getInstance(JceSecurity.java:97) 

Répondre

0

Il existe deux solutions de contournement.

  1. Vous créez un Modul avec les libs (bcprov-jdk16-1.46.jar, bcmail-jdk16-1.46.jar) et de l'importer dans votre jboss-déploiement structure.xml
  2. Vous ajoutez les pots dans le fichier jboss-deployment-structure.xml en tant que ressource avec l'option use-physical-code-source = "true" Exemple: <resource-root path="/lib/bcprov-jdk16-1.46.jar" use-physical-code-source="true"/>