java.lang.SecurityException: signer information does not match signer information of other classes in the same package

一曲冷凌霜 提交于 2019-12-02 09:12:40

问题


We have renewed security certificates in our java applications and suddenly we have started receiving below mentioned exception:

java.lang.SecurityException: class "org.hibernate.cfg.Configuration"'s signer information does not match signer information of other classes in the same package
    at java.lang.ClassLoader.checkCerts(ClassLoader.java:806) [rt.jar:1.6.0_37]
    at java.lang.ClassLoader.preDefineClass(ClassLoader.java:487) [rt.jar:1.6.0_37]
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:625) [rt.jar:1.6.0_37]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_37]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:344) 

We use ANT tool to build our code. I found some links over the SO describing the similar issue. Bur I am not sure how to resolve issue which is related to hibernate jars. Please let me know, if you have any idea.


回答1:


Might be that your class org.hibernate.cfg.Configuration doesn't get loaded from the jar that you're expecting to do so.

Had the same problem when our program was loading some utility classes for JavaMail and it turned out that after switching over to Maven for project configuration management, some of our Jetty dependencies were including the jar javax.mail.glassfish, thus conflicting with the explicit mail dependencies.

To find out which jars are actually loaded when launching the java program from console, you can use the -verbose:class option when starting the Java VM (as described here).




回答2:


I had an additional jar file in WEB-INF/lib/wsdl4j.jar



来源:https://stackoverflow.com/questions/24386463/java-lang-securityexception-signer-information-does-not-match-signer-informatio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!