Code:
org.hibernate.exception.GenericJDBCException: could not execute query
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:82)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:70)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:1518)
at org.hibernate.loader.Loader.list(Loader.java:1498)
at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:111)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1253)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:299)
at com.tmp.deal.business.HbMgr.getAll(HbMgr.java:55)
at com.tmp.deal.business.BusinessSessionFactoryTest.testBusinessSessionFactory(BusinessSessionFactoryTest.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Caused by: java.sql.SQLException: JZ0S2: Statement object has already been closed.
at com.sybase.jdbc3.jdbc.ErrorMessage.raiseError(ErrorMessage.java:565)
at com.sybase.jdbc3.jdbc.SybStatement.checkDead(SybStatement.java:2051)
at com.sybase.jdbc3.jdbc.SybStatement.close(SybStatement.java:487)
at com.sybase.jdbc3.jdbc.SybStatement.close(SybStatement.java:475)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.close(NewProxyPreparedStatement.java:1674)
at org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:393)
at org.hibernate.jdbc.AbstractBatcher.closeStatement(AbstractBatcher.java:195)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:212)
at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:141)
at org.hibernate.loader.Loader.doQuery(Loader.java:408)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:206)
at org.hibernate.loader.Loader.doList(Loader.java:1515)
... 21 more
Surprisingly, the same code works on my PC. Maybe something dependent to threading ?
Thank you in advance.
[/code]