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

"SourceForge.net" <[email protected]> Thu, 10 Jun 2004 13:01:13 -0700
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
Bugs item #970675, was opened at 2004-06-10 15:01
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474136&aid=970675&group_id=54559

Category: persistence
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: FrESh (frezh)
Assigned to: Jim Alateras (jalateras)
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 !

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

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 the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504