openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <>
Subject JPQLExpressionBuilder uses wrong classloader
Date Thu, 28 Dec 2006 01:34:52 GMT
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  

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?


View raw message