tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Karsten.O...@t-systems.com>
Subject RE: OpenEJB - Missing required persistence.xml
Date Thu, 14 Feb 2008 14:29:42 GMT
Thanks a lot again, I have now made one errors progress:

Now the problem seems to be that the entities in the database are not automatically created.
Is this possible or do I have to do it on my own?

Thanks,
Karsten

javax.ejb.EJBException: The bean encountered a non-application exception.; nested exception
is: 
	<openjpa-1.0.1-r420667:592145 nonfatal user error> org.apache.openjpa.persistence.ArgumentException:
Table 'tpg-server.strecke' doesn't exist {prepstmnt 5511938 SELECT t0.id, t0.name FROM strecke
t0 WHERE (t0.name = ?) [params=(String) Meine Strecke]} [code=1146, state=42S02]
	at org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:366)
	at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:251)
	at org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
	at $Proxy29.findStrecke(Unknown Source)
	at foo.bar.testfacade.TestFacadeImplOpenEJBTest.testFindStrecke(TestFacadeImplOpenEJBTest.java:108)
	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.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
	at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
	at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
	at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
	at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
	at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
	at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: <openjpa-1.0.1-r420667:592145 nonfatal user error> org.apache.openjpa.persistence.ArgumentException:
Table 'tpg-server.strecke' doesn't exist {prepstmnt 5511938 SELECT t0.id, t0.name FROM strecke
t0 WHERE (t0.name = ?) [params=(String) Meine Strecke]} [code=1146, state=42S02]
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:851)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:773)
	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:525)
	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:237)
	at org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:300)
	at foo.bar.testfacade.TestFacadeImpl.findStrecke(TestFacadeImpl.java:40)
	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.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:146)
	at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:129)
	at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
	at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:210)
	at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
	at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
	at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
	at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
	at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:245)
	... 25 more
Caused by: java.lang.Exception: org.apache.openjpa.lib.jdbc.ReportingSQLException: Table 'tpg-server.strecke'
doesn't exist {prepstmnt 5511938 SELECT t0.id, t0.name FROM strecke t0 WHERE (t0.name = ?)
[params=(String) Meine Strecke]} [code=1146, state=42S02]
	at org.apache.openjpa.util.Exceptions.replaceNestedThrowables(Exceptions.java:242)
	at org.apache.openjpa.persistence.ArgumentException.writeObject(ArgumentException.java:107)
	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 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:917)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1339)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
	at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1375)
	at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1347)
	at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1290)
	at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1079)
	at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
	at org.apache.openejb.core.ivm.BaseEjbProxyHandler.copyObj(BaseEjbProxyHandler.java:508)
	at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:250)
	... 25 more


Apache OpenEJB 3.0-beta-2    build: 20080131-03:38
http://openejb.apache.org/
INFO - openejb.home = C:\workspace\TestFacade\target
INFO - openejb.base = C:\workspace\TestFacade\target
WARN - Cannot find the configuration file [conf/openejb.xml].  Will attempt to create one
for the beans deployed.
INFO - Configuring Service(id=Default Security Service, type=SecurityService, provider-id=Default
Security Service)
INFO - Configuring Service(id=Default Transaction Manager, type=TransactionManager, provider-id=Default
Transaction Manager)
INFO - Configuring Service(id=MySqlDatabase, type=Resource, provider-id=Default JDBC Database)
INFO - Configuring Service(id=Default JDK 1.3 ProxyFactory, type=ProxyFactory, provider-id=Default
JDK 1.3 ProxyFactory)
INFO - Found EjbModule in classpath: C:\workspace\TestFacade\target\classes
INFO - Configuring app: C:\workspace\TestFacade\target\classes
INFO - Configuring Service(id=Default Stateless Container, type=Container, provider-id=Default
Stateless Container)
INFO - Auto-creating a container for bean TestFacadeImpl: Container(type=STATELESS, id=Default
Stateless Container)
INFO - Configuring PersistenceUnit(name=testFacadePu, provider=null)
INFO - Loaded Module: C:\workspace\TestFacade\target\classes
INFO - Assembling app: C:\workspace\TestFacade\target\classes
INFO - PersistenceUnit(name=testFacadePu, provider=null)
INFO - Jndi(name=TestFacadeImplRemote) --> Ejb(deployment-id=TestFacadeImpl)
INFO - Created Ejb(deployment-id=TestFacadeImpl, ejb-name=TestFacadeImpl, container=Default
Stateless Container)
INFO - Deployed Application(path=C:\workspace\TestFacade\target\classes)
INFO - OpenEJB ready.
OpenEJB ready.
WARN - Unexpected exception from beforeCompletion; transaction will roll back
<openjpa-1.0.1-r420667:592145 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
null
	at org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.getConnection(AbstractJDBCSeq.java:162)
	at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.allocateSequence(TableJDBCSeq.java:366)
	at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.nextInternal(TableJDBCSeq.java:266)
	at org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.next(AbstractJDBCSeq.java:60)
	at org.apache.openjpa.util.ImplHelper.generateValue(ImplHelper.java:160)
	at org.apache.openjpa.util.ImplHelper.generateFieldValue(ImplHelper.java:144)
	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignField(JDBCStoreManager.java:557)
	at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:450)
	at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:426)
	at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:541)
	at org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134)
	at org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:501)
	at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2770)
	at org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39)
	at org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:940)
	at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1892)
	at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1852)
	at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1770)
	at org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)
	at org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)
	at org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)
	at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)
	at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:245)
	at org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:141)
	at org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75)
	at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:233)
	at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
	at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
	at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
	at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
	at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:245)
	at org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
	at $Proxy29.persistStrecke(Unknown Source)
	at foo.bar.testfacade.TestFacadeImplOpenEJBTest.testPersistStrecke(TestFacadeImplOpenEJBTest.java:103)
	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.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
	at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
	at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
	at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
	at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
	at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
	at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
	at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
	at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
	at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
	at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
	at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: javax.transaction.SystemException
	at org.apache.openjpa.ee.RegistryManagedRuntime$TransactionManagerRegistryFacade.suspend(RegistryManagedRuntime.java:176)
	at org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.getConnection(AbstractJDBCSeq.java:158)
	... 55 more

Mime
View raw message