users@glassfish.java.net

Re: Glassfish 2.1 classloader problem

From: Mitesh Meswani <Mitesh.Meswani_at_Sun.COM>
Date: Tue, 16 Feb 2010 14:59:26 -0800

You are using a newer version of javax.persistence.jar that expects to
be run only with JPA providers implementing JPA 2.0. It seems you are
running with an older version of Hibernate and hence the error.

On 2/16/2010 4:24 AM, glassfish_at_javadesktop.org wrote:
> 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 javaee.jar from the server's lib folder and some other jar which are deployed with my application (jpa-api.jar, ejb3-persistence.jar).
>
> 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 there anyone which saw a similar error before? Can someone give me some tips?
>
> Thank you very much in advance
> [Message sent by forum member 'mitroiasi' (mitroiasi_at_yahoo.com)]
>
> http://forums.java.net/jive/thread.jspa?messageID=386961
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>