users@glassfish.java.net

Glassfish 2.1 classloader problem

From: <glassfish_at_javadesktop.org>
Date: Tue, 16 Feb 2010 04:24:45 PST

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