java.lang.SecurityException: 签名者信息与同一包中其他类的签名者信息不匹配

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24386463/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 11:53:56  来源:igfitidea点击:

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

javahibernatecertificatesecurityexception

提问by user613114

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

我们在我们的 Java 应用程序中更新了安全证书,突然我们开始收到以下提到的异常:

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 SOdescribing 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.

我们使用 ANT 工具来构建我们的代码。我在SO 上找到了一些描述类似问题的链接。Bur 我不知道如何解决与休眠 jars 相关的问题。如果您有任何想法,请告诉我。

回答by Radu

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

可能是您的类org.hibernate.cfg.Configuration没有从您期望的 jar 中加载。

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.

当我们的程序为 JavaMail 加载一些实用程序类时遇到了同样的问题,结果在切换到 Maven 进行项目配置管理后,我们的一些 Jetty 依赖项包含 jar javax.mail.glassfish,因此与显式邮件依赖项发生冲突。

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

为了找出从控制台启动Java程序时,这是实际加载罐子,你可以使用-verbose:class启动Java虚拟机时(如描述的选项这里)。

回答by Shimon Doodkin

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

我在 WEB-INF/lib/wsdl4j.jar 中有一个额外的 jar 文件