[jboss-user] [JBoss Seam] - Problem Closing a connection for you. Please close them yo
holtak
do-not-reply at jboss.com
Thu Apr 19 11:09:05 EDT 2007
After being inactive in with an open conversation presenting some values from an Entity in the view, after recontinuing work (saving something into the entity) I get this exception:
| 16:49:40,565 INFO [CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection at 192cf25
| java.lang.Throwable: STACKTRACE
| at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:290)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:417)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:842)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
| at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
| at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:417)
| at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
| at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:94)
| at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87)
| at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:218)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2289)
| at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2242)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2542)
| at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:92)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:232)
| at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:140)
| at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
| at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
| at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
| at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
| at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:515)
| at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1491)
| at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1110)
| at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
| at org.jboss.tm.TxManager.commit(TxManager.java:240)
| at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:140)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.commitOrRollback(AbstractSeamPhaseListener.java:324)
| at org.jboss.seam.jsf.TransactionalSeamPhaseListener.handleTransactionsAfterPageActions(TransactionalSeamPhaseListener.java:52)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.enterPage(AbstractSeamPhaseListener.java:285)
| at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:214)
| at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:56)
| at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.proaut.servlet.filters.SmartHeadersFilter.doFilter(SmartHeadersFilter.java:30)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:87)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:619)
|
after googling a while I found 2 and a half possible solutions:
Solution 1:
anonymous wrote : JBoss AS complains about unclosed connections?
| If you get the message "[org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection" you are missing a configuration setting, hibernate.connection.release_mode - set it to auto or read the reference documentation about it.
|
But it makes no difference. Error is still present.
Solution 1.5:
after reading the documentation, I tried to set the mentioned parameter to after_statement.
But it makes no difference. Error is still present.
Solution 2:
anonymous wrote : Not sure if this is the fix, but in conf/standardjboss.xml remove this line in every container configuration
| org.jboss.resource.connectionmanager.CachedConnectionInterceptor
|
| AFAICT, this won't affect anything, but I can't promise anything because I didn't write the JCA layer.
|
| This interceptor is responsible for cleaning up call connections created within the call of an EJB, no matter what level of indirection this connection is created within. Its a stupid implementation. Sorry.... We'll fix this.
|
| It is supposed to be a helper interceptor to catch when you've been sloppy about closing your JDBC connections. The idea was that the EJB boundary was a isolated boundary. This doesn't make much sense with Local access, now does it? Leaked connections should really be closed at tx commit or rollback IMNSHO.
|
| Bill
Didn`t try the second solution because som other post said it`s fixed in JBossAS 4.0.5 but I`m on 4.0.5 so maybe I`m doing something generally wrong...
Can anybody give a statement?
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038926#4038926
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038926
More information about the jboss-user
mailing list