Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Begin Nested Exception

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.)
reply
    Bookmark Topic Watch Topic
  • New Topic