Trouble upgrading from EclipseLink 1.1.2 to 2.1.1 in Spring 2.5 [message #560222] |
Tue, 21 September 2010 15:20 |
Matti Hansson Messages: 68 Registered: July 2009 |
Member |
|
|
Hi!
The time has come to step up the version of EclipseLink in my Spring project. Unit tests and everything works great, but when I try to deploy it on a JBoss I get this stack trace:
ERROR Context initialization failed at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:215)
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManager' defined in class path resource [META-INF/jpaContext.xml]: Invocation of init method failed; nested exception is java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/web/tomcat/service/WebCtxLoader$ENCLoader) previously initiated loading for a different type with name "javax/persistence/LockModeType"
I haven't changed anything except the EclipseLink dependency. This is the jpaContext.xml that is mentioned:
<jee:jndi-lookup id="dataSource" jndi-name="java:jdbc/sigmaFaDataSource"/>
<!-- JPA EntityManagerFactory -->
<bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.EclipseLinkJpaVendorAdapter">
<property name="databasePlatform" value="org.eclipse.persistence.platform.database.oracle.Oracle9Platform"/>
<property name="showSql" value="true"/>
</bean>
</property>
<property name="jpaProperties">
<props>
<prop key="eclipselink.target-server">org.eclipse.persistence.platform.server.jboss.JBossPlatform</prop>
<prop key="eclipselink.logging.level">ALL</prop>
<prop key="eclipselink.logging.logger">com.foo.SLF4JSessionLogger</prop>
<prop key="eclipselink.logging.timestamp">false</prop>
<prop key="eclipselink.logging.thread">false</prop>
<prop key="eclipselink.logging.session">false</prop>
<prop key="eclipselink.jdbc.native-sql">true</prop>
<prop key="eclipselink.jdbc.cache-statements">false</prop>
<prop key="eclipselink.weaving">false</prop>
<prop key="eclipselink.ddl-generation">none</prop>
</props>
</property>
<property name="persistenceXmlLocation" value="${persistence.xml.location}" />
</bean>
<bean id="entityManager" class="org.springframework.orm.jpa.support.SharedEntityManagerBean">
<property name="entityManagerFactory" ref="entityManagerFactory"/>
</bean>
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManagerName" value="java:/TransactionManager"/>
</bean>
<bean class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/>
<tx:annotation-driven mode="proxy"/>
Ideas? Thanks!
/Matti
[Updated on: Tue, 21 September 2010 15:21] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02354 seconds