项目与IDE或安全性相关联吗?

时间:2015-10-23 18:43:35

标签: java spring maven intellij-idea

我有一个Java / Spring项目,我负责熟悉代码。为此,我正在调试逐步执行程序的不同部分并研究变量状态和调用堆栈。我想在IDEA中运行它,因为我更喜欢那个IDE并且以前使用过它。虽然程序在Eclipse-STS中运行良好,但在IDEA中运行时,我得到了这个:

[ERROR] Application [main]: Can't build application context: Error creating bean with name 'entityManagerFactory' defined in class path resource [springconfig.xml]: Invocation of init method failed; nested exception is java.lang.SecurityException: class "org.eclipse.persistence.internal.helper.Helper"'s signer information does not match signer information of other classes in the same package
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [springconfig.xml]: Invocation of init method failed; nested exception is java.lang.SecurityException: class "org.eclipse.persistence.internal.helper.Helper"'s signer information does not match signer information of other classes in the same package

我注意到我们的软件中有一个类Helper.java,但它是它的包中唯一的类,那么为什么它会抱怨这个类的签名者信息与同一个包中其他类的信息不匹配呢? / p>

enter image description here

在Stack Overflow的其他地方,我了解到当多个JAR将特定类导入同一个项目时会发生这种情况,从而导致冲突。我不确定这种冲突是怎么回事,因为之前的图像显示这个类是项目中的本机* .java文件而不是从任何JAR导入的。更重要的是,它是该软件包中唯一一个使错误消息难以理解的类。但后来我意识到我们的项目还导入了一个JAR,里面有这个类。即,我们导入eclipselink-2.5.0.jar。所以,我认为编译时的源类可能与此包中的Helper.class冲突。

所以,我认为原始的错误消息是关于我们的Helper.class被视为属于JAR,因此IDE抱怨JAR的manifest签名与Helper.class上的任何签名都不匹配。

所以,作为一个实验,我试图删除这个JAR的签名清单,并从中删除Helper.class。然后我清理并重新编译该项目无济于事。

0 个答案:

没有答案
相关问题