473,395 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 2320

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Al Caponi | last post by:
Hi all, There is a limitation on Win98 when a client app using mm.mysql driver doing extensive queries to MySQL 3.23.x frequently encounters a connection lost error. Error msg is something...
0
by: Michael | last post by:
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...
0
by: Michael Bourgon | last post by:
I've been having the same problem for 2 weeks now. If anyone has any ideas, I'd love to hear them. We are using both SQL and Windows Authentication. I was running a Profiler Trace at the time,...
3
by: Andreas Muck | last post by:
Hi! We have an application running on Linux (SuSE 7.2, kernel 2.4.16) that opens lots of connections to a Postgres database and occasionaly dies with segfault. Trying to reproduce the crash, I...
0
by: Andreas Muck | last post by:
Hi! We have an application running on Linux (SuSE 7.2, kernel 2.4.16) that opens lots of connections to a Postgres database and occasionaly dies with segfault. Trying to reproduce the crash, I...
0
by: Lafayette | last post by:
Hi there, I´m writing a chat server using C# and Sockets. My App accept connections in a given port number and use http to comunicate with clients (browsers). my chat app work within a html...
45
by: Arno R | last post by:
Hi all, I am about to distribute an A97-runtime app. which will be used on a LAN by approx. 30 users. The network is pretty good, but there are a few managers who have wireless laptops... Of...
1
by: Marcelo | last post by:
Hi I would like to know about connections of sa, where SQL store the number of connections
13
by: Schmidty | last post by:
If you do a page reload with $_SERVER will your program lose a mysqli connection upon the reload of the page? Would this code work? I need to know how to carry over a connection between methods as...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.