JDBCExceptionReporter:77 – SQL Error: 0, SQLState: 08S01

I have a scheduled job running with spring beans. It is scheduled such that it will run once in a day. Whenever I restart the webapp, it is running for the first day. but on the second day onwards, it is not running – quits with the below exception 😦 Seems to be an issue with DB connectivity. Need to look at it.

00:54:28,090  WARN JDBCExceptionReporter:77 - SQL Error: 0, SQLState: 08S01
00:54:28,090 ERROR JDBCExceptionReporter:78 - Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Software caused connection abort: socket write error

STACKTRACE:

java.net.SocketException: Software caused connection abort: socket write error
 at java.net.SocketOutputStream.socketWrite0(Native Method)
 at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
 at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
 at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2744)
 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
 at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
 at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
 at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)
 at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
 at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
 at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
 at org.hibernate.loader.Loader.doQuery(Loader.java:674)
 at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
 at org.hibernate.loader.Loader.doList(Loader.java:2220)
 at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
 at org.hibernate.loader.Loader.list(Loader.java:2099)
 at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
 at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
 at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
 at com.eginnovations.license.dao.LicenseDAO.listExpiry(LicenseDAO.java:106)
 at com.eginnovations.license.service.LicenseService.listExpiry(LicenseService.java:291)
 at com.eginnovations.license.jobs.ExpiryTimer.run(ExpiryTimer.java:85)
 at java.util.TimerThread.mainLoop(Timer.java:512)
 at java.util.TimerThread.run(Timer.java:462)

** END NESTED EXCEPTION **

Last packet sent to the server was 15 ms ago.
00:54:28,090 ERROR ExpiryTimer:95 - Error in expiry job
org.hibernate.exception.JDBCConnectionException: could not execute query
 at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:74)
 at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
 at org.hibernate.loader.Loader.doList(Loader.java:2223)
 at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
 at org.hibernate.loader.Loader.list(Loader.java:2099)
 at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
 at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
 at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
 at com.eginnovations.license.dao.LicenseDAO.listExpiry(LicenseDAO.java:106)
 at com.eginnovations.license.service.LicenseService.listExpiry(LicenseService.java:291)
 at com.eginnovations.license.jobs.ExpiryTimer.run(ExpiryTimer.java:85)
 at java.util.TimerThread.mainLoop(Timer.java:512)
 at java.util.TimerThread.run(Timer.java:462)
Caused by: com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.SocketException
MESSAGE: Software caused connection abort: socket write error

STACKTRACE:

java.net.SocketException: Software caused connection abort: socket write error
 at java.net.SocketOutputStream.socketWrite0(Native Method)
 at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
 at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
 at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
 at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
 at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2744)
 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
 at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
 at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
 at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)
 at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
 at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
 at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
 at org.hibernate.loader.Loader.doQuery(Loader.java:674)
 at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
 at org.hibernate.loader.Loader.doList(Loader.java:2220)
 at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
 at org.hibernate.loader.Loader.list(Loader.java:2099)
 at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:94)
 at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1569)
 at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
 at com.eginnovations.license.dao.LicenseDAO.listExpiry(LicenseDAO.java:106)
 at com.eginnovations.license.service.LicenseService.listExpiry(LicenseService.java:291)
 at com.eginnovations.license.jobs.ExpiryTimer.run(ExpiryTimer.java:85)
 at java.util.TimerThread.mainLoop(Timer.java:512)
 at java.util.TimerThread.run(Timer.java:462)

** END NESTED EXCEPTION **

Last packet sent to the server was 15 ms ago.
 at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2759)
 at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1612)
 at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
 at com.mysql.jdbc.Connection.execSQL(Connection.java:3283)
 at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1332)
 at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1467)
 at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
 at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
 at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
 at org.hibernate.loader.Loader.doQuery(Loader.java:674)
 at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
 at org.hibernate.loader.Loader.doList(Loader.java:2220)
 ... 10 more
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s