This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Begin Nested Exception

 
Vivek Ashok Kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2584
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic