I tried this and still got errors, I have cut the code down to just 2 Beans
1 Session bean 1 Entity Bean OpenEJB startup shows the following 2004-03-22 13:42:46,404 INFO [main] (Logger.java:548) - **************************************************************************** **** OpenEJB http://openejb.sf.net Startup: 22/03/04 13:42 Copyright 2000,2001,2002 (C) OpenEJB Project, All Rights Reserved. Version: 0.9.2 Build date: 20030605 Build time: 0409 **************************************************************************** **** 2004-03-22 13:42:46,414 DEBUG [main] (Logger.java:1582) - Instantiating assembler class org.openejb.alt.assembler.classic.Assembler 2004-03-22 13:42:49,218 DEBUG [main] (Logger.java:1582) - Containers : 2 2004-03-22 13:42:49,218 DEBUG [main] (Logger.java:1342) - Type Container ID 2004-03-22 13:42:49,218 DEBUG [main] (Logger.java:1582) - ENTITY Ingotz CMP Container 2004-03-22 13:42:49,228 DEBUG [main] (Logger.java:1582) - STATELESS Ingotz Stateless Container 2004-03-22 13:42:49,228 DEBUG [main] (Logger.java:1582) - Deployments : 13 2004-03-22 13:42:49,228 DEBUG [main] (Logger.java:1342) - Type Deployment ID 2004-03-22 13:42:49,228 DEBUG [main] (Logger.java:1582) - STATELESS AdminManagerBean 2004-03-22 13:42:49,238 DEBUG [main] (Logger.java:1582) - CMP_ENTITY CardListBean 2004-03-22 13:42:49,238 DEBUG [main] (Logger.java:1582) - SecurityService : org.openejb.ri.sp.PseudoSecurityService 2004-03-22 13:42:49,238 DEBUG [main] (Logger.java:1582) - TransactionManager: org.openejb.core.TransactionManagerWrapper 2004-03-22 13:42:49,248 INFO [main] (Logger.java:307) - OpenEJB ready. I am still getting the error 2004-03-22 13:34:59,683 ERROR [EJB Daemon [18]] (TransactionManagerWrapper.java:420) - java.lang.RuntimeException: JDBC driver failed to commit transaction. Invalid transaction context. No active transaction at org.openejb.resource.SharedLocalConnectionManager$Synchronizer.afterCompleti on(SharedLocalConnectionManager.java:211) at org.openejb.core.TransactionManagerWrapper$TransactionWrapper.afterCompletio n(TransactionManagerWrapper.java:418) at org.openejb.ri.sp.PseudoTransactionService$MyTransaction.doAfterCompletion(P seudoTransactionService.java:181) at org.openejb.ri.sp.PseudoTransactionService$MyTransaction.commit(PseudoTransa ctionService.java:140) at org.openejb.ri.sp.PseudoTransactionService$MyTransactionManager.commit(Pseud oTransactionService.java:91) at org.openejb.core.TransactionManagerWrapper.commit(TransactionManagerWrapper. java:143) at org.openejb.core.transaction.TransactionPolicy.commitTransaction(Transaction Policy.java:171) at org.openejb.core.transaction.TxRequired.afterInvoke(TxRequired.java:120) at org.openejb.alt.containers.castor_cmp11.CastorCmpEntityTxPolicy.afterInvoke( CastorCmpEntityTxPolicy.java:131) at org.openejb.alt.containers.castor_cmp11.CastorCMP11_EntityContainer.business Method(CastorCMP11_EntityContainer.java:748) at org.openejb.alt.containers.castor_cmp11.CastorCMP11_EntityContainer.invoke(C astorCMP11_EntityContainer.java:544) at org.openejb.server.EjbDaemon.doEjbObject_BUSINESS_METHOD(EjbDaemon.java:695) at org.openejb.server.EjbDaemon.processEjbRequest(EjbDaemon.java:534) at org.openejb.server.EjbDaemon.run(EjbDaemon.java:374) at java.lang.Thread.run(Thread.java:536) I have tried using Bean and Container for the Stateless Session bean and when set to container I have tried Never, Required, RequiresNew, Supports and they all give more or less the same error. The code in the beans is fairly simple. and the Entity is only reading from the DB not writing to it. From what I have seen the programmer before me didnt know how to stop this as all he did was set the log4j to drop all the errors down a bitbucket as the code works, but I am not happy with having errors. Mike. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 20 March 2004 20:44 To: [EMAIL PROTECTED] Subject: Re: [openejb-user] Error when running a jar. On Sat, Mar 20, 2004 at 02:08:04PM -0600, [EMAIL PROTECTED] wrote: > ----- Forwarded message from Michael Forster <[EMAIL PROTECTED]> ----- > > We have a Sessionbean that is being used as a facade between the JSP server > and the Bean server, however when we instantiate the Session we get the > following errors > > INFO EJB Daemon [3] Transaction - TX_RequiresNew: Suspended transaction null > INFO EJB Daemon [3] Transaction - TX_RequiresNew: Started transaction > [EMAIL PROTECTED] > INFO EJB Daemon [3] Transaction - TX_RequiresNew: Committing transaction > [EMAIL PROTECTED] > ERROR EJB Daemon [3] Transaction - > java.lang.RuntimeException: JDBC driver failed to commit transaction. > Invalid transaction context. No active transaction [snip] > our ejb-jar.xml file is as follows. > > <session> > <ejb-name>SessionManagerBean</ejb-name> > <home>com.ingotz.j2ee.ejb.SessionManagerHome</home> > <remote>com.ingotz.j2ee.ejb.SessionManager</remote> > <ejb-class>com.ingotz.j2ee.ejb.SessionManagerBean</ejb-class> > <session-type>Stateless</session-type> > <transaction-type>Container</transaction-type> > </session> > Can anyone enlighten me as to how to stop the errors. > (I have tried Required, Never, Supports, all with no luck either) If you don't need a TX around the bean call, you could switch the bean to be a bean-managed TX bean, then cut the assembly-descriptor section out all together. So something like this: <session> <ejb-name>SessionManagerBean</ejb-name> <home>com.ingotz.j2ee.ejb.SessionManagerHome</home> <remote>com.ingotz.j2ee.ejb.SessionManager</remote> <ejb-class>com.ingotz.j2ee.ejb.SessionManagerBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Bean</transaction-type> </session> Then the container is not going to try and enforce any particular transaction rules other than checking to see if you started a transaction but did not commit it (that's a no-no for stateless session beans). Give that a try and let us know how it goes. -David --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.620 / Virus Database: 399 - Release Date: 11/03/2004 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.620 / Virus Database: 399 - Release Date: 11/03/2004
