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.  [ 2 posts ] 
Author Message
 Post subject: Hibernate validator and hibernate entitymanager conflict
PostPosted: Wed Feb 17, 2010 8:43 am 
Newbie

Joined: Fri Aug 15, 2008 3:33 am
Posts: 17
Hi,

I use glassfish 2.1 in my developer environment and for the moment I develop an jsf-ejb-hibernate application.
I didn't find any solution to specify "parent-last" for the classloader and for this reason there are some conflicts between jars which are imported as dependencies by the Hibernate Validator 4.0.1 GA and Hibernate entity manager 3.4.0 GA.
I want to use Hibernate Validator v. 4 because is the implementation of the JSR 303.

The error which is thrown by the server is:
java.lang.AbstractMethodError: org.hibernate.ejb.HibernatePersistence.isLoadedWithoutReference(Ljava/lang/Object;Ljava/lang/String;)Ljavax/persistence/spi/LoadState;
at javax.persistence.Persistence$1.isLoaded(Persistence.java:76)
at org.hibernate.validator.engine.resolver.JPATraversableResolver.isReachable(JPATraversableResolver.java:33)
at org.hibernate.validator.engine.resolver.DefaultTraversableResolver.isReachable(DefaultTraversableResolver.java:112)
at org.hibernate.validator.engine.resolver.SingleThreadCachedTraversableResolver.isReachable(SingleThreadCachedTraversableResolver.java:47)
at org.hibernate.validator.engine.ValidatorImpl.isValidationRequired(ValidatorImpl.java:764)
at org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:331)
at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForRedefinedDefaultGroup(ValidatorImpl.java:278)
at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:260)
at org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:213)
at org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:119)

Is it possible to use both frameworks with the latest versions in the same time?
Or is the error thrown from other conflicts?

Thank you very much in advance


Top
 Profile  
 
 Post subject: Re: Hibernate validator and hibernate entitymanager conflict
PostPosted: Wed Feb 17, 2010 9:09 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
Quote:
Or is the error thrown from other conflicts?


No.
It is definitely due incompatibility between Hibernate Validator 4.0.1 GA and Hibernate entity manager 3.4.0 GA.
This because Hibernate Validator 4.0.1 GA is for usage with JPA2 standard (jpa-api.jar is version 2.0.Beta-20090815)
whilst Hibernate entity manager 3.4.0 GA is for usage with JPA1 standard (ejb3-persistence.jar)

Quote:
Is it possible to use both frameworks with the latest versions in the same time?

Not with the latest GA versions.
Hibernate Validator 4.0.1 GA should be compatible with Hiberante 3.5 which is currently in Candidate release status.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.