TransactionRolledbackException in RC2
joek May 3, 2002 11:23 PMHi
I am running JBoss 3.0RC2, SQL Server 7 with the Atinav driver.
I am calling an entity bean from a session bean. I get the following error and I can't figure out why. I also got the same error in RC1. I am using 'Required transaction attribute on both beans.
002-05-03 22:04:30,726 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.CustDataEJB.findByCompanyName] Executing SQL: SELECT t0_o.fldIDCode FROM tblcompany2 t0_o WHERE t0_o.fldCompanyName = ?
2002-05-03 22:04:31,036 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.CustDataEJB] Executing SQL: SELECT fldCompanyName FROM tblcompany2 WHERE (fldIDCode=?)
2002-05-03 22:04:31,046 ERROR [org.jboss.ejb.plugins.LogInterceptor] TransactionRolledbackException, causedBy:
java.sql.SQLException: [aveConnect][JDBC SQL Server Driver] Only one statement is allowed in transaction mode.
at net.avenir.jdbc2.a.b(Unknown Source)
at net.avenir.jdbc2.m.b(Unknown Source)
at net.avenir.jdbc2.m.executeQuery(Unknown Source)
at org.jboss.resource.adapter.jdbc.local.LocalPreparedStatement.executeQuery(LocalPreparedStatement.java:289)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:115)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:62)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadEntity(JDBCStoreManager.java:489)
at org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:410)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.loadEntity(CachedConnectionInterceptor.java:314)
at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:283)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:147)
at org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:193)
at org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:107)
at org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:69)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:96)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:167)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:61)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:129)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:493)
at org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.invoke(BaseLocalContainerInvoker.java:296)
at org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:38)
at $Proxy30.getAddress(Unknown Source)
at com.iOrigo.cust.CustInfoManagerEJB.getCompanyAddress(CustInfoManagerEJB.java:179)
at java.lang.reflect.Method.invoke(Native Method)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:664)
.
.
The piece of gode that generates the error is:
try {
CustDataLocalHome home = (CustDataLocalHome) getCustDataHome();
CustDataLocal customer = (CustDataLocal) home.findByCompanyName(name);
Collection allAddr = customer.getAddress();
.
.
.
Any help would be appreciated...