Announcement Announcement Module
Collapse
No announcement yet.
Spring 3.0.3.RELEASE/JPA2 and Mule 2.2.1 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring 3.0.3.RELEASE/JPA2 and Mule 2.2.1

    Hi,

    I am using Spring 3.0.3.RELEASE, Hibernate 3.5.5-Final 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>
    Note that all my DAO JUnit Testcases actually compile + run, but 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
    …
    Can anyone please help me to find out what am I missing here?

    FYI, a similar topic was started before on the hibernate forums: https://forum.hibernate.org/viewtopi...35173#p2435173

    Thanks in advance,
    Peter
    Last edited by peterbollen; Sep 1st, 2010, 07:50 AM.

  • #2
    Hi Peter,
    have you solved the issue? I'm having the same problem. In particular, if I run my web application using maven as mvn tomcat:run then it starts OK. But if I run it as mvn tomcat:run-war, i fails with
    Code:
    java.lang.AbstractMethodError:
    org.springframework.orm.jpa.persistenceunit.SpringPersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
    which is very strange.

    Best regards,
    Petr

    Comment

    Working...
    X