users@glassfish.java.net

Re: Classloading Error for JPA Implementation

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Fri, 23 Mar 2007 10:41:23 -0700

The original stack trace points that your code to call Persistence.createEMF is
called at deployment, not at app loading time. Do you know why can this happen?

thanks,
-marina

glassfish_at_javadesktop.org wrote:
>>Did you try to ask about it on the Hibernate forum?
>
> Here is the reply: http://forum.hibernate.org/viewtopic.php?t=972404
>
> Apaprently Glassfish mess up with the thread current class loader on redeployment
>
> Here is the culprit line
>
> Enumeration<URL> xmls = Thread.currentThread()
> .getContextClassLoader()
> .getResources( "META-INF/persistence.xml" );
> [Message sent by forum member 'tmv' (tmv)]
>
> http://forums.java.net/jive/thread.jspa?messageID=209647
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>