aspose file tools*
The moose likes JDBC and the fly likes Begin Nested Exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Begin Nested Exception" Watch "Begin Nested Exception" New topic
Author

Begin Nested Exception

Vivek Ashok Kumar
Greenhorn

Joined: Aug 30, 2011
Posts: 1
I'm getting an error called Begin Nested Exception while running my batch file which is used to insert data into MySql database from an Excel. the error as follows

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

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Connection reset

STACKTRACE:

java.net.SocketException: Connection reset

at java.net.SocketInputStream.read(SocketInputStream.java:168)

at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:113)

at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:160)

at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:188)

at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1994)

at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2411)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2916)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)

at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)

at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)

at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:874)

at com.applicationavail.ServiceAvailBatch.insertDatas(ServiceAvailBatch.java:149)

at com.applicationavail.ApplicationMain.main(ApplicationMain.java:22)



** END NESTED EXCEPTION **



Last packet sent to the server was 21298 ms ago.

at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2622)

at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2916)

at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)

at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)

at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)

at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1313)

at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:874)

at com.applicationavail.ServiceAvailBatch.insertDatas(ServiceAvailBatch.java:149)

at com.applicationavail.ApplicationMain.main(ApplicationMain.java:22)

30 Aug 2011 18:11:49 [main ] ERROR com.util.DBConnect.dbRollback(DBConnect.java:80) - SQLException :
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Connection.close() has already been called. Invalid operation in this state.

at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:888)

at com.mysql.jdbc.Connection.getMutex(Connection.java:3728)

at com.mysql.jdbc.Connection.rollback(Connection.java:5204)

at com.util.DBConnect.dbRollback(DBConnect.java:77)

at com.applicationavail.ServiceAvailBatch.insertDatas(ServiceAvailBatch.java:163)

at com.applicationavail.ApplicationMain.main(ApplicationMain.java:22)

30 Aug 2011 18:11:49 [main ] INFO com.hclt.util.ExcelUtil.closeWorkbook(ExcelUtil.java:51) - Closed workbook.
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2503
    
    8

See: ERROR com.util.DBConnect.dbRollback(DBConnect.java:80) - SQLException :
com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Connection.close() has already been called. Invalid operation in this state.



(are you working on the planning applicatuin Avail? Interesting.)


OCUP UML fundamental and ITIL foundation
youtube channel
 
Consider Paul's rocket mass heater.
 
subject: Begin Nested Exception