i know this error is very much common, whenver i leave my app idel for more than 10 minutes i get this error and teh only soluiton as of now i bounce my
tomcat server. i read many post and added some properties some user recommended, here is my hibernate.cfg.xml file
<hibernate-configuration>
<session-factory>
<property name="hibernate.connection.username">hms_user</property>
<property name="hibernate.connection.password">hms_user</property>
<property name="hibernate.connection.url">
jdbc:mysql://localhost:3306/hms
</property>
<property name="hibernate.connection.driver_class">
com.mysql.jdbc.Driver
</property>
<property name="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</property>
<property name="hibernate.connection.autoReconnect">true</property>
<property name="hibernate.connection.autoReconnectForPools">true</property>
<property name="hibernate.connection.is-connection-validation-required">true</property>
<mapping resource="/User.hbm.xml"/>
<mapping resource="/Test.hbm.xml"/>
<mapping resource="/UserSubscription.hbm.xml"/>
</session-factory>
</hibernate-configuration>
may i know where i am going wrong, btw i am using ThreadLocal, if you want to how i get hiberante session i could post it
ras13057@lasalamsa.com [~/tomcat/logs]# BEGIN NESTED EXCEPTION **
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
-bash: BEGIN: command not found
ras13057@lasalamsa.com [~/tomcat/logs]#
ras13057@lasalamsa.com [~/tomcat/logs]# java.io.EOFException
-bash: java.io.EOFException: command not found
ras13057@lasalamsa.com [~/tomcat/logs]#
ras13057@lasalamsa.com [~/tomcat/logs]# STACKTRACE:
-bash: STACKTRACE:: command not found
ras13057@lasalamsa.com [~/tomcat/logs]#
ras13057@lasalamsa.com [~/tomcat/logs]# java.io.EOFException
-bash: java.io.EOFException: command not found
ras13057@lasalamsa.com [~/tomcat/logs]# at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1395)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1539)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1930)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1168)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1279)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at com.mysql.jdbc.Connection.execSQL(Connection.java:2281)
-bash: syntax error near unexpected token `('
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
ras13057@lasalamsa.com [~/tomcat/logs]# at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1634)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:397)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.java:318)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java:177)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1156)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:46)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at com.hms.dao.UserDao.isUserValid(UserDao.java:94)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at com.hms.helper.UserHelper.isUserValid(UserHelper.java:40)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at com.hms.action.LoginAction.execute(LoginAction.java:69)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at com.hms.action.MainActionController.process(MainActionController.java:29)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# at java.lang.Thread.run(Thread.java:595)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]#
ras13057@lasalamsa.com [~/tomcat/logs]# at java.lang.Thread.run(Thread.java:595)
-bash: syntax error near unexpected token `('
ras13057@lasalamsa.com [~/tomcat/logs]# tail -500 catalina.out | more
Dec 26, 2006 4:44:04 PM org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
Dec 26, 2006 4:44:04 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2561 ms
/HMS/Login.do
2006-12-26 16:44:31,385 [ TP-Processor2] WARN com.hms.action.LoginAction.execute(LoginAction.java:53) - came in the execute
method of login action class
2006-12-26 16:44:31,397 [ TP-Processor2] WARN com.hms.dao.UserDao.isUserValid(UserDao.java:85) - came in the isuserAuthenti
cated method of userdao
2006-12-26 16:44:32,321 [ TP-Processor2] WARN net.sf.ehcache.config.Configurator.configure(Configurator.java:126) - No conf
iguration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/home/ras13057/public_html/HM
S/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
ARCHIVE PATHc:\rashid
/HMS/MainMenu.do
USER sessionUser
/HMS/Welcome.do
/HMS/Login.do
2006-12-26 16:54:11,632 [ TP-Processor4] WARN com.hms.action.LoginAction.execute(LoginAction.java:53) - came in the execute
method of login action class
2006-12-26 16:54:11,632 [ TP-Processor4] WARN com.hms.dao.UserDao.isUserValid(UserDao.java:85) - came in the isuserAuthenti
cated method of userdao
2006-12-26 16:54:11,646 [ TP-Processor4] WARN org.hibernate.util.JDBCExceptionReporter.logExceptions(JDBCExceptionReporter.
java:71) - SQL Error: 0, SQLState: 08S01
2006-12-26 16:54:11,650 [ TP-Processor4] ERROR org.hibernate.util.JDBCExceptionReporter.logExceptions(JDBCExceptionReporter.
java:72) - Communication link failure: java.io.EOFException, underlying cause: null
** BEGIN NESTED EXCEPTION **
java.io.EOFException
STACKTRACE:
java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1395)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1539)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1930)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1168)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1279)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2281)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1634)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:139)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1669)
at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:397)
at org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.java:318)
at org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java:177)
at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1156)
at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:46)
at com.hms.dao.UserDao.isUserValid(UserDao.java:94)
at com.hms.helper.UserHelper.isUserValid(UserHelper.java:40)
at com.hms.action.LoginAction.execute(LoginAction.java:69)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at com.hms.action.MainActionController.process(MainActionController.java:29)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
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.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
** END NESTED EXCEPTION **
2006-12-26 16:54:11,652 [ TP-Processor4] WARN org.apache.struts.action.RequestProcessor.processException(RequestProcessor.j
ava:509) - Unhandled Exception thrown: class org.hibernate.exception.JDBCConnectionException
2006-12-26 16:54:11,655 [ TP-Processor4] ERROR org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.jav
a:253) - Servlet.service() for
servlet action threw exception
org.hibernate.exception.JDBCConnectionException: could not execute query using iterate
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.hql.QueryLoader.iterate(QueryLoader.java:420)
at org.hibernate.hql.ast.QueryTranslatorImpl.iterate(QueryTranslatorImpl.java:318)
at org.hibernate.engine.query.HQLQueryPlan.performIterate(HQLQueryPlan.java:177)
at org.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1156)
at org.hibernate.impl.QueryImpl.iterate(QueryImpl.java:46)
at com.hms.dao.UserDao.isUserValid(UserDao.java:94)
at com.hms.helper.UserHelper.isUserValid(UserHelper.java:40)
at com.hms.action.LoginAction.execute(LoginAction.java:69)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at com.hms.action.MainActionController.process(MainActionController.java:29)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
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.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.sql.SQLException: Communication link failure: java.io.EOFException, underlying cause: null
** BEGIN NESTED EXCEPTION **
java.io.EOFException
STACKTRACE:
java.io.EOFException
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1395)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1539)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1930)
--More--