openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <>
Subject Re: JPQLExpressionBuilder uses wrong classloader
Date Thu, 28 Dec 2006 01:38:53 GMT
Also it appears that the Broker be loading classes from the thread  
context class loader when persist is called.


On Dec 27, 2006, at 5:34 PM, Dain Sundstrom wrote:

> I've been working on a getting JPA runtime enhancement and have run  
> into a problem where OpenJPA is loading my classes from the wrong  
> class loader.  When I create a persistence unit info it supplies a  
> specific class loader for OpenJPA to use when resolving application  
> classes.  When I execute a query the JPQLExpressionBuilder simply  
> uses getClass().getClassLoader() to load classes.  In my case this  
> is the system class loader which contains unenhanced classes and  
> not the class loader for the persistence unit which has properly  
> enhanced classes.
> It is my understand that OpenJPA should use the class loader  
> obtained from the PersistenceUnitInfo for all class loading.  Is  
> this correct?
> If that is correct, is this a bug in OpenJPA?
> -dain

View raw message