org.hibernate.exception.GenericJDBCException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Hi , i have a issue reported with jboss 5.1, linux and java based hibernate ,oracle 11.2.3.0 DB,Hibernate 3.3.2.GA while load testing for application for jboss on one JVM load balanced on each server ( i.e 2 JVM) heap 1.5 GB while running test for 200 users i was able to perform the test successfully . session are getting closed up and it happens afters say exactly 22 min for test for 400 users , for 200 users it works fine. his is my hibernate properties files it uses jndi name to connect i.e via ds.xml file of jboss 03:29:45,068 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled 03:29:45,068 INFO [SettingsFactory] Automatic session close at end of transaction: disabled 03:29:45,070 INFO [SettingsFactory] Scrollable result sets: enabled 03:29:45,070 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled 03:29:45,071 INFO [SettingsFactory] Connection release mode: auto 03:29:45,072 INFO [SettingsFactory] Default batch fetch size: 4 03:29:45,072 INFO [SettingsFactory] Generate SQL with comments: disabled 03:29:45,072 INFO [SettingsFactory] Order SQL updates by primary key: disabled 03:29:45,073 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory 03:29:45,078 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory 03:29:45,079 INFO [SettingsFactory] Query language substitutions: {} 03:29:45,079 INFO [SettingsFactory] JPA-QL strict compliance: disabled 03:29:45,079 INFO [SettingsFactory] Second-level cache: disabled 03:29:45,079 INFO [SettingsFactory] Query cache: disabled 03:29:45,079 INFO [SettingsFactory] Optimize cache for minimal puts: disabled 03:29:45,079 INFO [SettingsFactory] Structured second-level cache entries: disabled 03:29:45,092 INFO [SettingsFactory] Statistics: disabled also changed the Connection release mode to on close and track transation but no where it helps as i increase the amount of users to 400 after exact 20 mins of test i start getting errors as unable to get managed connection following is the ds.xml file into min-pool-size>1</min-pool-size> <max-pool-size>64</max-pool-size> <query-timeout>300</query-timeout> <idle-timeout-minutes>0</idle-timeout-minutes> <blocking-timeout-millis>50000</blocking-timeout-millis> <use-strict-min>true</use-strict-min> <track-statements>true</track-statements> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name> <metadata> <type-mapping>Oracle11g</type-mapping> </metadata> </local-tx-datasource> </datasources> 2012-05-19 02:54:01,406 INFO [org.hibernate.cfg.SettingsFactory] (main) Automatic flush during beforeCompletion(): disabled 2012-05-19 02:54:01,406 INFO [org.hibernate.cfg.SettingsFactory] (main) Automatic session close at end of transaction: disabled 2012-05-19 02:54:01,407 INFO [org.hibernate.cfg.SettingsFactory] (main) Scrollable result sets: enabled 2012-05-19 02:54:01,407 INFO [org.hibernate.cfg.SettingsFactory] (main) JDBC3 getGeneratedKeys(): disabled 2012-05-19 02:54:01,407 INFO [org.hibernate.cfg.SettingsFactory] (main) Connection release mode: auto 2012-05-19 02:54:01,408 INFO [org.hibernate.cfg.SettingsFactory] (main) Default batch fetch size: 4 2012-05-19 02:54:01,409 INFO [org.hibernate.cfg.SettingsFactory] (main) Generate SQL with comments: disabled 2012-05-19 02:54:01,409 INFO [org.hibernate.cfg.SettingsFactory] (main) Order SQL updates by primary key: disabled 2012-05-19 02:54:01,409 INFO [org.hibernate.cfg.SettingsFactory] (main) Order SQL inserts for batching: disabled 2012-05-19 02:54:01,409 INFO [org.hibernate.cfg.SettingsFactory] (main) Query translator: org.hibernate.hql.ast.ASTQueryTranslatorF actory 2012-05-19 02:54:01,413 INFO [org.hibernate.hql.ast.ASTQueryTranslatorFactory] (main) Using ASTQueryTranslatorFactory 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) Query language substitutions: {} 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) JPA-QL strict compliance: disabled 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) Second-level cache: disabled 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) Query cache: disabled 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) Cache region factory : org.hibernate.cache.impl.NoCachingRe gionFactory 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) Optimize cache for minimal puts: disabled 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) Structured second-level cache entries: disabled 2012-05-19 02:54:01,422 INFO [org.hibernate.cfg.SettingsFactory] (main) Statistics: disabled 2012-05-19 02:54:01,423 INFO [org.hibernate.cfg.SettingsFactory] (main) Deleted entity synthetic identifier rollback: disabled 2012-05-19 02:54:01,423 INFO [org.hibernate.cfg.SettingsFactory] (main) Default entity-mode: pojo 2012-05-19 02:54:01,423 INFO [org.hibernate.cfg.SettingsFactory] (main) Named query checking : enabled error msg org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1577) at org.hibernate.loader.Loader.doQuery(Loader.java:696) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2057) at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:70) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:587) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventL istener.java:83) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1744) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108) at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272) at com.pepsico.mya.bonus.domain.verification.VerificationRecordCalcSheet.populateBonusRecordDetails(VerificationRecordCalcSh eet.java:153) at com.pepsico.mya.bonus.domain.verification.VerificationRecordCalcSheet.getEmployeeRecordsFromForecast(VerificationRecordCa lcSheet.java:60) at com.pepsico.mya.bonus.domain.verification.VerificationRecordCalcSheet.getCurrentVerificationRecord(VerificationRecordCalc Sheet.java:34) at com.pepsico.mya.bonus.struts.verification.ViewVerificationSheetAction.execute(ViewVerificationSheetAction.java:168) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.RoleModeFilter.doFilter(RoleModeFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.security.SecurityContextFilter.doFilter(SecurityContextFilter.java:138) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.LocaleFilter.doFilter(LocaleFilter.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.SessionSettingsFilter.doFilter(SessionSettingsFilter.java:187) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:8 1) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:436) at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:384) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451) at java.lang.Thread.run(Thread.java:662) Caused by: org.jboss.util.NestedSQLException: Unable to get managed connection for jdbc/mya/bonusPool; - nested throwable: (javax.re source.ResourceException: Unable to get managed connection for jdbc/mya/bonusPool) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java :82) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) ... 84 more Caused by: javax.resource.ResourceException: Unable to get managed connection for jdbc/mya/bonusPool at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:441) at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:424) at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496) at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManag er2.java:941) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89) ... 86 more Caused by: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 50000 [ms] ) at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:311) at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:69 0) at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404) ... 90 more 2012-05-19 03:36:46,258 ERROR [com.pepsico.mya.bonus.exception.ApplicationException] (ajp-lrhisa02.hewitt.com%2F10.20.95.36-12002-17 6) Entity is still being used in the application. 2012-05-19 03:36:46,262 ERROR [com.pepsico.mya.bonus.exception.BusinessException] (ajp-lrhisa02.hewitt.com%2F10.20.95.36-12002-176) Entity is still being used in the application. 2012-05-19 03:36:40,158 ERROR [com.pepsico.mya.bonus.struts.calcsheet.CalculationSheetLoadAction] (ajp-lrhisa02.hewitt.com%2F10.20.9 5.36-12002-156) Unable to create verification record sheet org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1577) at org.hibernate.loader.Loader.doQuery(Loader.java:696) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2057) at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:70) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:587) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventL istener.java:83) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1744) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108) at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272) at com.pepsico.mya.bonus.domain.verification.VerificationRecordCalcSheet.populateBonusRecordDetails(VerificationRecordCalcSh eet.java:153) at com.pepsico.mya.bonus.domain.verification.VerificationRecordCalcSheet.getEmployeeRecordsFromForecast(VerificationRecordCa lcSheet.java:60) at com.pepsico.mya.bonus.domain.verification.VerificationRecordCalcSheet.getCurrentVerificationRecord(VerificationRecordCalc Sheet.java:34) at com.pepsico.mya.bonus.struts.verification.ViewVerificationSheetAction.execute(ViewVerificationSheetAction.java:168) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1078) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:295) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:396) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:347) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:232) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.RoleModeFilter.doFilter(RoleModeFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.security.SecurityContextFilter.doFilter(SecurityContextFilter.java:138) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.LocaleFilter.doFilter(LocaleFilter.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.SessionSettingsFilter.doFilter(SessionSettingsFilter.java:187) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) Caused by: org.jboss.util.NestedSQLException: Unable to get managed connection for jdbc/mya/bonusPool; - nested throwable: (javax.re source.ResourceException: Unable to get managed connection for jdbc/mya/bonusPool) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java :82) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) ... 99 more Caused by: javax.resource.ResourceException: Unable to get managed connection for jdbc/mya/bonusPool at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:441) at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:424) at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496) at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManag er2.java:941) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89) ... 101 more Caused by: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 50000 [ms] ) at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:311) at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:69 0) at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404) ... 105 more 2012-05-19 03:36:40,198 ERROR [com.pepsico.mya.bonus.struts.calcsheet.CalculationSheetLoadAction] (ajp-lrhisa02.hewitt.com%2F10.20.9 5.36-12002-140) Unable to create verification record sheet org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1577) at org.hibernate.loader.Loader.doQuery(Loader.java:696) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2057) at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:70) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:587) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventL istener.java:83) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1744) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108) at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272) Please provide some resolution for troubleshooting.
    via by shirishmaurya,
  • Hi , i have a issue reported with jboss 5.1, linux and java based hibernate ,oracle 11.2.3.0 DB,Hibernate 3.3.2.GA while load testing for application for jboss on one JVM load balanced on each server ( i.e 2 JVM) heap 1.5 GB while running test for 200 users i was able to perform the test successfully . session are getting closed up and it happens afters say exactly 22 min for test for 400 users , for 200 users it works fine. his is my hibernate properties files it uses jndi name to connect i.e via ds.xml file of jboss 03:29:45,068 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled 03:29:45,068 INFO [SettingsFactory] Automatic session close at end of transaction: disabled 03:29:45,070 INFO [SettingsFactory] Scrollable result sets: enabled 03:29:45,070 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled 03:29:45,071 INFO [SettingsFactory] Connection release mode: auto 03:29:45,072 INFO [SettingsFactory] Default batch fetch size: 4 03:29:45,072 INFO [SettingsFactory] Generate SQL with comments: disabled 03:29:45,072 INFO [SettingsFactory] Order SQL updates by primary key: disabled 03:29:45,073 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory 03:29:45,078 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory 03:29:45,079 INFO [SettingsFactory] Query language substitutions: {} 03:29:45,079 INFO [SettingsFactory] JPA-QL strict compliance: disabled 03:29:45,079 INFO [SettingsFactory] Second-level cache: disabled 03:29:45,079 INFO [SettingsFactory] Query cache: disabled 03:29:45,079 INFO [SettingsFactory] Optimize cache for minimal puts: disabled 03:29:45,079 INFO [SettingsFactory] Structured second-level cache entries: disabled 03:29:45,092 INFO [SettingsFactory] Statistics: disabled also changed the Connection release mode to on close and track transation but no where it helps as i increase the amount of users to 400 after exact 20 mins of test i start getting errors as unable to get managed connection following is the ds.xml file into min-pool-size>1</min-pool-size> <max-pool-size>64</max-pool-size> <query-timeout>300</query-timeout> <idle-timeout-minutes>0</idle-timeout-minutes> <blocking-timeout-millis>50000</blocking-timeout-millis> <use-strict-min>true</use-strict-min> <track-statements>true</track-statements> <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name> <metadata> <type-mapping>Oracle11g</type-mapping> </metadata> </local-tx-datasource> </datasources> 2012-05-19 02:54:01,406 INFO [org.hibernate.cfg.SettingsFactory] (main) Automatic flush during beforeCompletion(): disabled 2012-05-19 02:54:01,406 INFO [org.hibernate.cfg.SettingsFactory] (main) Automatic session close at end of transaction: disabled 2012-05-19 02:54:01,407 INFO [org.hibernate.cfg.SettingsFactory] (main) Scrollable result sets: enabled 2012-05-19 02:54:01,407 INFO [org.hibernate.cfg.SettingsFactory] (main) JDBC3 getGeneratedKeys(): disabled 2012-05-19 02:54:01,407 INFO [org.hibernate.cfg.SettingsFactory] (main) Connection release mode: auto 2012-05-19 02:54:01,408 INFO [org.hibernate.cfg.SettingsFactory] (main) Default batch fetch size: 4 2012-05-19 02:54:01,409 INFO [org.hibernate.cfg.SettingsFactory] (main) Generate SQL with comments: disabled 2012-05-19 02:54:01,409 INFO [org.hibernate.cfg.SettingsFactory] (main) Order SQL updates by primary key: disabled 2012-05-19 02:54:01,409 INFO [org.hibernate.cfg.SettingsFactory] (main) Order SQL inserts for batching: disabled 2012-05-19 02:54:01,409 INFO [org.hibernate.cfg.SettingsFactory] (main) Query translator: org.hibernate.hql.ast.ASTQueryTranslatorF actory 2012-05-19 02:54:01,413 INFO [org.hibernate.hql.ast.ASTQueryTranslatorFactory] (main) Using ASTQueryTranslatorFactory 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) Query language substitutions: {} 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) JPA-QL strict compliance: disabled 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) Second-level cache: disabled 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) Query cache: disabled 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) Cache region factory : org.hibernate.cache.impl.NoCachingRe gionFactory 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) Optimize cache for minimal puts: disabled 2012-05-19 02:54:01,413 INFO [org.hibernate.cfg.SettingsFactory] (main) Structured second-level cache entries: disabled 2012-05-19 02:54:01,422 INFO [org.hibernate.cfg.SettingsFactory] (main) Statistics: disabled 2012-05-19 02:54:01,423 INFO [org.hibernate.cfg.SettingsFactory] (main) Deleted entity synthetic identifier rollback: disabled 2012-05-19 02:54:01,423 INFO [org.hibernate.cfg.SettingsFactory] (main) Default entity-mode: pojo 2012-05-19 02:54:01,423 INFO [org.hibernate.cfg.SettingsFactory] (main) Named query checking : enabled error msg org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1577) at org.hibernate.loader.Loader.doQuery(Loader.java:696) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2057) at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:70) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:587) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventL istener.java:83) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1744) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108) at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272) at com.pepsico.mya.bonus.domain.verification.VerificationRecordCalcSheet.populateBonusRecordDetails(VerificationRecordCalcSh eet.java:153) at com.pepsico.mya.bonus.domain.verification.VerificationRecordCalcSheet.getEmployeeRecordsFromForecast(VerificationRecordCa lcSheet.java:60) at com.pepsico.mya.bonus.domain.verification.VerificationRecordCalcSheet.getCurrentVerificationRecord(VerificationRecordCalc Sheet.java:34) at com.pepsico.mya.bonus.struts.verification.ViewVerificationSheetAction.execute(ViewVerificationSheetAction.java:168) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:449) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.RoleModeFilter.doFilter(RoleModeFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.security.SecurityContextFilter.doFilter(SecurityContextFilter.java:138) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.LocaleFilter.doFilter(LocaleFilter.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.SessionSettingsFilter.doFilter(SessionSettingsFilter.java:187) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:124) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:8 1) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.ui.logout.LogoutFilter.doFilter(LogoutFilter.java:110) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:436) at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:384) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451) at java.lang.Thread.run(Thread.java:662) Caused by: org.jboss.util.NestedSQLException: Unable to get managed connection for jdbc/mya/bonusPool; - nested throwable: (javax.re source.ResourceException: Unable to get managed connection for jdbc/mya/bonusPool) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java :82) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) ... 84 more Caused by: javax.resource.ResourceException: Unable to get managed connection for jdbc/mya/bonusPool at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:441) at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:424) at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496) at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManag er2.java:941) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89) ... 86 more Caused by: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 50000 [ms] ) at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:311) at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:69 0) at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404) ... 90 more 2012-05-19 03:36:46,258 ERROR [com.pepsico.mya.bonus.exception.ApplicationException] (ajp-lrhisa02.hewitt.com%2F10.20.95.36-12002-17 6) Entity is still being used in the application. 2012-05-19 03:36:46,262 ERROR [com.pepsico.mya.bonus.exception.BusinessException] (ajp-lrhisa02.hewitt.com%2F10.20.95.36-12002-176) Entity is still being used in the application. 2012-05-19 03:36:40,158 ERROR [com.pepsico.mya.bonus.struts.calcsheet.CalculationSheetLoadAction] (ajp-lrhisa02.hewitt.com%2F10.20.9 5.36-12002-156) Unable to create verification record sheet org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1577) at org.hibernate.loader.Loader.doQuery(Loader.java:696) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2057) at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:70) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:587) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventL istener.java:83) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1744) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108) at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272) at com.pepsico.mya.bonus.domain.verification.VerificationRecordCalcSheet.populateBonusRecordDetails(VerificationRecordCalcSh eet.java:153) at com.pepsico.mya.bonus.domain.verification.VerificationRecordCalcSheet.getEmployeeRecordsFromForecast(VerificationRecordCa lcSheet.java:60) at com.pepsico.mya.bonus.domain.verification.VerificationRecordCalcSheet.getCurrentVerificationRecord(VerificationRecordCalc Sheet.java:34) at com.pepsico.mya.bonus.struts.verification.ViewVerificationSheetAction.execute(ViewVerificationSheetAction.java:168) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:444) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1078) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:295) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:396) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:347) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:232) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.RoleModeFilter.doFilter(RoleModeFilter.java:44) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.security.SecurityContextFilter.doFilter(SecurityContextFilter.java:138) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.LocaleFilter.doFilter(LocaleFilter.java:59) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.ApplicationContextFilter.doFilter(ApplicationContextFilter.java:86) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.pepsico.mya.bonus.webapp.SessionSettingsFilter.doFilter(SessionSettingsFilter.java:187) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:265) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107) at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:275) Caused by: org.jboss.util.NestedSQLException: Unable to get managed connection for jdbc/mya/bonusPool; - nested throwable: (javax.re source.ResourceException: Unable to get managed connection for jdbc/mya/bonusPool) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:95) at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java :82) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446) ... 99 more Caused by: javax.resource.ResourceException: Unable to get managed connection for jdbc/mya/bonusPool at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:441) at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:424) at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496) at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManag er2.java:941) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:89) ... 101 more Caused by: javax.resource.ResourceException: No ManagedConnections available within configured blocking timeout ( 50000 [ms] ) at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:311) at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:69 0) at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404) ... 105 more 2012-05-19 03:36:40,198 ERROR [com.pepsico.mya.bonus.struts.calcsheet.CalculationSheetLoadAction] (ajp-lrhisa02.hewitt.com%2F10.20.9 5.36-12002-140) Unable to create verification record sheet org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1577) at org.hibernate.loader.Loader.doQuery(Loader.java:696) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2057) at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:70) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:587) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventL istener.java:83) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1744) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108) at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272) Please provide some resolution for troubleshooting.
    via by shirishmaurya,
  • cannot get connection: general error
    via by Unknown author,
  • It seems that OpenSessionInView doesn't work with Weblogic 8.1 JTA/Hibernate. Here is the execution flow: DEBUG 10/24/06-16:24:03 BaseEvent [Finished spring execution.] DEBUG 10/24/06-16:24:03 JtaTransactionManager [Triggering beforeCommit synchronization] DEBUG 10/24/06-16:24:03 JtaTransactionManager [Triggering beforeCompletion synchronization] DEBUG 10/24/06-16:24:03 SessionImpl [setting flush mode to: NEVER] DEBUG 10/24/06-16:24:03 JtaTransactionManager [Initiating transaction commit] DEBUG 10/24/06-16:24:03 SessionImpl [before transaction completion] DEBUG 10/24/06-16:24:03 SessionImpl [after transaction completion] DEBUG 10/24/06-16:24:03 JtaTransactionManager [Triggering afterCompletion synchronization] DEBUG 10/24/06-16:24:03 SessionImpl [after transaction completion] DEBUG 10/24/06-16:24:03 TransactionSynchronizationManager [Clearing transaction synchronization] WARN 10/24/06-16:24:03 JDBCExceptionReporter [SQL Error: 0, SQLState: null] ERROR 10/24/06-16:24:03 JDBCExceptionReporter [The transaction is no longer active - status: 'Committed'. No further JDBC access is allowed within this transaction.] ERROR 10/24/06-16:24:03 BaseAction [Unexpected Exception] org.hibernate.exception.GenericJDBCException: could not initialize a collection: [blah#1] at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.loader.Loader.loadCollection(Loader.java:1926) at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:520) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:60) .... Caused by: java.sql.SQLException: The transaction is no longer active - status: 'Committed'. No further JDBC access is allowed within this transaction. at weblogic.jdbc.wrapper.JTSConnection.checkIfRolledBack(JTSConnection.java:219) at weblogic.jdbc.wrapper.JTSConnection.checkConnection(JTSConnection.java:228) at weblogic.jdbc.wrapper.Connection.prepareStatement(Connection.java:356) .... at org.hibernate.loader.Loader.loadCollection(Loader.java:1919) ... 36 more DEBUG 10/24/06-16:24:04 TransactionSynchronizationManager [Removed value [org.springframework.orm.hibernate3.SessionHolder@14de991] for key [org.hibernate.impl.SessionFactoryImpl@1720f5] from thread [ExecuteThread: '24' for queue: 'weblogic.kernel.Default']] DEBUG 10/24/06-16:24:04 OpenSessionInViewFilter [Closing single Hibernate Session in OpenSessionInViewFilter] DEBUG 10/24/06-16:24:04 SessionFactoryUtils [Closing Hibernate Session] DEBUG 10/24/06-16:24:04 SessionImpl [closing session] DEBUG 10/24/06-16:24:04 SessionImpl [after transaction completion] Hibernate session and transaction manager configuration: <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"><ref bean="dataSource"/></property> <property name="configLocation"> <value>classpath:hibernate.cfg.xml</value> </property> <property name="entityInterceptor"> <ref local="hibernateInterceptor"/> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</prop> <prop key="hibernate.cache.provider_class">org.hibernate.cache.TreeCacheProvider</prop> <prop key="hibernate.cache.use_query_cache">true</prop> <prop key="hibernate.show_sql">false</prop> </props> </property> <property name="jtaTransactionManager"> <bean id="transactionManager.transactionManager" class="org.springframework.beans.factory.config.PropertyPathFactoryBean"/> </property> </bean> <bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager"> </bean> Using HibernateTransactionManager solves the problem with OpenSessionInView but cannot be used as the final solution because of other dependencies on JTA. Spring documentation states full compatibilty between JTA transaction management and OpenSessionInView. I am looking for the clarification. Either I am missing something in my application context or Weblogic is not a supported platform for OpenSessionInView with JTA. I will gladly provide more information if necessary. Thanks, Vitaliy
    via by Vitaliy Geraymovych,
    • org.hibernate.exception.GenericJDBCException: Cannot open connection at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:126) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:114) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52) at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:449) at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167) at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161) at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1577) at org.hibernate.loader.Loader.doQuery(Loader.java:696) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259) at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2057) at org.hibernate.loader.collection.BatchingCollectionInitializer.initialize(BatchingCollectionInitializer.java:70) at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:587) at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:83) at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1744) at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:366) at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:108) at org.hibernate.collection.PersistentBag.iterator(PersistentBag.java:272)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    esaaresaar
    4 times, last one,
    17 more bugmates