File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes Communications link failure  in JBOSS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Communications link failure  in JBOSS" Watch "Communications link failure  in JBOSS" New topic
Author

Communications link failure in JBOSS

skumar mk
Greenhorn

Joined: Jul 02, 2008
Posts: 12
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

Joined: Jul 02, 2008
Posts: 12
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Communications link failure in JBOSS