Hi,
I am using Hibernate 3.5.5-Final, Spring 3.0.3.RELEASE and when I run my application in Mule I get the following exception:
Code:
Caused by: java.lang.AbstractMethodError: org.springframework.orm.jpa.persistenceunit.SpringPersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:621)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:224)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:291)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 55 more
My dependencies:
Code:
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-spring-config</artifactId>
<version>${mule.version}</version>
</dependency>
<dependency>
<groupId>org.mule</groupId>
<artifactId>mule-core</artifactId>
<version>${mule.version}</version>
</dependency>
...
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
...
<dependency>
<groupId>org.hibernate.java-persistence</groupId>
<artifactId>jpa-api</artifactId>
<version>2.0-cr-1</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
Can anyone please help me to find out what am I missing here?
Kind regards,
Peter
Edited: Extra information:
The DAO JUnit Testcases actually run, however when trying to run the full application it fails.
Here is a trimmed output of mvn dependency:tree
Code:
mvn dependency:tree
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building model
[INFO] task-segment: [dependency:tree]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:tree {execution: default-cli}]
...
[INFO] +- org.hibernate:hibernate-annotations:jar:3.5.5-Final:compile
[INFO] | +- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
[INFO] | +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.5.8:compile
[INFO] +- org.hibernate:hibernate-core:jar:3.5.5-Final:compile
[INFO] | +- antlr:antlr:jar:2.7.6:compile
[INFO] | +- commons-collections:commons-collections:jar:3.1:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] | \- javax.transaction:jta:jar:1.1:compile
[INFO] +- org.springframework.security:spring-security-core:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-expression:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-core:jar:3.0.3.RELEASE:compile
[INFO] | | +- org.springframework:spring-asm:jar:3.0.3.RELEASE:compile
[INFO] | | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | +- org.springframework:spring-context:jar:3.0.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-beans:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-tx:jar:3.0.3.RELEASE:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.springframework:spring-aop:jar:3.0.3.RELEASE:compile
[INFO] | +- org.aspectj:aspectjrt:jar:1.6.8:compile
[INFO] | \- org.aspectj:aspectjweaver:jar:1.6.8:compile
[INFO] +- junit:junit:jar:4.8.1:test
[INFO] +- junit-addons:junit-addons:jar:1.4:test
[INFO] | +- xerces:xercesImpl:jar:2.6.2:test
[INFO] | \- xerces:xmlParserAPIs:jar:2.6.2:test
[INFO] \- org.slf4j:slf4j-log4j12:jar:1.5.8:test
[INFO] \- log4j:log4j:jar:1.2.14:test
[INFO] ------------------------------------------------------------------------
[INFO] Building dao
[INFO] task-segment: [dependency:tree]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:tree {execution: default-cli}]
...
[INFO] +- org.springframework:spring-core:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-asm:jar:3.0.3.RELEASE:compile
[INFO] | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- org.springframework:spring-orm:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-jdbc:jar:3.0.3.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:3.0.3.RELEASE:compile
[INFO] | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- org.hibernate.java-persistence:jpa-api:jar:2.0-cr-1:compile
[INFO] +- org.hibernate:hibernate-core:jar:3.5.5-Final:compile
[INFO] | +- antlr:antlr:jar:2.7.6:compile
[INFO] | +- commons-collections:commons-collections:jar:3.1:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] | +- javax.transaction:jta:jar:1.1:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.5.8:compile
[INFO] +- javassist:javassist:jar:3.9.0.GA:compile
[INFO] +- org.hibernate:hibernate-entitymanager:jar:3.5.5-Final:compile
[INFO] | +- cglib:cglib:jar:2.2:compile
[INFO] | | \- asm:asm:jar:3.1:compile
[INFO] | \- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
[INFO] +- mysql:mysql-connector-java:jar:5.1.13:compile
[INFO] +- org.springframework:spring-test:jar:3.0.3.RELEASE:test
[INFO] +- org.dbunit:dbunit:jar:2.4.6:test
[INFO] +- junit:junit:jar:4.8.1:test
[INFO] +- junit-addons:junit-addons:jar:1.4:test
[INFO] | +- xerces:xercesImpl:jar:2.6.2:test
[INFO] | \- xerces:xmlParserAPIs:jar:2.6.2:test
[INFO] \- org.slf4j:slf4j-log4j12:jar:1.5.8:test
[INFO] \- log4j:log4j:jar:1.2.14:test
[INFO] ------------------------------------------------------------------------
[INFO] Building core
[INFO] task-segment: [dependency:tree]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:tree {execution: default-cli}]
..
[INFO] +- ...model:jar:0.0.1-SNAPSHOT:compile
[INFO] | +- org.hibernate:hibernate-annotations:jar:3.5.5-Final:compile
[INFO] | | +- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
[INFO] | | \- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final:compile
[INFO] | +- org.hibernate:hibernate-core:jar:3.5.5-Final:compile
[INFO] | | +- antlr:antlr:jar:2.7.6:compile
[INFO] | | \- javax.transaction:jta:jar:1.1:compile
[INFO] | \- org.springframework.security:spring-security-core:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-expression:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-tx:jar:3.0.3.RELEASE:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- org.springframework:spring-aop:jar:3.0.3.RELEASE:compile
[INFO] | +- org.aspectj:aspectjrt:jar:1.6.8:compile
[INFO] | \- org.aspectj:aspectjweaver:jar:1.6.8:compile
…
[INFO] +- ...dao:jar:0.0.1-SNAPSHOT:compile
[INFO] | +- org.springframework:spring-core:jar:3.0.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-asm:jar:3.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-orm:jar:3.0.3.RELEASE:compile
[INFO] | | +- org.springframework:spring-beans:jar:2.5.6:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:3.0.3.RELEASE:compile
[INFO] | +- javassist:javassist:jar:3.9.0.GA:compile
[INFO] | +- org.hibernate.java-persistence:jpa-api:jar:2.0-cr-1:compile
[INFO] | +- org.hibernate:hibernate-entitymanager:jar:3.5.5-Final:compile
[INFO] | | \- cglib:cglib:jar:2.2:compile
[INFO] | \- mysql:mysql-connector-java:jar:5.1.13:compile
…
Thanks in advance,
Peter