MySQL Forums :: Connector/JDBC and Java :: org.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 0, SQLState: 08003 org.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: No operations allowed after connection closed.


Advanced Search

org.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 0, SQLState: 08003 org.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: No operations allowed after connection closed.
Posted by: Shekar Nadar ()
Date: October 12, 2009 12:10AM

Hello All,

I have developed a application using struts and hibernate.

The application works fine when a server restart is done but after the application is idle for some period of time i.e today if i have logged in to the system it works fine than i logout and if i try to login tomorrow i am not able to login into the application and on checking the logs i get the following exception.




Hibernate: select logininfo0_.ID as ID0_, logininfo0_.first_name as first2_0_, logininfo0_.last_name as last3_0_, logininfo0_.login_name as login4_0_, logininfo0_.password as password0_, logininfo0_.email_id as email6_0_, logininfo0_.role_id as role7_0_, logininfo0_.expire_date as expire8_0_, logininfo0_.created_by as created9_0_, logininfo0_.created_date as created10_0_, logininfo0_.modified_by as modified11_0_, logininfo0_.modified_date as modified12_0_, logininfo0_.organization_id as organiz13_0_ from ot_login_details logininfo0_ where logininfo0_.login_name='admin' and logininfo0_.password='g0ldenfly'
Oct 12, 2009 10:16:53 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 0, SQLState: 08S01
Oct 12, 2009 10:16:53 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1845)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2292)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2788)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1534)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1625)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2226)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1812)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1657)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2150)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1127)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
at com.webaccess.onlinetest.hibernate.HibernateConnection.executeQueryOneObj(HibernateConnection.java:187)
at com.webaccess.onlinetest.model.dao.UserDAO.getUserByLoginNameAndPassword(UserDAO.java:282)
at com.webaccess.onlinetest.model.manager.UserManager.getUserByLoginNameAndPassword(UserManager.java:43)
at com.webaccess.onlinetest.actions.LoginAction.execute(LoginAction.java:81)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)


** END NESTED EXCEPTION **


org.hibernate.exception.JDBCConnectionException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:72)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2153)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1127)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
at com.webaccess.onlinetest.hibernate.HibernateConnection.executeQueryOneObj(HibernateConnection.java:187)
at com.webaccess.onlinetest.model.dao.UserDAO.getUserByLoginNameAndPassword(UserDAO.java:282)
at com.webaccess.onlinetest.model.manager.UserManager.getUserByLoginNameAndPassword(UserManager.java:43)
at com.webaccess.onlinetest.actions.LoginAction.execute(LoginAction.java:81)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.io.EOFException

STACKTRACE:

java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1845)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2292)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2788)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1534)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1625)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2226)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1812)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1657)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2150)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1127)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
at com.webaccess.onlinetest.hibernate.HibernateConnection.executeQueryOneObj(HibernateConnection.java:187)
at com.webaccess.onlinetest.model.dao.UserDAO.getUserByLoginNameAndPassword(UserDAO.java:282)
at com.webaccess.onlinetest.model.manager.UserManager.getUserByLoginNameAndPassword(UserManager.java:43)
at com.webaccess.onlinetest.actions.LoginAction.execute(LoginAction.java:81)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)


** END NESTED EXCEPTION **


at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2504)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2788)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1534)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1625)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2226)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1812)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1657)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.Loader.doQuery(Loader.java:662)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2150)
... 32 more
Hibernate: select logininfo0_.ID as ID0_, logininfo0_.first_name as first2_0_, logininfo0_.last_name as last3_0_, logininfo0_.login_name as login4_0_, logininfo0_.password as password0_, logininfo0_.email_id as email6_0_, logininfo0_.role_id as role7_0_, logininfo0_.expire_date as expire8_0_, logininfo0_.created_by as created9_0_, logininfo0_.created_date as created10_0_, logininfo0_.modified_by as modified11_0_, logininfo0_.modified_date as modified12_0_, logininfo0_.organization_id as organiz13_0_ from ot_login_details logininfo0_ where logininfo0_.login_name='admin' and logininfo0_.password='g0ldenfly'
Oct 12, 2009 10:17:09 AM org.hibernate.util.JDBCExceptionReporter logExceptions
WARNING: SQL Error: 0, SQLState: 08003
Oct 12, 2009 10:17:09 AM org.hibernate.util.JDBCExceptionReporter logExceptions
SEVERE: No operations allowed after connection closed.
org.hibernate.exception.JDBCConnectionException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:72)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2153)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
at org.hibernate.loader.Loader.list(Loader.java:2024)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:300)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:153)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1127)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
at com.webaccess.onlinetest.hibernate.HibernateConnection.executeQueryOneObj(HibernateConnection.java:187)
at com.webaccess.onlinetest.model.dao.UserDAO.getUserByLoginNameAndPassword(UserDAO.java:282)
at com.webaccess.onlinetest.model.manager.UserManager.getUserByLoginNameAndPassword(UserManager.java:43)
at com.webaccess.onlinetest.actions.LoginAction.execute(LoginAction.java:81)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLException: No operations allowed after connection closed.
at com.mysql.jdbc.Connection.checkClosed(Connection.java:2647)
at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1300)
at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1281)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2150)
... 32 more





The hibernate config xml that i have defined is as follows



<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"hibernate-configuration-3.0.dtd">


<hibernate-configuration>
<session-factory >
<!-- Database Configuratoin. -->
<property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/solution</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.connection.password">root</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="show_sql">true</property>
<property name="hibernate.hbm2ddl.auto">none</property>

<!-- configuration pool via c3p0-->
<property name="c3p0.Acquire_Increment">1</property>
<property name="c3p0.IdleConnectionTestPeriod">100</property> <!-- seconds -->
<property name="c3p0.MaxPoolSize">100</property>
<property name="c3p0.MaxStatements">0</property>
<property name="c3p0.MinPoolSize">10</property>
<property name="c3p0.timeout">10000</property> <!-- seconds -->
<!-- DEPRECATED very expensive property name="c3p0.validate>-->
<!-- Session Factory Configuration -->
<property name="hibernate.session_factory_name">HibernateSessionFactory</property>

<!-- Hibernate Database Mapping files -->
<mapping resource="/com/model/beans/LoginInfo.hbm.xml" />
<mapping resource="/com/model/beans/Category.hbm.xml" />
<mapping resource="/com/model/beans/Test.hbm.xml" />
<mapping resource="/com/model/beans/Examinee.hbm.xml" />
<mapping resource="/com/model/beans/Options.hbm.xml" />
<mapping resource="/com/model/beans/Questions.hbm.xml" />
<mapping resource="/com/model/beans/Section.hbm.xml" />
<mapping resource="/com/model/beans/SubSection.hbm.xml" />
<mapping resource="/com/model/beans/TestResults.hbm.xml" />
<mapping resource="/com/model/beans/TestSection.hbm.xml" />
<mapping resource="/com/model/beans/UserRole.hbm.xml" />
</session-factory>
</hibernate-configuration>


Please let me know what is causing the issue.

Any help would be greatly appreciated.

Thanks in advance

Shekar

Options: ReplyQuote


Subject Written By Posted
org.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 0, SQLState: 08003 org.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: No operations allowed after connection closed. Shekar Nadar 10/12/2009 12:10AM
Re: org.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 0, SQLState: 08003 org.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: No operations allowed after connection closed. Sheng Chien 10/14/2009 10:25PM
Re: org.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 0, SQLState: 08003 org.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: No operations allowed after connection closed. Shekar Nadar 10/23/2009 08:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.