[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - JBoss -> DB connection very unstable

kancharla_g do-not-reply at jboss.com
Mon Feb 16 01:55:11 EST 2009


Hi,

Recently we install jboss  5 on new UtraSpac T1000(Solaris 10). When we configure it to connect database, some times not able to connect and some times it is connecting but after a while it is disconnecting with an Exception saying Connection Reset.(Stack Trace printed below). Facing the same problem for both DBs oracle and sql server. To test the connectivity, i run a pure java/jdbc client to connect to server from the same machine as jboss, it is working perfectly fine. So it could be problem with Jboss on solaris or configuration problem.

Thanks in advance for helping to solve this porblem.



java.sql.SQLException: Connection reset
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.notifyPooledConnection(Unknown Source)
	at com.microsoft.sqlserver.jdbc.DBComms.receive(Unknown Source)
	at com.microsoft.sqlserver.jdbc.IOBuffer.sendCommand(Unknown Source)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectionCommand(Unknown Source)
	at com.microsoft.sqlserver.jdbc.SQLServerConnection.sendStartTran(Unknown Source)
	at com.microsoft.sqlserver.jdbc.SQLServerXAResource.start(Unknown Source)
	at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:213)
	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:789)
	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:500)
	at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:908)
	at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:662)
	at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:403)
	at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:625)
	at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:499)
	at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
	at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
	at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
	at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
	at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
	at org.hibernate.jdbc.AbstractBatcher.prepareCallableQueryStatement(AbstractBatcher.java:156)
	at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1543)
	at org.hibernate.loader.Loader.doQuery(Loader.java:673)
	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
	at org.hibernate.loader.Loader.doList(Loader.java:2213)
	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
	at org.hibernate.loader.Loader.list(Loader.java:2099)
	at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
	at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695)
	at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
	at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152)
	at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:80)
...
	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:597)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
	at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
	at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
	at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
	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:597)
	at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
	at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_5962929.invoke(InvocationContextInterceptor_z_fillMethod_5962929.java)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
	at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_5962929.invoke(InvocationContextInterceptor_z_setup_5962929.java)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
	at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:190)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:159)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:41)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:65)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
	at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:219)
	at org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase.invoke(ProxyInvocationHandlerBase.java:261)
	at org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:101)
	at $Proxy548
	.....
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
	at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:601)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)
13:18:25,271 ERROR [STDERR] java.lang.IllegalMonitorStateException
13:18:25,274 ERROR [STDERR] 	at java.util.concurrent.locks.ReentrantLock$Sync.tryRelease(ReentrantLock.java:127)
13:18:25,275 ERROR [STDERR] 	at java.util.concurrent.locks.AbstractQueuedSynchronizer.release(AbstractQueuedSynchronizer.java:1175)
13:18:25,275 ERROR [STDERR] 	at java.util.concurrent.locks.ReentrantLock.unlock(ReentrantLock.java:431)
13:18:25,275 ERROR [STDERR] 	at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.unlock(BaseWrapperManagedConnection.java:277)
13:18:25,276 ERROR [STDERR] 	at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:235)
13:18:25,276 ERROR [STDERR] 	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:789)
13:18:25,276 ERROR [STDERR] 	at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.enlistResource(TransactionImple.java:500)
13:18:25,277 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener$TransactionSynchronization.enlist(TxConnectionManager.java:908)
13:18:25,277 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:662)
13:18:25,278 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:403)
13:18:25,278 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.BaseConnectionManager2.reconnectManagedConnection(BaseConnectionManager2.java:625)
13:18:25,278 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:499)
13:18:25,279 ERROR [STDERR] 	at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
13:18:25,279 ERROR [STDERR] 	at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89)
13:18:25,280 ERROR [STDERR] 	at org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider.getConnection(InjectedDataSourceConnectionProvider.java:47)
13:18:25,280 ERROR [STDERR] 	at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
13:18:25,280 ERROR [STDERR] 	at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
13:18:25,281 ERROR [STDERR] 	at org.hibernate.jdbc.AbstractBatcher.prepareCallableQueryStatement(AbstractBatcher.java:156)
13:18:25,281 ERROR [STDERR] 	at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1543)
13:18:25,281 ERROR [STDERR] 	at org.hibernate.loader.Loader.doQuery(Loader.java:673)
13:18:25,282 ERROR [STDERR] 	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
13:18:25,282 ERROR [STDERR] 	at org.hibernate.loader.Loader.doList(Loader.java:2213)
13:18:25,283 ERROR [STDERR] 	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
13:18:25,283 ERROR [STDERR] 	at org.hibernate.loader.Loader.list(Loader.java:2099)
13:18:25,283 ERROR [STDERR] 	at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289)
13:18:25,284 ERROR [STDERR] 	at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695)
13:18:25,284 ERROR [STDERR] 	at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142)
13:18:25,284 ERROR [STDERR] 	at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152)
13:18:25,285 ERROR [STDERR] 	at org.hibernate.ejb.QueryImpl.getSingleResult(QueryImpl.java:80)
		....
13:18:25,302 ERROR [STDERR] 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:18:25,303 ERROR [STDERR] 	at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:65)
13:18:25,303 ERROR [STDERR] 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:18:25,303 ERROR [STDERR] 	at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
13:18:25,304 ERROR [STDERR] 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:18:25,304 ERROR [STDERR] 	at org.jboss.ejb3.session.SessionSpecContainer.invoke(SessionSpecContainer.java:219)
13:18:25,304 ERROR [STDERR] 	at org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase.invoke(ProxyInvocationHandlerBase.java:261)
13:18:25,305 ERROR [STDERR] 	at org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:101)
13:18:25,305 ERROR [STDERR] 	at $Proxy548..............


Thank you
gupta.

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210220#4210220

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210220



More information about the jboss-user mailing list