473,508 Members | 2,337 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1677

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

Similar topics

0
1560
by: jackson marshmallow | last post by:
I have just recreated several (large) tables in the database as InnoDB and reloaded them using my client application... These tables used to be MyISAM. I haven't tried playing with any InnoDB...
0
2310
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,...
2
2639
by: ceadtinneh | last post by:
Hello Folks, Our web based application accesses our SQL Server 2k database using a connection pool of about 150 connections through a BEA JDBC driver. We recently had a situation where one of...
3
5625
by: Nagy Karoly | last post by:
Is there any way to close the connections of other users in PostgreSQL. I wish to run an automatic pg_dump and pg_restore and I guess users must bedisconnected first. Is that right?...
3
2032
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
1175
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
816
by: Per Schjetne | last post by:
I set the "allow saving password" on the connection in the VS IDE/Data connections. But after closing and reopening, the password and the "allow saving password" checkbox is lost. I have this...
45
3005
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
1191
by: Marcelo | last post by:
Hi I would like to know about connections of sa, where SQL store the number of connections
13
3687
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
7225
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7383
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...
1
7046
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
7498
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...
1
5053
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4707
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1557
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
766
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
418
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.