This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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 ]
 
wood burning stoves
 
subject: Communications link failure in JBOSS