openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <>
Subject Re: @Externalizer in 1.0.1 does not work on persist
Date Fri, 03 Jun 2011 17:47:39 GMT

infinity2heaven wrote:
> Runtime:
> I get a classCast for my entity Foo.
> java.lang.ClassCastException:
> org.apache.openjpa.enhance.ReflectingPersistenceCapable incompatible with
> xxx.entity.Foo

The runtime subclassing enhancer didn't run for Foo. If you enable trace
(openjpa.Log=DefaultLevel=TRACE) the classes which are enhanced should be

infinity2heaven wrote:
> Build-time:
> App doesn't load.
> java.lang.NoSuchMethodError: xxx/BaseEntity.pcGetManagedFieldCount()I
> 	at xxx.entity.ProfileLoadError.<clinit>(
> 	at java.lang.J9VMInternals.initializeImpl(Native Method)
> 	at java.lang.J9VMInternals.initialize(
> 	at java.lang.Class.forNameImpl(Native Method)
> 	at java.lang.Class.forName(

This time it's BaseEntity that didn't get enhanced. The persistence.xml
lists xxxx.jpa.BaseEntity, but in this message it's just xxx/BateEntity.
It's probably just the way you copied in the stack, but it might be worth
making sure that they match. 

Enabling trace in this case may also help. You probably only need to enable
trace for the enhancer though : 
openjpa.Log=Enhance=TRACE,MetaData=TRACE should be a good start. 


View this message in context:
Sent from the OpenJPA Developers mailing list archive at

View raw message