I'm getting a Software caused connection abort: socket write error in my Code when connected to a particular Oracle DB only . with other DB it works fine. Below is the error
WARN - SQL Error: 17002, SQLState: null
org.hibernate.exception.GenericJDBCException: could not execute query
org.hibernate.exception.SQLStateConverter.handledNonSpecificException org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
org.hibernate.loader.Loader.doList(Loader.java:2536)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
org.hibernate.loader.Loader.list(Loader.java:2271)
org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716)
org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
failed org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2536)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
at org.hibernate.loader.Loader.list(Loader.java:2271)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionCaused by:
**java.sql.SQLException: Io exception: Software caused connection abort: socket write error**
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:333)
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:648)
at oracle.jdbc.driver.OraclePreparedStatement.privateClose(OraclePreparedStatement.java:485)
at oracle.jdbc.driver.OraclePreparedStatement.close(OraclePreparedStatement.java:393)
at org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:563)
at org.hibernate.jdbc.AbstractBatcher.closeStatement(AbstractBatcher.java:291)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:307)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:234)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1967)
at org.hibernate.loader.Loader.doQuery(Loader.java:802)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
at org.hibernate.loader.Loader.doList(Loader.java:2533)
i have below method Which uses hibernate Criteria
public List<SET> findMaxProcessId(Session session, Site logS) {
try {
List<SET> listRackIdProcessed = new ArrayList<SET>();
List<Integer> listMax= new ArrayList<Integer>();
List<CInvoicingProcessResult> IistMax= findRackIdWithMaxInv(session, logS);
// session.getTransaction().setTimeout(120);
Criteria crit = session.createCriteria(InvoicingProcess.class);
manageListInvProcessId(crit, listMax);
//Here it check if List is greater than 1000 if yes it divides it in subList
crit.setProjection(Projections.distinct(Projections.property("set")));
listProcessed = crit.list(); // **Getting ERROR HERE**
// session.getTransaction().commit();
}
return listProcessed;
} catch (RuntimeException re) {
log.error("failed", re);
throw re;
}
}
I have also tried using session.getTransaction().setTimeout(120); too but didn't work.
Why is this error Occuring when i try to get > crit.list()
I'm not able to find any solution.