dbTalk Databases Forums  

is mysql at fault for this JDBC error? (com.mysql.jdbc.exceptions.jdbc4.CommunicationsExc eption)

comp.databases.mysql comp.databases.mysql


Discuss is mysql at fault for this JDBC error? (com.mysql.jdbc.exceptions.jdbc4.CommunicationsExc eption) in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
terry433iid@yahoo.com
 
Posts: n/a

Default is mysql at fault for this JDBC error? (com.mysql.jdbc.exceptions.jdbc4.CommunicationsExc eption) - 04-27-2011 , 01:39 AM






I am running a java class that queries mysql via JDBC, the database is
also servicing a GUI via tomcat (connection pool)

All of a sudden the java application crashes and below is the log file
output that I get

So - I'm left wondering if this is a mysql error......or tomcat
messing with connection pool ..... or JDBC error.....???

I cannot find any good info on the web for the error, so any feedback
appreciated



------------------------------------------------------------------------------------------------------------------------------------------
SelectStr: show tables
Error while executing SQL transaction: No operations allowed after
connection closed.Connection was implicitly closed due to underlying
exception/error:


** BEGIN NESTED EXCEPTION **

com.mysql.jdbc.exceptions.jdbc4.CommunicationsExce ption
MESSAGE: Communications link failure

Last packet sent to the server was 1 ms ago.

STACKTRACE:

com.mysql.jdbc.exceptions.jdbc4.CommunicationsExce ption:
Communications link failure

Last packet sent to the server was 1 ms ago.
at sun.reflect.GeneratedConstructorAccessor13.newInst ance(Unknown
Source)
at
sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(DelegatingConstructorAccessorImpl.java:
27)
at java.lang.reflect.Constructor.newInstance(Construc tor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:40 6)
at
com.mysql.jdbc.SQLError.createCommunicationsExcept ion(SQLError.java:
1074)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO. java:2873)
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO. java:2763)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja va:3299)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:18 37)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java :1961)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionIm pl.java:2537)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionIm pl.java:2466)
at com.mysql.jdbc.StatementImpl.executeQuery(Statemen tImpl.java:
1383)
at com.sun.electron.utils.DBConnection.doSelect(DBCon nection.java:
402)
at com.sun.electron.utils.DBConnection.doSelect(DBCon nection.java:
382)
at com.sun.electron.utils.DBConnection.doSelect(DBCon nection.java:
370)
at
com.sun.electron.utils.DBConnection.isAliveAtDBLev el(DBConnection.java:
196)
at com.sun.electron.utils.DBConnection.isAlive(DBConn ection.java:
185)
at
com.sun.electron.utils.DBConnection.getConnectionS tate(DBConnection.java:
207)
at
com.sun.electron.utils.DBConnection.printStates(DB Connection.java:224)
at com.sun.electron.utils.RweServer.main(RweServer.ja va:101)
Caused by: java.io.EOFException: Can not read response from server.
Expected to read 4 bytes, read 0 bytes before connection was
unexpectedly lost.
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2332 )
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO. java:2774)
... 15 more


** END NESTED EXCEPTION **

Reply With Quote
  #2  
Old   
Mau C
 
Posts: n/a

Default Re: is mysql at fault for this JDBC error? (com.mysql.jdbc.exceptions.jdbc4.CommunicationsExc eption) - 04-27-2011 , 05:16 AM






Il 27/04/2011 8.39, terry433iid (AT) yahoo (DOT) com ha scritto:
[...]
Quote:
I cannot find any good info on the web for the error, so any feedback
appreciated
I rarely get the same error using a standalone application and the
Apache dbcp connection pool. A definitive answer seems to be not
existing (except '42'). The common problem should be a failure link to
the database server (network errors).

regards,
M.

Reply With Quote
  #3  
Old   
Peter H. Coffin
 
Posts: n/a

Default Re: is mysql at fault for this JDBC error?(com.mysql.jdbc.exceptions.jdbc4.Communicati onsException) - 04-27-2011 , 07:16 AM



On Tue, 26 Apr 2011 23:39:03 -0700 (PDT), terry433iid (AT) yahoo (DOT) com wrote:
Quote:
I am running a java class that queries mysql via JDBC, the database is
also servicing a GUI via tomcat (connection pool)

All of a sudden the java application crashes and below is the log file
output that I get

So - I'm left wondering if this is a mysql error......or tomcat
messing with connection pool ..... or JDBC error.....???

I cannot find any good info on the web for the error, so any feedback
appreciated



---------------------------------
SelectStr: show tables
Error while executing SQL transaction: No operations allowed after
connection closed.Connection was implicitly closed due to underlying
exception/error:


** BEGIN NESTED EXCEPTION **

com.mysql.jdbc.exceptions.jdbc4.CommunicationsExce ption
MESSAGE: Communications link failure

Last packet sent to the server was 1 ms ago.
The database connection went away unexpectedly. Probably because the
network means that the communications link was using got closed
unexpectedly. If the database is still running and other connections are
working, it's not the database doing it.

--
Christian Biblical literalists are trusting themselves to an archaic
English translation of a Latin translation of (help me here) Greek?
Aramaic? source. I wouldn't even trust a VCR manual to make it through
that intact. - Dr. Dee

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.