1、我的代码中引用了bcprov-jdk16-146.jar,在部署到jboss7.1.1时报如下异常:
Caused by: java.lang.SecurityException: JCE cannot authenticate the provider BC
at javax.crypto.SunJCE_b.a(DashoA13*..)
at javax.crypto.SecretKeyFactory.getInstance(DashoA13*..)
at org.jasypt.encryption.pbe.StandardPBEByteEncryptor.initialize(StandardPBEByteEncryptor.java:667)
... 95 more
Caused by: java.util.jar.JarException: Cannot parse jar:file:/Users/himajumdar/Work/jboss/jboss-5.1.0.GA/server/default/tmp/a00c-b5p2h4-hgi84jo1-1-hgi84qe5-w/csa.ear!/lib/bcprov-jdk16-146
at javax.crypto.SunJCE_c.a(DashoA13*..)
at javax.crypto.SunJCE_b.b(DashoA13*..)
at javax.crypto.SunJCE_b.a(DashoA13*..)
... 98 more
2、然后按照网上说的我在JAVA_HOME/jre/lib/security/java.security下增加
security.provider.11=org.bouncycastle.jce.provider.BouncyCastleProvider to java.security
将该jar包放到JAVA_HOME/jre/lib/ext下,并将项目中的该jar去掉
结果又报出如下问题:
ERROR java.lang.ClassNotFoundException: org.bouncycastle.jce.provider.BouncyCastleProvider
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
哪位大侠能给解决下呢