我試圖在Tomcat 8.0.3上部署我的Spring應用程序。 servlet容器使用jdk 1.0.7_51。我能夠通過部署在Tomcat 8.0.3上
做部署MVN tomcat7:插件
但是當Tomcat的嘗試運行應用程序。在日誌文件中我得到這個異常:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [file:/home/myApp/apache-tomcat-8.0.3/webapps/myApp/WEB-INF/classes/database.xml]: Invocation of init method failed; nested exception is java.lang.SecurityException: class "org.eclipse.persistence.sessions.coordination.CommandProcessor"'s signer information does not match signer information of other classes in the same package
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:420)
at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:277)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.detectPersistenceExceptionTranslators(PersistenceExceptionTranslationInterceptor.java:139)
at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.<init>(PersistenceExceptionTranslationInterceptor.java:79)
at org.springframework.dao.annotation.PersistenceExceptionTranslationAdvisor.<init>(PersistenceExceptionTranslationAdvisor.java:70)
at org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor.setBeanFactory(PersistenceExceptionTranslationPostProcessor.java:103)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeAwareMethods(AbstractAutowireCapableBeanFactory.java:1475)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1443)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
... 55 more
我也運行
MVN依賴性:樹| FINDSTR蝕
,我得到這樣的結果
[INFO] | | +- org.eclipse.persistence:org.eclipse.persistence.jpa:jar:2.5.1:compile
[INFO] | | | +- org.eclipse.persistence:javax.persistence:jar:2.1.0:compile
[INFO] | | | +- org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.5.1:compile
[INFO] | | | +- org.eclipse.persistence:org.eclipse.persistence.antlr:jar:2.5.1:compile
[INFO] | | | +- org.eclipse.persistence:org.eclipse.persistence.jpa.jpql:jar:2.5.1:compile
[INFO] | | | \- org.eclipse.persistence:org.eclipse.persistence.core:jar:2.5.1:compile
[INFO] | | \- org.eclipse.persistence:eclipselink:jar:2.3.2:compile
[INFO] | | +- eclipse:jdtcore:jar:3.1.0:compile
我該如何解決它?
投訴給誰就給誰給你org.eclipse.persistence.sessions。 coordination.CommandProcessor,該jar文件格式不正確。或者關閉安全管理器。 – bmargulies
你不是還混合了Eclipselink的2個版本嗎? 2.3.2和2.5.1? –
@bmargulies在未啓用安全管理器的情況下,您會看到該錯誤 –