-1

Getting org.javalite.activejdbc.DBException frequently while connecting to DB using activejdbc**

Please help to know why this is happening frequently??

exception occurred while getting user : org.javalite.activejdbc.DBException:

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** >
java.net.SocketException MESSAGE: Connection reset by peer: socket write error>
STACKTRACE:>
java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(Unknown Source) at java.net.SocketOutputStream.write(Unknown Source) at java.io.BufferedOutputStream.flushBuffer(Unknown Source) at java.io.BufferedOutputStream.flush(Unknown Source) at com.mysql.jdbc.MysqlIO.send(MysqlIO.java:2637) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1554) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1665) at com.mysql.jdbc.Connection.execSQL(Connection.java:3176) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1153) at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1266) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:353) at org.javalite.activejdbc.DB.find(DB.java:505) at org.javalite.activejdbc.LazyList.hydrate(LazyList.java:329) at org.javalite.activejdbc.AbstractLazyList.isEmpty(AbstractLazyList.java:42) at org.javalite.activejdbc.ModelDelegate.findFirst(ModelDelegate.java:223) at com.nb.ats.db.model.UserModel.findFirst(UserModel.java:2358)

** END NESTED EXCEPTION **>
Last packet sent to the server was 0 ms ago.,*

I am using the activejdbc-1.4.14.j7-20180227.053828-4.jar with MYSQLDB

Please help to know why this is happening frequently?? And how to fix this error?

Thanks in advance

JP. Aulet
  • 4,375
  • 4
  • 26
  • 39

1 Answers1

0

"Connection reset by peer.." means your application loses a connection to the database. You may have a network or some other connectivity issue. ActiveJDBC has nothing to so with it,

ipolevoy
  • 5,432
  • 2
  • 31
  • 46