-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Problem using Hibernate Admin app as a skeleton for my app
PostPosted: Tue Mar 02, 2004 5:55 pm 
Beginner
Beginner

Joined: Wed Dec 03, 2003 2:43 pm
Posts: 22
I am having trouble using the admin app skeleton for my own Webwork2 (final)/hibernate app. When it loads up at first, it is fine. I get a session great. However, after about 20 minutes, it appears to be trying to get a connection that is already closed.

I have repackaged the AbstractAction, HibernateInterceptor and HibernateSession / HibernateSessionFactory components, but I have not otherwise changed the code inside of them. The code still has a try catch finally, where the finally always contains the dispose session method.

Any ideas?

I get the following stack traces:

This is printed to the console

Code:

c3p0 -- Uh oh... getConnection() was called on a PooledConnection when it had already provided a client with a Connection that has not yet been closed. This probably indicates a bug in the connection pool!!!
java.sql.SQLException: Io exception: Connection reset by peer: socket write error
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:342)
        at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:794)
        at oracle.jdbc.driver.OraclePreparedStatement.privateClose(OraclePreparedStatement.java:346)
        at oracle.jdbc.driver.OraclePreparedStatement.close(OraclePreparedStatement.java:281)
        at com.mchange.v1.db.sql.StatementUtils.attemptClose(StatementUtils.java:37)
        at com.mchange.v2.c3p0.stmt.GooGooStatementCache$1.run(GooGooStatementCache.java:227)
        at com.mchange.v2.async.CarefulRunnableQueue$TaskThread.run(CarefulRunnableQueue.java:145)


This is printed to the log file through log4j

Code:
16:38:49,549 ERROR HibernateInterceptor:? - HibernateException in execute()
net.sf.hibernate.JDBCException: Cannot open connection
   at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:281)
   at net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3264)
   at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3244)
   at net.sf.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:40)
   at net.sf.hibernate.transaction.JDBCTransactionFactory.beginTransaction(JDBCTransactionFactory.java:19)
   at net.sf.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:2195)
   at HibernateSession.getSession(Unknown Source)
   at AbstractDbAction.getSession(Unknown Source)
   at MyAction.go(Unknown Source)
   at AbstractDbAction.execute(Unknown Source)
   at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:171)
   at org.audubon.commbird.interceptor.HibernateInterceptor.intercept(Unknown Source)
   at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
   at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
   at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
   at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
   at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
   at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
   at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
   at com.opensymphony.xwork.interceptor.TimerInterceptor.intercept(TimerInterceptor.java:78)
   at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
   at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:37)
   at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)
   at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116)
   at com.opensymphony.webwork.dispatcher.ServletDispatcher.serviceAction(ServletDispatcher.java:182)
   at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:162)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
   at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
   at com.opensymphony.webwork.lifecycle.RequestLifecycleFilter.doFilter(RequestLifecycleFilter.java:62)
   at com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
   at com.caucho.server.http.Invocation.service(Invocation.java:315)
   at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
   at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:246)
   at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
   at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
   at java.lang.Thread.run(Thread.java:536)
Caused by: java.sql.SQLException: Io exception: Connection reset
   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:187)
   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:229)
   at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:342)
   at oracle.jdbc.driver.OracleConnection.setAutoCommit(OracleConnection.java:1244)
   at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:324)
   at com.mchange.v2.c3p0.impl.C3P0PooledConnection$ProxyConnectionInvocationHandler.invoke(C3P0PooledConnection.java:645)
   at com.mchange.v2.c3p0.impl.$Proxy0.setAutoCommit(Unknown Source)
   at net.sf.hibernate.connection.C3P0ConnectionProvider.getConnection(C3P0ConnectionProvider.java:35)
   at net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
   ... 35 more


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.