[ openjms-Bugs-970675 ] java.sql.SQLException: Communication link failure: java.io.E

"SourceForge.net" <[email protected]> Fri, 02 Dec 2005 04:24:02 -0800
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
Bugs item #970675, was opened at 2004-06-11 06:01
Message generated for change (Settings changed) made by tanderson
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=970675&group_id=54559

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: persistence
Group: None
>Status: Closed
>Resolution: Out of Date
Priority: 5
Submitted By: FrESh (frezh)
>Assigned to: Tim Anderson (tanderson)
Summary: java.sql.SQLException: Communication link failure: java.io.E

Initial Comment:
I was doing some performance testings, by having
several threads posting persistent messages to a topic,
and OpenJMS crashed with the appended exception, and
the messages pending to process were lost.

Then, without reseting OpenJMS nor My consumer thread,
I sent more messages from some other publishing threads
and worked, and so on, some tests were successfull and
others were not.

I some one could tell me why, or the piece of code that
should be worked out, I'm willing to cooperate !

It migth be the db driver's problem, I'm using MySQL
with the org.gjt.mm.mysql.Driver driver, I'm not sure
if it is the latest version, but I think it is. this is
a fragment of my config file:

 <RdbmsDatabaseConfiguration
      driver="org.gjt.mm.mysql.Driver"
      url="jdbc:mysql://localhost:3306/openjms"
      user="openjms"
      password="openjms"
      maxActive="10"
      maxIdle="5"
      evictionInterval="3600"
      testQuery="select current_date" />
  </DatabaseConfiguration>


And here the exception trace:

14:38:05.952 ERROR [RMI TCP Connection(446)-127.0.0.1]
- Failed to make message persistent
org.exolab.jms.persistence.PersistenceException:
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:1388)
        at
com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1532)
        at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1923)
        at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1900)
        at
com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:950)
        at
com.mysql.jdbc.Connection.createNewIO(Connection.java:1771)
        at
com.mysql.jdbc.Connection.<init>(Connection.java:440)
        at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
        at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:82)
        at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:300)
        at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:816)
        at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:140)
        at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
        at
org.exolab.jms.persistence.DBCPConnectionManager.getConnection(DBCPConnectionManager.java:119)
        at
org.exolab.jms.persistence.RDBMSAdapter.getConnection(RDBMSAdapter.java:709)
        at
org.exolab.jms.persistence.DatabaseService.getConnection(DatabaseService.java:142)
        at
org.exolab.jms.messagemgr.MessageMgr.addPersistentMessage(MessageMgr.java:366)
        at
org.exolab.jms.messagemgr.MessageMgr.add(MessageMgr.java:281)
        at
org.exolab.jms.server.JmsServerSession.sendMessage(JmsServerSession.java:350)
        at
org.exolab.jms.server.rmi.RmiJmsServerSession.sendMessage(RmiJmsServerSession.java:174)
        at
sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
        at
sun.rmi.transport.Transport$1.run(Transport.java:148)
        at
java.security.AccessController.doPrivileged(Native Method)
        at
sun.rmi.transport.Transport.serviceCall(Transport.java:144)
        at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:534)
 
 
** END NESTED EXCEPTION **
 
 
        at
com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:1707)
        at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1923)
        at
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1900)
        at
com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:950)
        at
com.mysql.jdbc.Connection.createNewIO(Connection.java:1771)
        at
com.mysql.jdbc.Connection.<init>(Connection.java:440)
        at
com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:400)
        at
org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:82)
        at
org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:300)
        at
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:816)
        at
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:140)
        at
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:518)
        at
org.exolab.jms.persistence.DBCPConnectionManager.getConnection(DBCPConnectionManager.java:119)
        at
org.exolab.jms.persistence.RDBMSAdapter.getConnection(RDBMSAdapter.java:709)
        at
org.exolab.jms.persistence.DatabaseService.getConnection(DatabaseService.java:142)
        at
org.exolab.jms.messagemgr.MessageMgr.addPersistentMessage(MessageMgr.java:366)
        at
org.exolab.jms.messagemgr.MessageMgr.add(MessageMgr.java:281)
        at
org.exolab.jms.server.JmsServerSession.sendMessage(JmsServerSession.java:350)
        at
org.exolab.jms.server.rmi.RmiJmsServerSession.sendMessage(RmiJmsServerSession.java:174)
        at
sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
        at
sun.rmi.transport.Transport$1.run(Transport.java:148)
        at
java.security.AccessController.doPrivileged(Native Method)
        at
sun.rmi.transport.Transport.serviceCall(Transport.java:144)
        at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:534)
14:38:05.955 ERROR [RMI TCP Connection(446)-127.0.0.1]
- Failed to process message
javax.jms.JMSException: Failed to make message
persistent:
org.exolab.jms.persistence.PersistenceException: Failed
to get pooled connection
        at
org.exolab.jms.messagemgr.MessageMgr.addPersistentMessage(MessageMgr.java:397)
        at
org.exolab.jms.messagemgr.MessageMgr.add(MessageMgr.java:281)
        at
org.exolab.jms.server.JmsServerSession.sendMessage(JmsServerSession.java:350)
        at
org.exolab.jms.server.rmi.RmiJmsServerSession.sendMessage(RmiJmsServerSession.java:174)
        at
sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
        at
sun.rmi.transport.Transport$1.run(Transport.java:148)
        at
java.security.AccessController.doPrivileged(Native Method)
        at
sun.rmi.transport.Transport.serviceCall(Transport.java:144)
        at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
        at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
        at java.lang.Thread.run(Thread.java:534)

Thank a lot to All !

----------------------------------------------------------------------

>Comment By: Tim Anderson (tanderson)
Date: 2005-12-02 23:24

Message:
Logged In: YES 
user_id=557161

Closing this. Re-open if the problem exists with 0.7.7.x and
using the most recent MySQL drivers.

----------------------------------------------------------------------

Comment By: Tim Anderson (tanderson)
Date: 2004-06-30 12:23

Message:
Logged In: YES 
user_id=557161

The stack trace indicates that the connection to the MySQL 
server has been lost. Check your MySQL server logs to help 
locate the cause.

Also:
. the latest production MySQL JDBC drivers is 3.0.14: 
http://dev.mysql.com/downloads/connector/j/3.0.html
. the org.gjt.mm.mysql.Driver class has been deprecated, 
replaced by com.mysql.jdbc.Driver




----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=970675&group_id=54559


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click