openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <d...@iq80.com>
Subject Re: Do mapped superclasses work at all in OpenJPA?
Date Tue, 13 Feb 2007 17:17:26 GMT
I found the problem.  In my entity mappings file, I had a mapping for  
a bean that no longer exists.  When I comment out that mapping, the  
problem goes away.  I only fond the problem by turning the debug  
level up  (the full log is attached).  In the log we do warn that the  
class was not found, but we say we are going to ignore it:

299  CMP  WARN   [main] openjpa.MetaData - The class  
"openejb.org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideBean 
" listed in the openjpa.MetaDataFactory configuration property could  
not be loaded; ignoring.

But later we get a transformation exception due to the missing class:

1243  CMP  WARN   [main] openjpa.Enhance - An exception was thrown  
while attempting to perform class file transformation on  
"org.apache.openejb.test.entity.cmp.BasicCmpBean":
<0|false|0.9.7-incubating-SNAPSHOT>  
org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException:  
file:/Users/dain/work/openejb/trunk/openejb3/container/openejb-core/ 
target/test-classes/META-INF/jpa-test-mappings.xml [Location: Line:  
45, C: 118]: Type  
"openejb.org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideBean 
" could not be instantiated.


I think we should either ignore the missing class everywhere or throw  
an exception on the first time we notice the missing class (I prefer  
the former).

Secondly, are we parsing the XML file multiple times?  The only way  
for the first warning to be fired is if OpenJPA has read my entity  
mappings, but the exception that is thrown later is a SAX exception  
which implies that OpenJPA is reading the file again.

The full log follows this email.

Thanks for the help,

-dain



/System/Library/Frameworks/JavaVM.framework/Versions/1.5/Home/bin/ 
java -javaagent:target/openejb-javaagent-3.0-incubating-SNAPSHOT.jar - 
Dopenejb.home=target/test-classes/ -Dfile.encoding=MacRoman - 
classpath /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/ 
Home/lib/deploy.jar:/System/Library/Frameworks/JavaVM.framework/ 
Versions/1.5.0/Classes/dt.jar:/System/Library/Frameworks/ 
JavaVM.framework/Versions/1.5.0/Classes/jce.jar:/System/Library/ 
Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/plugin.jar:/ 
System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/sa- 
jdi.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/ 
Classes/charsets.jar:/System/Library/Frameworks/JavaVM.framework/ 
Versions/1.5.0/Classes/classes.jar:/System/Library/Frameworks/ 
JavaVM.framework/Versions/1.5.0/Classes/jconsole.jar:/System/Library/ 
Frameworks/JavaVM.framework/Versions/1.5.0/Classes/jsse.jar:/System/ 
Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/laf.jar:/ 
System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Classes/ 
ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/ 
Home/lib/ext/apple_provider.jar:/System/Library/Frameworks/ 
JavaVM.framework/Versions/1.5.0/Home/lib/ext/dnsns.jar:/System/ 
Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home/lib/ext/ 
localedata.jar:/System/Library/Frameworks/JavaVM.framework/Versions/ 
1.5.0/Home/lib/ext/sunjce_provider.jar:/Users/dain/work/openejb/trunk/ 
openejb3/examples/helloworld-stateful-pojo/target/test-classes:/Users/ 
dain/work/openejb/trunk/openejb3/examples/helloworld-stateful-pojo/ 
target/classes:/Users/dain/.m2/repository/junit/junit/3.8.1/ 
junit-3.8.1.jar:/Users/dain/.m2/repository/org/apache/geronimo/specs/ 
geronimo-interceptor_3.0_spec/1.0-SNAPSHOT/geronimo- 
interceptor_3.0_spec-1.0-SNAPSHOT.jar:/Users/dain/work/openejb/trunk/ 
openejb3/container/openejb-jee/target/test-classes:/Users/dain/work/ 
openejb/trunk/openejb3/container/openejb-jee/target/classes:/Users/ 
dain/.m2/repository/stax/stax-api/1.0/stax-api-1.0.jar:/Users/ 
dain/.m2/repository/javax/activation/activation/1.1/ 
activation-1.1.jar:/Users/dain/.m2/repository/junit/junit/4.1/ 
junit-4.1.jar:/Users/dain/.m2/repository/com/sun/xml/bind/jaxb-impl/ 
2.0.3/jaxb-impl-2.0.3.jar:/Users/dain/.m2/repository/javax/xml/bind/ 
jsr173_api/1.0/jsr173_api-1.0.jar:/Users/dain/.m2/repository/javax/ 
xml/bind/jaxb-api/2.0/jaxb-api-2.0.jar:/Users/dain/.m2/repository/org/ 
apache/geronimo/specs/geronimo-activation_1.1_spec/1.0-M1/geronimo- 
activation_1.1_spec-1.0-M1.jar:/Users/dain/.m2/repository/org/apache/ 
xbean/xbean-finder/2.9-SNAPSHOT/xbean-finder-2.9-SNAPSHOT.jar:/Users/ 
dain/.m2/repository/commons-collections/commons-collections/3.1/ 
commons-collections-3.1.jar:/Users/dain/.m2/repository/oro/oro/2.0.8/ 
oro-2.0.8.jar:/Users/dain/work/openejb/trunk/openejb3/container/ 
openejb-core/target/test-classes:/Users/dain/work/openejb/trunk/ 
openejb3/container/openejb-core/target/classes:/Users/dain/.m2/ 
repository/commons-logging/commons-logging/1.0.4/commons- 
logging-1.0.4.jar:/Users/dain/.m2/repository/log4j/log4j/1.2.12/ 
log4j-1.2.12.jar:/Users/dain/.m2/repository/regexp/regexp/1.3/ 
regexp-1.3.jar:/Users/dain/.m2/repository/commons-primitives/commons- 
primitives/1.0/commons-primitives-1.0.jar:/Users/dain/.m2/repository/ 
commons-logging/commons-logging-api/1.0.4/commons-logging- 
api-1.0.4.jar:/Users/dain/.m2/repository/antlr/antlr/2.7.2/ 
antlr-2.7.2.jar:/Users/dain/work/openejb/trunk/openejb3/container/ 
openejb-loader/target/test-classes:/Users/dain/work/openejb/trunk/ 
openejb3/container/openejb-loader/target/classes:/Users/dain/.m2/ 
repository/org/apache/geronimo/specs/geronimo-servlet_2.5_spec/1.1-M1/ 
geronimo-servlet_2.5_spec-1.1-M1.jar:/Users/dain/.m2/repository/cglib/ 
cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar:/Users/dain/.m2/repository/ 
xerces/xercesImpl/2.4.0/xercesImpl-2.4.0.jar:/Users/dain/.m2/ 
repository/asm/asm-tree/2.2.3/asm-tree-2.2.3.jar:/Users/dain/.m2/ 
repository/asm/asm/2.2.3/asm-2.2.3.jar:/Users/dain/.m2/repository/asm/ 
asm-commons/2.2.3/asm-commons-2.2.3.jar:/Users/dain/.m2/repository/ 
org/apache/derby/derby/10.2.1.6/derby-10.2.1.6.jar:/Users/dain/.m2/ 
repository/org/springframework/spring/2.0/spring-2.0.jar:/Users/dain/ 
work/openejb/trunk/openejb3/itests/openejb-itests-beans/target/test- 
classes:/Users/dain/work/openejb/trunk/openejb3/itests/openejb-itests- 
beans/target/classes:/Users/dain/.m2/repository/ant/ant/1.6.5/ 
ant-1.6.5.jar:/Users/dain/.m2/repository/commons-lang/commons-lang/ 
2.1/commons-lang-2.1.jar:/Users/dain/.m2/repository/xerces/xercesImpl/ 
2.6.2/xercesImpl-2.6.2.jar:/Users/dain/.m2/repository/javax/ 
persistence/persistence-api/1.0/persistence-api-1.0.jar:/Users/ 
dain/.m2/repository/net/sourceforge/serp/serp/1.11.0/serp-1.11.0.jar:/ 
Users/dain/.m2/repository/commons-collections/commons-collections/3.2/ 
commons-collections-3.2.jar:/Users/dain/.m2/repository/commons-pool/ 
commons-pool/1.3/commons-pool-1.3.jar:/Users/dain/.m2/repository/ 
xerces/xmlParserAPIs/2.2.1/xmlParserAPIs-2.2.1.jar:/Users/dain/.m2/ 
repository/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar:/Users/dain/.m2/ 
repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/1.1/ 
geronimo-jms_1.1_spec-1.1.jar:/Users/dain/.m2/repository/org/apache/ 
geronimo/specs/geronimo-j2ee-connector_1.5_spec/1.1/geronimo-j2ee- 
connector_1.5_spec-1.1.jar:/Users/dain/.m2/repository/org/apache/ 
geronimo/specs/geronimo-jta_1.1_spec/1.0/geronimo- 
jta_1.1_spec-1.0.jar:/Users/dain/.m2/repository/org/apache/geronimo/ 
specs/geronimo-annotation_1.0_spec/1.0/geronimo- 
annotation_1.0_spec-1.0.jar:/Users/dain/.m2/repository/org/apache/ 
geronimo/specs/geronimo-ejb_3.0_spec/1.0/geronimo- 
ejb_3.0_spec-1.0.jar:/Users/dain/.m2/repository/org/apache/openjpa/ 
openjpa-jdbc-5/0.9.7-incubating-SNAPSHOT/openjpa-jdbc-5-0.9.7- 
incubating-SNAPSHOT.jar:/Users/dain/.m2/repository/org/apache/openjpa/ 
openjpa-jdbc/0.9.7-incubating-SNAPSHOT/openjpa-jdbc-0.9.7-incubating- 
SNAPSHOT.jar:/Users/dain/.m2/repository/org/apache/openjpa/openjpa- 
kernel/0.9.7-incubating-SNAPSHOT/openjpa-kernel-0.9.7-incubating- 
SNAPSHOT.jar:/Users/dain/.m2/repository/org/apache/openjpa/openjpa- 
lib/0.9.7-incubating-SNAPSHOT/openjpa-lib-0.9.7-incubating- 
SNAPSHOT.jar:/Users/dain/.m2/repository/org/apache/openjpa/openjpa- 
persistence/0.9.7-incubating-SNAPSHOT/openjpa-persistence-0.9.7- 
incubating-SNAPSHOT.jar:/Users/dain/.m2/repository/org/apache/openjpa/ 
openjpa-persistence-jdbc/0.9.7-incubating-SNAPSHOT/openjpa- 
persistence-jdbc-0.9.7-incubating-SNAPSHOT.jar:/Users/dain/.m2/ 
repository/org/apache/openjpa/openjpa-kernel-5/0.9.7-incubating- 
SNAPSHOT/openjpa-kernel-5-0.9.7-incubating-SNAPSHOT.jar:/Users/dain/ 
work/openejb/trunk/openejb3/itests/openejb-itests-app/target/test- 
classes:/Users/dain/work/openejb/trunk/openejb3/itests/openejb-itests- 
app/target/classes:/Users/dain/work/openejb/trunk/openejb3/itests/ 
openejb-itests-client/target/test-classes:/Users/dain/work/openejb/ 
trunk/openejb3/itests/openejb-itests-client/target/classes:/Users/ 
dain/.m2/repository/activemq/jmdns/1.0-RC2/jmdns-1.0-RC2.jar:/Users/ 
dain/.m2/repository/idb/idb/3.26/idb-3.26.jar:/Users/dain/.m2/ 
repository/backport-util-concurrent/backport-util-concurrent/2.1/ 
backport-util-concurrent-2.1.jar:/Users/dain/.m2/repository/commons- 
dbcp/commons-dbcp/1.2.1/commons-dbcp-1.2.1.jar:/Users/dain/.m2/ 
repository/commons-pool/commons-pool/1.2/commons-pool-1.2.jar:/Users/ 
dain/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:/ 
Users/dain/.m2/repository/org/apache/geronimo/specs/geronimo- 
jaxrpc_1.1_spec/1.1/geronimo-jaxrpc_1.1_spec-1.1.jar:/Users/dain/.m2/ 
repository/org/apache/geronimo/specs/geronimo-j2ee- 
deployment_1.1_spec/1.1/geronimo-j2ee-deployment_1.1_spec-1.1.jar:/ 
Users/dain/work/openejb/trunk/openejb3/container/openejb-javaagent/ 
target/test-classes:/Users/dain/work/openejb/trunk/openejb3/container/ 
openejb-javaagent/target/classes:/Users/dain/.m2/repository/org/ 
apache/xbean/xbean-reflect/2.8/xbean-reflect-2.8.jar:/Users/dain/.m2/ 
repository/org/apache/geronimo/specs/geronimo-jpa_3.0_spec/1.0/ 
geronimo-jpa_3.0_spec-1.0.jar:/Users/dain/.m2/repository/org/apache/ 
xbean/xbean-naming/2.8/xbean-naming-2.8.jar:/Users/dain/.m2/ 
repository/org/apache/geronimo/specs/geronimo-j2ee- 
management_1.1_spec/1.0-M1/geronimo-j2ee-management_1.1_spec-1.0- 
M1.jar:/Users/dain/.m2/repository/org/tranql/tranql/1.4.1/ 
tranql-1.4.1.jar:/Users/dain/.m2/repository/org/apache/geronimo/specs/ 
geronimo-interceptor_3.0_spec/1.0/geronimo- 
interceptor_3.0_spec-1.0.jar:/Users/dain/.m2/repository/org/codehaus/ 
swizzle/swizzle-stream/1.0.1/swizzle-stream-1.0.1.jar:/Users/dain/.m2/ 
repository/mx4j/mx4j/3.0.1/mx4j-3.0.1.jar:/Users/dain/.m2/repository/ 
org/apache/geronimo/modules/geronimo-kernel/2.0-SNAPSHOT/geronimo- 
kernel-2.0-SNAPSHOT.jar:/Users/dain/.m2/repository/org/apache/ 
geronimo/modules/geronimo-connector/2.0-SNAPSHOT/geronimo- 
connector-2.0-SNAPSHOT.jar:/Users/dain/.m2/repository/org/apache/ 
geronimo/modules/geronimo-transaction/2.0-SNAPSHOT/geronimo- 
transaction-2.0-SNAPSHOT.jar:/Users/dain/.m2/repository/xstream/ 
xstream/1.1.3/xstream-1.1.3.jar:/Users/dain/.m2/repository/xpp3/ 
xpp3/1.1.3.3/xpp3-1.1.3.3.jar:/Users/dain/.m2/repository/org/apache/ 
geronimo/specs/geronimo-jacc_1.1_spec/1.0-M2/geronimo- 
jacc_1.1_spec-1.0-M2.jar:/Users/dain/.m2/repository/org/codehaus/ 
castor/castor/1.0.5/castor-1.0.5.jar:/Users/dain/.m2/repository/org/ 
apache/activemq/activemq-core/4.1.0-incubator/activemq-core-4.1.0- 
incubator.jar:/Users/dain/.m2/repository/org/apache/activemq/activemq- 
ra/4.1.0-incubator/activemq-ra-4.1.0-incubator.jar:/Users/dain/.m2/ 
repository/org/apache/geronimo/specs/geronimo-jta_1.1_spec/1.0- 
SNAPSHOT/geronimo-jta_1.1_spec-1.0-SNAPSHOT.jar:/Users/dain/.m2/ 
repository/org/apache/geronimo/specs/geronimo-ejb_3.0_spec/1.0- 
SNAPSHOT/geronimo-ejb_3.0_spec-1.0-SNAPSHOT.jar:/Users/dain/.m2/ 
repository/org/apache/geronimo/specs/geronimo-annotation_1.0_spec/1.0- 
SNAPSHOT/geronimo-annotation_1.0_spec-1.0-SNAPSHOT.jar:/Users/ 
dain/.m2/repository/org/apache/geronimo/specs/geronimo-jms_1.1_spec/ 
1.0/geronimo-jms_1.1_spec-1.0.jar:/Users/dain/.m2/repository/hsqldb/ 
hsqldb/1.8.0.1/hsqldb-1.8.0.1.jar:/Applications/IntelliJ IDEA  
5.1.1.app/lib/idea_rt.jar  
com.intellij.rt.execution.junit2.JUnitStarter -ideVersion5  
org.apache.openejb.core.cmp.jpa.JpaTest
124  CMP  INFO   [main] openjpa.MetaData - Found 4 classes with  
metadata in 11 milliseconds.
92  CMP  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.9.7- 
incubating-SNAPSHOT
135  CMP  INFO   [main] openjpa.jdbc.JDBC - OpenJPA will now connect  
to the database to attempt to determine what type of database  
dictionary to use.  To prevent this connection in the future, set  
your openjpa.jdbc.DBDictionary configuration property to the  
appropriate value for your database (see the documentation for  
available values).
195  CMP  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class  
"org.apache.openjpa.jdbc.sql.HSQLDictionary" (HSQL Database Engine  
1.8.0 ,HSQL Database Engine Driver 1.8.0).
297  CMP  INFO   [main] openjpa.MetaData - Found 4 classes with  
metadata in 5 milliseconds.
299  CMP  WARN   [main] openjpa.MetaData - The class  
"openejb.org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideBean 
" listed in the openjpa.MetaDataFactory configuration property could  
not be loaded; ignoring.
Loading org/apache/openejb/test/entity/cmp/BasicCmpBean
661  CMP  INFO   [main] openjpa.MetaData - Parsing resource "file:/ 
Users/dain/work/openejb/trunk/openejb3/container/openejb-core/target/ 
test-classes/META-INF/jpa-test-mappings.xml".
1177  CMP  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openejb.test.entity.cmp.BasicCmpBean".
1212  CMP  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openejb.test.entity.cmp.BasicCmpBean".
1213  CMP  INFO   [main] openjpa.MetaData - Parsing package  
"org.apache.openejb.test.entity.cmp.BasicCmpBean".
1230  CMP  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openejb.core.cmp.jpa.BasicCmpBean_Subclass".
1231  CMP  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openejb.core.cmp.jpa.BasicCmpBean_Subclass".
1232  CMP  INFO   [main] openjpa.MetaData - Parsing package  
"org.apache.openejb.core.cmp.jpa.BasicCmpBean_Subclass".
1243  CMP  WARN   [main] openjpa.Enhance - An exception was thrown  
while attempting to perform class file transformation on  
"org.apache.openejb.test.entity.cmp.BasicCmpBean":
<0|false|0.9.7-incubating-SNAPSHOT>  
org.apache.openjpa.util.GeneralException: org.xml.sax.SAXException:  
file:/Users/dain/work/openejb/trunk/openejb3/container/openejb-core/ 
target/test-classes/META-INF/jpa-test-mappings.xml [Location: Line:  
45, C: 118]: Type  
"openejb.org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideBean 
" could not be instantiated.
	at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML 
(PersistenceMetaDataFactory.java:233)
	at org.apache.openjpa.persistence.PersistenceMetaDataFactory.load 
(PersistenceMetaDataFactory.java:182)
	at org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal 
(MetaDataRepository.java:414)
	at org.apache.openjpa.meta.MetaDataRepository.getMetaData 
(MetaDataRepository.java:272)
	at org.apache.openjpa.enhance.PCEnhancer.<init>(PCEnhancer.java:185)
	at org.apache.openjpa.enhance.PCClassFileTransformer.transform 
(PCClassFileTransformer.java:124)
	at org.apache.openjpa.persistence.PersistenceProviderImpl 
$ClassTransformerImpl.transform(PersistenceProviderImpl.java:140)
	at org.apache.openejb.persistence.PersistenceUnitInfoImpl 
$PersistenceClassFileTransformer.transform 
(PersistenceUnitInfoImpl.java:259)
	at sun.instrument.TransformerManager.transform 
(TransformerManager.java:122)
	at sun.instrument.InstrumentationImpl.transform 
(InstrumentationImpl.java:155)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at java.security.SecureClassLoader.defineClass 
(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:242)
	at org.apache.openjpa.meta.MetaDataRepository.classForName 
(MetaDataRepository.java:1226)
	at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypes 
(MetaDataRepository.java:1214)
	at  
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings 
(JDBCBrokerFactory.java:145)
	at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl 
(JDBCBrokerFactory.java:127)
	at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker 
(AbstractBrokerFactory.java:165)
	at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker 
(DelegatingBrokerFactory.java:139)
	at  
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMana 
ger(EntityManagerFactoryImpl.java:187)
	at  
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMana 
ger(EntityManagerFactoryImpl.java:140)
	at  
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMana 
ger(EntityManagerFactoryImpl.java:52)
	at org.apache.openejb.core.cmp.jpa.JpaTestObject.createEntityManager 
(JpaTestObject.java:279)
	at org.apache.openejb.core.cmp.jpa.JpaTestObject.beginTx 
(JpaTestObject.java:286)
	at org.apache.openejb.core.cmp.jpa.JpaTestObject.jpaLifecycle 
(JpaTestObject.java:119)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.openejb.core.cmp.jpa.JpaTest.invoke(JpaTest.java:192)
	at org.apache.openejb.core.cmp.jpa.JpaTest.testJta(JpaTest.java:106)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at junit.textui.TestRunner.doRun(TestRunner.java:116)
	at com.intellij.rt.execution.junit2.IdeaJUnitAgent.doRun 
(IdeaJUnitAgent.java:58)
	at junit.textui.TestRunner.start(TestRunner.java:172)
	at  
com.intellij.rt.execution.junit.TextTestRunner2.startRunnerWithArgs 
(TextTestRunner2.java:23)
	at  
com.intellij.rt.execution.junit2.JUnitStarter.prepareStreamsAndStart 
(JUnitStarter.java:98)
	at com.intellij.rt.execution.junit2.JUnitStarter.main 
(JUnitStarter.java:32)
Caused by: java.io.IOException: org.xml.sax.SAXException: file:/Users/ 
dain/work/openejb/trunk/openejb3/container/openejb-core/target/test- 
classes/META-INF/jpa-test-mappings.xml [Location: Line: 45, C: 118]:  
Type  
"openejb.org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideBean 
" could not be instantiated.
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource 
(XMLMetaDataParser.java:373)
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
(XMLMetaDataParser.java:312)
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
(XMLMetaDataParser.java:289)
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.parse 
(XMLMetaDataParser.java:263)
	at org.apache.openjpa.persistence.PersistenceMetaDataFactory.parseXML 
(PersistenceMetaDataFactory.java:231)
	... 59 more
Caused by: org.xml.sax.SAXException: file:/Users/dain/work/openejb/ 
trunk/openejb3/container/openejb-core/target/test-classes/META-INF/ 
jpa-test-mappings.xml [Location: Line: 45, C: 118]: Type  
"openejb.org.apache.openejb.test.entity.cmr.cmrmapping.OneOwningSideBean 
" could not be instantiated.
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.getException 
(XMLMetaDataParser.java:649)
	at org.apache.openjpa.lib.meta.CFMetaDataParser.classForName 
(CFMetaDataParser.java:281)
	at  
org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.classForName 
(XMLPersistenceMetaDataParser.java:1664)
	at  
org.apache.openjpa.persistence.XMLPersistenceMetaDataParser.startClass 
(XMLPersistenceMetaDataParser.java:722)
	at org.apache.openjpa.lib.meta.CFMetaDataParser.startElement 
(CFMetaDataParser.java:102)
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.startElement 
(XMLMetaDataParser.java:426)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown  
Source)
	at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown  
Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement 
(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl 
$FragmentContentDispatcher.dispatch(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument 
(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
	at org.apache.openjpa.lib.meta.XMLMetaDataParser.parseNewResource 
(XMLMetaDataParser.java:370)
	... 63 more
1289  CMP  INFO   [main] openjpa.MetaData - Parsing class  
"javax.ejb.EntityContext".
1290  CMP  INFO   [main] openjpa.MetaData - Parsing package  
"javax.ejb.EntityContext".

java.lang.NoSuchMethodError:  
org.apache.openejb.test.entity.cmp.BasicCmpBean.pcGetManagedFieldCount 
()I
	at org.apache.openejb.core.cmp.jpa.BasicCmpBean_Subclass.<clinit> 
(BasicCmpBean_Subclass.java)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:242)
	at org.apache.openjpa.meta.MetaDataRepository.classForName 
(MetaDataRepository.java:1226)
	at org.apache.openjpa.meta.MetaDataRepository.loadPersistentTypes 
(MetaDataRepository.java:1214)
	at  
org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.synchronizeMappings 
(JDBCBrokerFactory.java:145)
	at org.apache.openjpa.jdbc.kernel.JDBCBrokerFactory.newBrokerImpl 
(JDBCBrokerFactory.java:127)
	at org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker 
(AbstractBrokerFactory.java:165)
	at org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker 
(DelegatingBrokerFactory.java:139)
	at  
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMana 
ger(EntityManagerFactoryImpl.java:187)
	at  
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMana 
ger(EntityManagerFactoryImpl.java:140)
	at  
org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityMana 
ger(EntityManagerFactoryImpl.java:52)
	at org.apache.openejb.core.cmp.jpa.JpaTestObject.createEntityManager 
(JpaTestObject.java:279)
	at org.apache.openejb.core.cmp.jpa.JpaTestObject.beginTx 
(JpaTestObject.java:286)
	at org.apache.openejb.core.cmp.jpa.JpaTestObject.jpaLifecycle 
(JpaTestObject.java:119)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
	at org.apache.openejb.core.cmp.jpa.JpaTest.invoke(JpaTest.java:192)
	at org.apache.openejb.core.cmp.jpa.JpaTest.testJta(JpaTest.java:106)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
	at com.intellij.rt.execution.junit2.JUnitStarter.main 
(JUnitStarter.java:32)



Mime
View raw message