openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dick <michael.d.d...@gmail.com>
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
printed. 


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

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. 

-mike

--
View this message in context: http://openjpa.208410.n2.nabble.com/Externalizer-in-1-0-1-does-not-work-on-persist-tp216632p6436221.html
Sent from the OpenJPA Developers mailing list archive at Nabble.com.

Mime
View raw message