openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From infinity2heaven <infinity2hea...@gmail.com>
Subject Re: @Externalizer in 1.0.1 does not work on persist
Date Fri, 03 Jun 2011 17:10:34 GMT
I get two very different errors when using the default RuntimeEnhancement and
using build-time enhancements:

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

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)

My persistence.xml
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
	http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
	version="1.0">

	<persistence-unit name="tcms-profile" transaction-type="RESOURCE_LOCAL" >
	
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

		<class>xxx.jpa.BaseEntity</class>
        <class>xxx.entity.Foo</class>
		<class>xxx.entity.ProfileAudit</class>
		<class>xxx.entity.ProfileAuditDetail</class>
		
		<properties>
			<property name="openjpa.jdbc.Schema" value="xyz"/>
		</properties>
	</persistence-unit>
</persistence>

What am I missing?

Really. Two different errors based on openjpa's "enhancement." 

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

Mime
View raw message