Проект - веб-сервис на SpringMVC+Hibernate, используется PostgreSQL.
После запуска проекта первое время запросы нормально выполняются, а затем каждые пару-тройку запросов вываливается с ошибкой «ResultSet закрыт».
Причем, такую проблему я замечаю только на запросах, которые возвращают относительно много данных (в данном случае 4500 строк).
Вот DAO который используется.
Вот applicationContext.xml.
Вот сам стек ошибки. В чем может быть дело?.. Спасибо.
2015-07-16 15:09:14,535 [http-nio-8080-exec-3] WARN (SqlExceptionHelper.java:144) Ð SQL Error: 0, SQLState: 08003
2015-07-16 15:09:14,535 [http-nio-8080-exec-3] ERROR (SqlExceptionHelper.java:146) Ð ResultSet закрыт.
июл 16, 2015 3:09:14 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [services] in context with path [/autopark] threw exception [Request processing failed; nested exception is org.hibernate.exception.JDBCConnectionException: could not execute query] with root cause
org.postgresql.util.PSQLException: ResultSet закрыт.
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkClosed(AbstractJdbc2ResultSet.java:2674)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.findColumn(AbstractJdbc2ResultSet.java:2558)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getInt(AbstractJdbc2ResultSet.java:2426)
at org.apache.tomcat.dbcp.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:283)
at org.apache.tomcat.dbcp.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:283)
at org.apache.tomcat.dbcp.dbcp2.DelegatingResultSet.getInt(DelegatingResultSet.java:283)
at org.hibernate.type.descriptor.sql.IntegerTypeDescriptor$2.doExtract(IntegerTypeDescriptor.java:74)
at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:267)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:263)
at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:253)
at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:338)
at org.hibernate.loader.Loader.extractKeysFromResultSet(Loader.java:784)
at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:720)
at org.hibernate.loader.Loader.processResultSet(Loader.java:952)
at org.hibernate.loader.Loader.doQuery(Loader.java:920)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354)
at org.hibernate.loader.Loader.doList(Loader.java:2553)
at org.hibernate.loader.Loader.doList(Loader.java:2539)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2369)
at org.hibernate.loader.Loader.list(Loader.java:2364)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:496)
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387)
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:231)
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1264)
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:103)
at org.softlog.autopark.dao.hibernate.HibernateDao.list(HibernateDao.java:94)
at org.softlog.autopark.dao.hibernate.PointDaoImpl.findByRace(PointDaoImpl.java:14)
at org.softlog.autopark.service.PointService.findByRace(PointService.java:21)
at org.softlog.autopark.service.PointService$$FastClassBySpringCGLIB$$fbc71ed5.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:711)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:644)
at org.softlog.autopark.service.PointService$$EnhancerBySpringCGLIB$$a987bdef.findByRace(<generated>)
at org.softlog.autopark.controller.RaceController.getTrack(RaceController.java:134)