class "org.bouncycastle.openssl.PEMException"'s signer information does not match si

最近写代码遇到下面的问题,第一次遇到这种问题,解决的时候花费了一些时间,特此记录下来

java.lang.SecurityException: class "org.bouncycastle.openssl.PEMException"'s signer information does not match signer information of other classes in the same package
	at java.lang.ClassLoader.checkCerts(ClassLoader.java:891)
	at java.lang.ClassLoader.preDefineClass(ClassLoader.java:661)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:754)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
	at org.bouncycastle.openssl.PEMParser.<init>(Unknown Source)
        at com.test.utils.RSAStaticUtils.loadPem(RSAStaticUtils.java:281)
        at com.test.utils.RSAUtils.loadPem(RSAUtils.java:131)
        at com.test.utils.RSAUtils.loadPem(RSAUtils.java:117)
        at com.test.utils.TestCotroller.analysisUserInfo(TestCotroller.java:70)
        at com.test.utils.TestCotroller.main(TestCotroller.java:54)

class "org.bouncycastle.openssl.PEMException"'s signer information does not match si

 

  造成这个问题的原因是 jar包冲突的   所以我们就需要查找冲突的jar包

 

   idea中可以直接查看jar包关系图,点击图中选中的按钮,就可以查看jar关系图

class "org.bouncycastle.openssl.PEMException"'s signer information does not match si

 

我这边是现在pom.xml文件中引入的依赖,所以就直接定位的新加的依赖关系,然后找出了重复的引用,删除就可以了

 

 class "org.bouncycastle.openssl.PEMException"'s signer information does not match si

 

上一篇:Error: A JNI error has occurred, please check your installation and try again


下一篇:idea启动失败 Could not find main class com/intellij/idea/Main