-->
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: JPA2 in JBossAS5
PostPosted: Thu Feb 11, 2010 6:46 am 
Newbie

Joined: Mon Feb 04, 2008 7:51 am
Posts: 2
Location: Luxembourg
Hi,

is there an easy way to replace the default JPA1 implementation in JBossAS5 with the JPA2 implementation in Hibenate 3.5?

Thanks a lot,
Georges


Top
 Profile  
 
 Post subject: Re: JPA2 in JBossAS5
PostPosted: Thu Feb 11, 2010 7:19 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
The Hibernate 3.5 bundle contains the JPA2 IMPLEMENTATION.
You have indeed to replace the JPA SPECIFICATION (= the interfaces):
- remove ejb3-persistence.jar from classpath as it contains the old JPA1 specification
- add jpa-api-2.0-cr-1.jar into classpath as it contains candidate release1 of the new JPA2 specification
http://repository.jboss.org/maven2/org/hibernate/java-persistence/jpa-api/2.0-cr-1/jpa-api-2.0-cr-1.jar
(at the moment of writing this, final jpa-api-2.0 release still outstanding on repository)


Top
 Profile  
 
 Post subject: Re: JPA2 in JBossAS5
PostPosted: Mon Feb 15, 2010 6:46 am 
Newbie

Joined: Mon Feb 15, 2010 6:39 am
Posts: 1
Hi, it's what I did, but I have this error during the deployment (I use the 3.5.0 CR-1 version) :

ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=#xxxx-repository state=Create
java.lang.AbstractMethodError: org.jboss.jpa.deployment.PersistenceUnitInfoImpl.getValidationMode()Ljavax/persistence/ValidationMode;
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:580)


Top
 Profile  
 
 Post subject: Re: JPA2 in JBossAS5
PostPosted: Mon Feb 15, 2010 7:01 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Hm,

I suspect you have to use JBossAS-6.0.0 (at moment of writing, latest release is 6.0.0.Milestone1)
in order to be JPA2 compliant.


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.