[JBoss-user] [JCA/JBoss] - Closing a connection for you. Please close them yourself:

2004-08-26 Thread cboucher
I do not understand why I am getting the following exceptions.

I am using JBoss4.0RC1 with j2sdk1.4.1_03 on Windows XP. The code works fine with 
JBoss 3.0.4. 

Code logic:

MDB
{
  EJB = GetEJB();
  EJB.doDataBaseStuff();
{
   DS = GetDataSource();
   Conn = DS.getConnection();
   Conn.executeSQL();
   Conn.close(); 
 }
}

EJB is a stateless session bean with requires a Transaction.

13:39:48,760 INFO  [CachedConnectionManager] Closing a connection for you.  Please 
close them yourself: [EMAIL PROTECTED]
java.lang.Exception: STACKTRACE
at 
org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:322)
at 
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:477)
at 
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:838)
at 
org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102)
at 
com.appiq.service.system.database.ConnectionMgr.createConnection(ConnectionMgr.java:101)
at 
com.appiq.service.system.database.ConnectionMgr.createConnection(ConnectionMgr.java:59)
at 
com.appiq.service.base.BaseSessionBean.createConnection(BaseSessionBean.java:91)
at 
com.appiq.service.system.cmdProcessor.CmdProcessorBean.execute(CmdProcessorBean.java:161)
at 
com.appiq.service.system.cmdProcessor.CmdProcessorBean.execute(CmdProcessorBean.java:265)
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:324)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
at 
org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
at 
org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:316)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:149)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:128)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:625)
at org.jboss.ejb.Container.invoke(Container.java:871)
at sun.reflect.GeneratedMethodAccessor124.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at 
org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:230)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
at 
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
at 
org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy60.execute(Unknown Source)
at 
com.appiq.service.system.scheduler.SchedulerTask.updateSchedule(SchedulerTask.java:219)
at com.appiq.service.system.scheduler.SchedulerTask.run(SchedulerTask.java:100)
at java.util.TimerThread.mainLoop(Timer.java:432)
at java.util.TimerThread.run(Timer.java:382)
13:39:48,792 ERROR [TxConnectionManager] Error while closing connection handle!
org.jboss.resource.JBossResourceException: Error in delist!; - nested throwable: 
(java.lang.IllegalStateException: Already rolled back. 
TransactionImpl

[JBoss-user] [JCA/JBoss] - Closing a connection for you. Please close them yourself

2004-04-13 Thread lbasili
Hello,
I read several threads about this problem, but I did not find a solution.
I am using jboss-3.2.3

My code looks like this:

try {
  DAOFactory daof = DAOHelper.getDAOFactory();
  // The following method acquires a connection
  dao = (TreeDAO)daof.getInstance();
  
  // Here I use some objects that 
  // acquire other connections using DAOFactory

}catch(Exception e){
   // Exception handling here
}finally{
  // The following method closes the connection
  EJBHelper.releaseDAO(dao);
}
  
Each time, in the same thread, I need to acquire more than one connection, I obtain 
the  message and the stacktrace below.
The messages are dumped when I try to open the second connection.

Can you help me ?


Bye,
L.



 
2004-04-13 11:34:13,521 INFO  
[org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection 
for you.  Please close them yourself: [EMAIL PROTECTED]
java.lang.Exception: STACKTRACE
at 
org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:282)
at 
org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:506)
at 
org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:814)
at ztc.ldapdao.ra.ci.DAOFactoryImpl.getMetaDataReader(Unknown Source)
at ztc.ldapdao.ra.ci.DAOFactoryImpl.getMetaData(Unknown Source)
at ztc.ldapdao.ra.ci.DAOFactoryImpl.createDataModelInstance(Unknown Source)
at ztc.ldapdao.ra.ci.DAOFactoryImpl.newDataModel(Unknown Source)
at ztc.ejb.beanimpl.postlogger.PostLoggerBean.doPostLogin(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at 
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:700)
at java.lang.reflect.Method.invoke(Native Method)
at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
at 
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
at 
org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
at $Proxy57.doPostLogin(Unknown Source)
at ztc.ejb.beanimpl.sc.SessionControllerBean.ejbCreate(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at 
org.jboss.ejb.StatefulSessionContainer.createSession(StatefulSessionContainer.java:511)
at 
org.jboss.ejb.StatefulSessionContainer.createHome(StatefulSessionContainer.java:564)
at java.lang.reflect.Method.invoke(Native Method)
at 
org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invokeHome(StatefulSessionContainer.java:900)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)
at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:214)
at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invokeHome(StatefulSessionInstanceInterceptor.java:126)
at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke