471,073 Members | 1,361 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

Connections lost

I'm using
Red Hat Linux 9.0
My SQL 4..0.15
Tomcat 4.1.27
JConnector 3.0.9

I've configured a DataSource in the /home context. I can access the
database just fine when I initially satart the servers up. I have Tomcat on
server app01 and MySQL on server db01. When I leave the servers and come
back to them after 24 hours or so I start getting Exceptions:

SQLException Raised : java.sql.SQLException: No operations allowed after
connection closed.

Connection was closed due to the following exception:

** BEGIN NESTED EXCEPTION **

java.sql.SQLException
MESSAGE: Communication link failure: java.io.IOException, underlying cause:
Unexpected end of input stream

** BEGIN NESTED EXCEPTION **

java.io.IOException
MESSAGE: Unexpected end of input stream

STACKTRACE:

java.io.IOException: Unexpected end of input stream
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO. java:1405)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:1775)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:10 20)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java :1109)
at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1070)
at com.mysql.jdbc.Connection.execSQL(Connection.java: 2027)
at com.mysql.jdbc.Connection.execSQL(Connection.java: 1996)
at com.mysql.jdbc.Connection.execSQL(Connection.java: 1977)
at com.mysql.jdbc.Connection.setAutoCommit(Connection .java:654)
at
org.apache.commons.dbcp.DelegatingConnection.setAu toCommit(DelegatingConnect
ion.java:237)
at
org.apache.commons.dbcp.PoolableConnectionFactory. activateObject(PoolableCon
nectionFactory.java:273)
at org.apache.commons.pool.impl.GenericObjectPool.bor rowObject(Unknown
Source)
at
org.apache.commons.dbcp.AbandonedObjectPool.borrow Object(AbandonedObjectPool
..java:117)
at
org.apache.commons.dbcp.PoolingDataSource.getConne ction(PoolingDataSource.ja
va:110)
at
org.apache.commons.dbcp.BasicDataSource.getConnect ion(BasicDataSource.java:3
12)
at
genfw.resourceaccess.db.MySQLDBAccess.getConnectio n(MySQLDBAccess.java:63)
at genfw.resourceaccess.db.MySQLDBAccess.retrieve(MyS QLDBAccess.java:189)
at genfw.dataaccess.RDBMSEntityManager.find(RDBMSEnti tyManager.java:193)
at genfw.dataaccess.RDBMSEntityManager.find(RDBMSEnti tyManager.java:145)
at genfw.dataaccess.RDBMSEntityManager.find(RDBMSEnti tyManager.java:136)
at
com.caughey.home.survey.business.SurveyManager.ret rieveSurveyResults(SurveyM
anager.java:67)
at
com.caughey.home.survey.actions.SurveyResultsActio n.perform(SurveyResultsAct
ion.java:35)
at org.apache.struts.action.Action.execute(Action.jav a:420)
at
org.apache.struts.action.RequestProcessor.processA ctionPerform(RequestProces
sor.java:484)
at
org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doGet(Actio nServlet.java:507)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at
org.apache.catalina.core.ApplicationFilterChain.in ternalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.do Filter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invo ke(StandardWrapperValve.ja
va:256)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invo ke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.authenticator.AuthenticatorBas e.invoke(AuthenticatorBase
..java:494)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(St andardContext.java:2416)
at
org.apache.catalina.core.StandardHostValve.invoke( StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.in voke(ErrorDispatcherValve.
java:171)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke (ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invok e(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$Standard PipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(S tandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(Cont ainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(Co yoteAdapter.java:223)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyo teHandler.java:263)
at org.apache.jk.common.HandlerRequest.invoke(Handler Request.java:360)
at org.apache.jk.common.ChannelSocket.invoke(ChannelS ocket.java:604)
at
org.apache.jk.common.ChannelSocket.processConnecti on(ChannelSocket.java:562)
at org.apache.jk.common.SocketConnection.runIt(Channe lSocket.java:679)
at
org.apache.tomcat.util.threads.ThreadPool$ControlR unnable.run(ThreadPool.jav
a:619)
at java.lang.Thread.run(Thread.java:536)
** END NESTED EXCEPTION **
I have been leaving a the mysql client up and it to looses the connection.
it however recovers. The Error I get on db01 where the mysql client is
running is

ERROR 2006: MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 139
Current database: home

Then it connects and i get the results.
Jul 19 '05 #1
0 2249

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Michael | last post: by
reply views Thread by Lafayette | last post: by
1 post views Thread by Marcelo | last post: by
13 posts views Thread by Schmidty | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.