geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Viet Hung Nguyen <vnguye...@uky.edu>
Subject Re: problem with changing the DB through an ejb
Date Wed, 18 Jul 2007 19:11:19 GMT
David Jencks wrote:
> try
>
>  <non-jta-data-source>NoTxDataSource</non-jta-data-source>
>
> DefaultDatasource is transactional, not non-jta :-)
>
> I think in the latest g source you can leave both these out and we 
> will fill them in for you... although I'm not sure I'd recommend that 
> level of "lack of control"
>
> thanks
> david jencks
>
> On Jul 16, 2007, at 9:32 AM, Viet Hung Nguyen wrote:
>
>> Hi Guys,
>>
>> I have an application that fetches data and is supposed to add 
>> records to some tables. Data retrieval is okay, but when I try to add 
>> information to the DB, I get the following stack trace.
>>
>> [INFO] 12:26:06,828 WARN  [GeronimoConnectionEventListener] 
>> connectionErrorOccurred called with null
>> [INFO] ERROR 42X05: Table/View 'OPENJPASEQ' does not exist.
>> [INFO]  at 
>> org.apache.derby.iapi.error.StandardException.newException(Unknown 
>> Source)
>> [INFO]  at 
>> org.apache.derby.impl.sql.compile.FromBaseTable.bindTableDescriptor(Unknown 
>> Source)
>> [INFO]  at 
>> org.apache.derby.impl.sql.compile.FromBaseTable.bindNonVTITables(Unknown 
>> Source)
>> [INFO]  at 
>> org.apache.derby.impl.sql.compile.FromList.bindTables(Unknown Source)
>> [INFO]  at 
>> org.apache.derby.impl.sql.compile.SelectNode.bindNonVTITables(Unknown 
>> Source)
>> [INFO]  at 
>> org.apache.derby.impl.sql.compile.DMLStatementNode.bindTables(Unknown 
>> Source)
>> [INFO]  at 
>> org.apache.derby.impl.sql.compile.DMLStatementNode.bind(Unknown Source)
>> [INFO]  at org.apache.derby.impl.sql.compile.CursorNode.bind(Unknown 
>> Source)
>> [INFO]  at 
>> org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
>> [INFO]  at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown 
>> Source)
>> [INFO]  at 
>> org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown

>> Source)
>> [INFO]  at 
>> org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
>> [INFO]  at 
>> org.apache.derby.impl.jdbc.EmbedPreparedStatement20.<init>(Unknown 
>> Source)
>> [INFO]  at 
>> org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown 
>> Source)
>> [INFO]  at 
>> org.apache.derby.jdbc.Driver30.newEmbedPreparedStatement(Unknown Source)
>> [INFO]  at 
>> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown 
>> Source)
>> [INFO]  at 
>> org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown 
>> Source)
>> [INFO]  at 
>> org.tranql.connector.jdbc.ConnectionHandle.prepareStatement(ConnectionHandle.java:231)

>>
>> [INFO]  at 
>> org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:165)

>>
>> [INFO]  at 
>> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDe

>>
>> corator.java:225)
>> [INFO]  at 
>> org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:163)

>>
>> [INFO]  at 
>> org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.prepareStatement(Configuring

>>
>> ConnectionDecorator.java:140)
>> [INFO]  at 
>> org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:152)

>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:474) 
>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:454) 
>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:443) 
>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.TableJDBCSeq.getSequence(TableJDBCSeq.java:420) 
>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.TableJDBCSeq.setSequence(TableJDBCSeq.java:464) 
>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.TableJDBCSeq.allocateSequence(TableJDBCSeq.java:324)

>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.TableJDBCSeq.nextInternal(TableJDBCSeq.java:228) 
>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.next(AbstractJDBCSeq.java:60) 
>>
>> [INFO]  at 
>> org.apache.openjpa.util.ImplHelper.generateValue(ImplHelper.java:132)
>> [INFO]  at 
>> org.apache.openjpa.util.ImplHelper.generateFieldValue(ImplHelper.java:116) 
>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignField(JDBCStoreManager.java:557)

>>
>> [INFO]  at 
>> org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:438)
>> [INFO]  at 
>> org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:423)
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:541)

>>
>> [INFO]  at 
>> org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134)

>>
>> [INFO]  at 
>> org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:474)

>>
>> [INFO]  at 
>> org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2673) 
>>
>> [INFO]  at 
>> org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39)
>> [INFO]  at 
>> org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:854)

>>
>> [INFO]  at 
>> org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1914)
>> [INFO]  at 
>> org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1874)
>> [INFO]  at 
>> org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1792) 
>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:238)

>>
>> [INFO]  at 
>> org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:139)

>>
>> [INFO]  at 
>> org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75) 
>>
>> [INFO]  at 
>> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:219)

>>
>> [INFO]  at 
>> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)

>>
>> [INFO]  at 
>> org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:211)

>>
>> [INFO]  at 
>> org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:65)

>>
>> [INFO]  at 
>> org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:306)

>>
>> [INFO]  at 
>> org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)

>>
>> [INFO]  at $Proxy45.addFund(Unknown Source)
>> [INFO]  at 
>> org.apache.jsp.persistence.entitymanager.addfund_jsp._jspService(addfund_jsp.java:80)

>>
>> [INFO]  at 
>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>> [INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:
>
>> 806)
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) 
>>
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>> [INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>> [INFO]  at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

>>
>> [INFO]  at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)

>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:351)

>>
>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
>>
>> [INFO]  at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 
>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

>>
>> [INFO]  at 
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) 
>>
>> [INFO]  at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) 
>>
>> [INFO]  at 
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 
>>
>> [INFO]  at 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)

>>
>> [INFO]  at 
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>> [INFO]  at java.lang.Thread.run(Thread.java:595)
>> [INFO] 12:26:06,843 WARN  [Transaction] Unexpected exception from 
>> beforeCompletion; transaction will roll back
>> [INFO] <1.0.0-SNAPSHOT-SNAPSHOT nonfatal general error> 
>> org.apache.openjpa.persistence.PersistenceException: Failed lazy
>> association with ManagedConnection
>> [INFO]  at 
>> org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:95) 
>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:67) 
>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:44) 
>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.closeConnection(AbstractJDBCSeq.java:203)

>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.TableJDBCSeq.allocateSequence(TableJDBCSeq.java:330)

>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.TableJDBCSeq.nextInternal(TableJDBCSeq.java:228) 
>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.next(AbstractJDBCSeq.java:60) 
>>
>> [INFO]  at 
>> org.apache.openjpa.util.ImplHelper.generateValue(ImplHelper.java:132)
>> [INFO]  at 
>> org.apache.openjpa.util.ImplHelper.generateFieldValue(ImplHelper.java:116) 
>>
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignField(JDBCStoreManager.java:557)

>>
>> [INFO]  at 
>> org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:438)
>> [INFO]  at 
>> org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:423)
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:541)

>>
>> [INFO]  at 
>> org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134)

>>
>> [INFO]  at 
>> org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:474)

>>
>> [INFO]  at 
>> org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2673) 
>>
>> [INFO]  at 
>> org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39)
>> [INFO]  at 
>> org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:854)

>>
>> [INFO]  at 
>> org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1914)
>> [INFO]  at 
>> org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1874)
>> [INFO]  at 
>> org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1792) 
>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:514)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:499)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:400)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:257)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:238)

>>
>> [INFO]  at 
>> org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:139)

>>
>> [INFO]  at 
>> org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75) 
>>
>> [INFO]  at 
>> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:219)

>>
>> [INFO]  at 
>> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)

>>
>> [INFO]  at 
>> org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:211)

>>
>> [INFO]  at 
>> org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:65)

>>
>> [INFO]  at 
>> org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:306)

>>
>> [INFO]  at 
>> org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)

>>
>> [INFO]  at $Proxy45.addFund(Unknown Source)
>> [INFO]  at 
>> org.apache.jsp.persistence.entitymanager.addfund_jsp._jspService(addfund_jsp.java:80)

>>
>> [INFO]  at 
>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>> [INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) 
>>
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>> [INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>> [INFO]  at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

>>
>> [INFO]  at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)

>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:351)

>>
>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
>>
>> [INFO]  at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 
>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

>>
>> [INFO]  at 
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) 
>>
>> [INFO]  at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) 
>>
>> [INFO]  at 
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 
>>
>> [INFO]  at 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)

>>
>> [INFO]  at 
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>> [INFO]  at java.lang.Thread.run(Thread.java:595)
>> [INFO] Caused by: java.sql.SQLException: Failed lazy association with 
>> ManagedConnection
>> [INFO]  at 
>> org.tranql.connector.jdbc.ConnectionHandle.getManagedConnection(ConnectionHandle.java:73)

>>
>> [INFO]  at 
>> org.tranql.connector.jdbc.ConnectionHandle.commit(ConnectionHandle.java:107) 
>>
>> [INFO]  at 
>> org.apache.openjpa.lib.jdbc.DelegatingConnection.commit(DelegatingConnection.java:204)

>>
>> [INFO]  at 
>> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.commit(LoggingConnectionDecorator.ja

>>
>> va:257)
>> [INFO]  at 
>> org.apache.openjpa.lib.jdbc.DelegatingConnection.commit(DelegatingConnection.java:204)

>>
>> [INFO]  at 
>> org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.commit(ConfiguringConnection

>>
>> Decorator.java:124)
>> [INFO]  at 
>> org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.closeConnection(AbstractJDBCSeq.java:201)

>>
>> [INFO]  ... 54 more
>> [INFO] 12:26:06,859 ERROR [Transaction] Unexpected exception rolling 
>> back org.apache.geronimo.connector.outbound.LocalXA
>> Resource@110b9b2; continuing with rollback
>> [INFO] javax.transaction.xa.XAException
>> [INFO]  at 
>> org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAResource.java:88)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(TransactionImpl.java:581)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:267)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:238)

>>
>> [INFO]  at 
>> org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:139)

>>
>> [INFO]  at 
>> org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75) 
>>
>> [INFO]  at 
>> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:219)

>>
>> [INFO]  at 
>> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)

>>
>> [INFO]  at 
>> org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:211)

>>
>> [INFO]  at 
>> org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:65)

>>
>> [INFO]  at 
>> org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:306)

>>
>> [INFO]  at 
>> org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)

>>
>> [INFO]  at $Proxy45.addFund(Unknown Source)
>> [INFO]  at 
>> org.apache.jsp.persistence.entitymanager.addfund_jsp._jspService(addfund_jsp.java:80)

>>
>> [INFO]  at 
>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>> [INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) 
>>
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>> [INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>> [INFO]  at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

>>
>> [INFO]  at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)

>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:351)

>>
>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
>>
>> [INFO]  at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 
>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

>>
>> [INFO]  at 
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) 
>>
>> [INFO]  at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) 
>>
>> [INFO]  at 
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 
>>
>> [INFO]  at 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)

>>
>> [INFO]  at 
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>> [INFO]  at java.lang.Thread.run(Thread.java:595)
>> [INFO] Caused by: javax.resource.spi.LocalTransactionException: 
>> Unable to rollback
>> [INFO]  at 
>> org.tranql.connector.jdbc.ManagedJDBCConnection.localTransactionRollback(ManagedJDBCConnection.java:113)

>>
>> [INFO]  at 
>> org.tranql.connector.AbstractManagedConnection$LocalTransactionImpl.rollback(AbstractManagedConnection.java:1

>>
>> 96)
>> [INFO]  at 
>> org.apache.geronimo.connector.outbound.LocalXAResource.rollback(LocalXAResource.java:86)

>>
>> [INFO]  ... 35 more
>> [INFO] Caused by: java.sql.SQLException: No current connection.
>> [INFO]  at 
>> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown 
>> Source)
>> [INFO]  at 
>> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>> [INFO]  at 
>> org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
>> [INFO]  at 
>> org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source)
>> [INFO]  at 
>> org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown Source)
>> [INFO]  at 
>> org.apache.derby.impl.jdbc.EmbedConnection.setupContextStack(Unknown 
>> Source)
>> [INFO]  at 
>> org.apache.derby.impl.jdbc.EmbedConnection.rollback(Unknown Source)
>> [INFO]  at 
>> org.tranql.connector.jdbc.ManagedJDBCConnection.localTransactionRollback(ManagedJDBCConnection.java:111)

>>
>> [INFO]  ... 37 more
>> [INFO] 12:26:06,890 ERROR [Transaction] The Transaction Manager has 
>> encountered an unexpected error condition while atte
>> mpting to commit the transaction: null
>> [INFO] 12:26:06,890 ERROR [OpenEJB] The container received an 
>> unexpected exception:
>> [INFO] javax.transaction.SystemException
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(TransactionImpl.java:585)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:267)

>>
>> [INFO]  at 
>> org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:238)

>>
>> [INFO]  at 
>> org.apache.openejb.core.transaction.TransactionPolicy.commitTransaction(TransactionPolicy.java:139)

>>
>> [INFO]  at 
>> org.apache.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:75) 
>>
>> [INFO]  at 
>> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:219)

>>
>> [INFO]  at 
>> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)

>>
>> [INFO]  at 
>> org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:211)

>>
>> [INFO]  at 
>> org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:65)

>>
>> [INFO]  at 
>> org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:306)

>>
>> [INFO]  at 
>> org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)

>>
>> [INFO]  at $Proxy45.addFund(Unknown Source)
>> [INFO]  at 
>> org.apache.jsp.persistence.entitymanager.addfund_jsp._jspService(addfund_jsp.java:80)

>>
>> [INFO]  at 
>> org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
>> [INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388) 
>>
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>> [INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>> [INFO]  at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

>>
>> [INFO]  at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)

>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:351)

>>
>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
>>
>> [INFO]  at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 
>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

>>
>> [INFO]  at 
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) 
>>
>> [INFO]  at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) 
>>
>> [INFO]  at 
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 
>>
>> [INFO]  at 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)

>>
>> [INFO]  at 
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>> [INFO]  at java.lang.Thread.run(Thread.java:595)
>> [INFO] 12:26:06,906 ERROR [[jsp]] Servlet.service() for servlet jsp 
>> threw exception
>> [INFO] org.apache.jasper.JasperException: Container has suffered a 
>> SystemException; nested exception is:
>> [INFO]  javax.transaction.SystemException
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432) 
>>
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
>> [INFO]  at 
>> org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
>> [INFO]  at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>> [INFO]  at 
>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)

>>
>> [INFO]  at 
>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)

>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)

>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:351)

>>
>>
>> [INFO]  at 
>> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)

>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) 
>>
>> [INFO]  at 
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) 
>>
>> [INFO]  at 
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)

>>
>> [INFO]  at 
>> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563) 
>>
>> [INFO]  at 
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261) 
>>
>> [INFO]  at 
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) 
>>
>> [INFO]  at 
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)

>>
>> [INFO]  at 
>> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>> [INFO]  at java.lang.Thread.run(Thread.java:595)
>>
>> I am using the embedded Derby DB and I have the following:
>>
>> ====persistence.xml====
>> <?xml version="1.0" encoding="UTF-8"?>
>> <persistence          xmlns="http://java.sun.com/xml/ns/persistence"
>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
>> version="1.0"
>>        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
>> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
>>    <persistence-unit name="ejb3trail">
>>        <description>EJB3 Trail</description>
>>        
>> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

>>
>>        <class>trail.entity.beans.Fund</class>
>>        <class>trail.entity.beans.Investor</class>
>>        <class>trail.entity.beans.Record</class>
>>        <class>trail.entity.beans.TimedRecord</class>
>>        <jta-data-source>DefaultDS</jta-data-source>
>>        <non-jta-data-source>DefaultDS</non-jta-data-source>
>>        <properties>
>>            <!-- I thought this would fix the problem -->
>>            <property name="openjpa.Sequence" 
>> value="table(Table=OPENJPASEQ,Increment=100)" />
>>            <property name="openjpa.jdbc.SynchronizeMappings" 
>> value="false" />
>>        </properties>
>>    </persistence-unit>
>> </persistence>
>>
>> ====snippet from EntityCalculator.java====
>> @Stateless
>> public class EntityCalculator implements Calculator {
>>
>>  @PersistenceContext (unitName="ejb3trail")
>>  protected EntityManager em;
>>
>>  public void addFund (String name, double growthrate) {
>>    Fund fund = new Fund (name, growthrate);
>>    em.persist (fund);
>>  }
>> ...
>> ...
>> ...
>>  public Collection<Fund> getFunds () {
>>    return em.createQuery("select f from Fund f").getResultList();
>>  }
>> }
>>
>> I thought by adding the property in comments to the persistence.xml, 
>> it would fix the problem with the table OPENJPASEQ not being found, 
>> but it did not.
>>
>> I would appreciate it if someone can tell me what I doing wrong or 
>> missing.
>>
>> Thanks in advance,
>> Viet Nguyen
>
>
I created a non-jta db pool (along with a jta db pool) with the 
following db-pool plan

<?xml version="1.0" encoding="UTF-8"?>
<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2">
    <dep:environment 
xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2">
        <dep:moduleId>
            <dep:groupId>console.dbpool</dep:groupId>
            <dep:artifactId>MyDS</dep:artifactId>
            <dep:version>1.0</dep:version>
            <dep:type>rar</dep:type>
        </dep:moduleId>
        <dep:dependencies>
            <dep:dependency>
                <dep:groupId>org.apache.geronimo.configs</dep:groupId>
                <dep:artifactId>system-database</dep:artifactId>
                <dep:type>car</dep:type>
            </dep:dependency>
        </dep:dependencies>
    </dep:environment>
    <resourceadapter>
        <outbound-resourceadapter>
            <connection-definition>
                
<connectionfactory-interface>javax.sql.DataSource</connectionfactory-interface>
                <connectiondefinition-instance>
                    <name>DefaultDS</name>
                    <config-property-setting 
name="Driver">org.apache.derby.jdbc.EmbeddedDriver</config-property-setting>
                    <config-property-setting 
name="UserName">app</config-property-setting>
                    <config-property-setting 
name="ConnectionURL">jdbc:derby:RecordDB</config-property-setting>
                    <connectionmanager>
                        <local-transaction/>
                        <single-pool>
                            <max-size>10</max-size>
                            <min-size>0</min-size>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>
                </connectiondefinition-instance>
                
                <connectiondefinition-instance>
                    <name>DefaultDS2</name>
                    <config-property-setting 
name="Driver">org.apache.derby.jdbc.EmbeddedDriver</config-property-setting>
                    <config-property-setting 
name="UserName">app</config-property-setting>
                    <config-property-setting 
name="ConnectionURL">jdbc:derby:RecordDB</config-property-setting>
                    <connectionmanager>
                        <no-transaction/>
                        <single-pool>
                            <max-size>10</max-size>
                            <min-size>0</min-size>
                            <match-one/>
                        </single-pool>
                    </connectionmanager>
                </connectiondefinition-instance>
            </connection-definition>
        </outbound-resourceadapter>
    </resourceadapter>
</connector>

I figure I would create my own dbpools because NoTxDatasource uses the 
SystemDatabase (I'm using something I made).

My *persistence.xml* has been changed to

<?xml version="1.0" encoding="UTF-8"?>
<persistence
        xmlns="http://java.sun.com/xml/ns/persistence"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"
        xsi:schemaLocation="http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="ejb3trail">
    
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>  

    <class>trail.entity.beans.Fund</class> 
    <class>trail.entity.beans.Investor</class> 
    <class>trail.entity.beans.Record</class> 
    <class>trail.entity.beans.TimedRecord</class> 
    <jta-data-source>DefaultDS</jta-data-source>
    <non-jta-data-source>DefaultDS2</non-jta-data-source>
    <properties>
      <property name="openjpa.jdbc.SynchronizeMappings" value="false"/>
    </properties>
  </persistence-unit>
</persistence>

I still get the same error. The only way I have gotten this to work is 
to take out

<property name="openjpa.jdbc.SynchronizeMappings" value="false"/>

but my db will be overwritten with this taken out.

I appreciate any help.

Thanks in advance,
Viet

Mime
View raw message