Thanks very much Kevin and Jeremy for hints!

I investigate further this aspect and it appears that OpenJPA tries to use 
first load time weaver. I see the message in log if the feature isn't available:

openjpa.Runtime - An error occurred while registering a ClassTransformer with 
PersistenceUnitInfo: name 'myUnit', root URL [bundleresource://59/]. The error 
has been consumed. To see it, set your openjpa.Runtime log level to TRACE. 
Load-time class transformation will not be available.

Thierry

> Hi Thierry,
> 
> I did not see this in the blog post that Kevin referred to,
> but it may be helpful as well.  You can explicitly turn off
> OpenJPA's subclassing-based enhancement by specifying this
> option in your persistence.xml:
> 
>           <property
> name="openjpa.RuntimeUnenhancedClasses"
> value="unsupported"/>
> 
> If your app is configured properly, classes (which are not
> pre-enhanced) should get enhanced by the enhancer agent.  But, if
> there are those that are not, subclassing will not occur and OpenJPA 
> will throw an exception stating that an entity was not enhanced.
> 
> hth,
> 
> -Jeremy


  

Reply via email to