File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Communications link failure in JBOSS

 
skumar mk
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a web application running on the JBOSS 4.0 server and Database is MySQL5.0.
We are using MySQL Connection/J as driver template while configuring HIBERNATE3.1

It is running success but we left the application for idle (without doing any operations) it is giving following Exception. Both server and MySQL are running on the same machine.


[org.hibernate.util.JDBCExceptionReporter] could not execute query

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Software caused connection abort: recv failed

STACKTRACE:

java.net.SocketException: Software caused connection abort: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)

** END NESTED EXCEPTION **


Last packet sent to the server was 454 ms ago.
at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2586)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2874)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
2008-08-08 08:01:07,368 ERROR [org.hibernate.util.JDBCExceptionReporter] Communications link failure due to underlying exception:



Also I modified in the hibernate-config.xml file

Jbdc://mysql://localhost:3306/mydb?autoreconnect=true

Still am getting the same.

Please help me out.
 
skumar mk
Greenhorn
Posts: 12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI All,
I got a solution for this problem.
We implemented Shedular class which executes for sepecified time.The code in this class will have a DB interaction
[ August 27, 2008: Message edited by: skumar mk ]
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic