class "org.bouncycastle.openssl.PEMException"'s signer information does not match signer information of other classes in the same package

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

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 signer information of other classes in the same package

 

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

 

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

class "org.bouncycastle.openssl.PEMException"'s signer information does not match signer information of other classes in the same package

 

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

 

 class "org.bouncycastle.openssl.PEMException"'s signer information does not match signer information of other classes in the same package

 

class "org.bouncycastle.openssl.PEMException"'s signer information does not match signer information of other classes in the same package

上一篇:命令执行无回显


下一篇:输入年份,打印日历