It seems most of these classloader issues involves
something like:

ClassLoader save =
Thread.currentThread().getContextClassLoader();

try
{
Thread.currentThread().setContextClassLoader(someClassLoaderYouNeedToUseToLoadAClass);

.. do code
}
finally
{
  Thread.currentThread().setContextClassLoader(save);
}


Not sure if that is what Scott is referring to, maybe
not, but I am seeing this more and more. I have a
similar issue with my own plugin engine where some
plugin code may use a library that uses the context
classloader and expects it to be a specific loader,
but instead it gets the plugin classloader instance.
To circumvent this, a plugin has to set the context
loader first, call the code, then restore the context
loader. Libraries like xerces make use of this I
believe.



--- "Lynch, Jim" <[EMAIL PROTECTED]> wrote:
> 
>       I'm trying to get hibernate to work within jboss. 
> hibernate is
> loaded through a properties file.  I create the
> Configuration file and add
> the class to the configuration by calling...
> 
>       
>
configration.addClass(Thread.currentThread().getContextClassLoader().loadCla
> ss(className);
> 
>       when I call session.load(className,int), jboss is
> telling me no
> persister found for class.
> 
>       Hibernate loads the class fine.  I can see the
> mappings being loaded
> in the jboss log.  I'm pretty sure it's a
> classLoader problem but...??
> 
>       ideas/suggestions??
> 
> 
> 
> 
> 
> 
>
-------------------------------------------------------
> This SF.Net email sponsored by: Free pre-built
> ASP.NET sites including
> Data Reports, E-commerce, Portals, and Forums are
> available now.
> Download today and enter to win an XBOX or Visual
> Studio .NET.
>
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/jboss-user


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to