-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
 Post subject: JPA/Hibernate 3.5.5 and Mule 2.2.1
PostPosted: Wed Sep 01, 2010 7:56 am 
Newbie

Joined: Wed Sep 01, 2010 6:08 am
Posts: 3
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


Top
 Profile  
 
 Post subject: Re: JPA/Hibernate 3.5.5 and Mule 2.2.1
PostPosted: Wed Sep 01, 2010 8:30 am 
Regular
Regular

Joined: Sun Feb 14, 2010 3:29 pm
Posts: 58
Location: USA
You probably have some whacked mixed bags of jars and compiling issues, as java.lang.AbstractMethodError should already be caught during javac compile stage.

Also, I don't believe "org.springframework.orm.jpa.persistenceunit.SpringPersistenceUnitInfo" exists in their public 3.0.3 javadoc. So you probably have some weird setup. Try ask Spring in their forum with this.

_________________
Zemian Deng
------------
Need a Java Scheduler? Try
http://bitbucket.org/timemachine/scheduler


Top
 Profile  
 
 Post subject: Re: JPA/Hibernate 3.5.5 and Mule 2.2.1
PostPosted: Wed Sep 01, 2010 8:48 am 
Newbie

Joined: Wed Sep 01, 2010 6:08 am
Posts: 3
Ok, will do. The strange thing is that I don't have a compile issues.

FYI, I've created a similar topic on the springsource forums: http://forum.springsource.org/showthread.php?p=317086#post317086


Top
 Profile  
 
 Post subject: Re: JPA/Hibernate 3.5.5 and Mule 2.2.1
PostPosted: Wed Sep 01, 2010 3:48 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Probably spring is not supporting JPA 2 it sounds like. Thats a new method in JPA 2


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.