0 Replies Latest reply on Jan 30, 2009 5:04 AM by yughandhar kakani

    org.springframework.transaction.CannotCreateTransactionExce

    yughandhar kakani Newbie

      context :

      application migration from web sphere to jboss

      Problem :

      application is working fine for first time(home page is coming up which fetches values from datbase) ,from next time onwords it is throwing the following exception.

      configuration :

      jsf 1.1
      hibernate 3.1.3
      spring 1.2.7
      jdk 1.4

      Exception :

      org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:548)
      org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:283)
      org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:225)
      org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:89)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
      nl.vnab.eabs.common.interceptor.ServiceInterceptor.invoke(ServiceInterceptor.java:48)
      org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
      org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
      $Proxy79.retreiveDefaultLocaleForUser(Unknown Source)
      nl.vnab.eabs.presentation.servlets.HomeServlet.doGet(HomeServlet.java:113)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
      org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:107)
      org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:72)
      org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
      org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
      org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
      org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:193)
      org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
      org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
      org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      nl.vnab.eabs.presentation.filters.RequestLoggingFilter.doFilter(RequestLoggingFilter.java:29)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      nl.vnab.eabs.presentation.filters.SessionTimeOutFilter.doFilter(SessionTimeOutFilter.java:65)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
      org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      java.lang.Thread.run(Thread.java:534)
      15:13:07,906 INFO [STDOUT] 15:13:07,906 INFO [RequestLoggingFilter] 127.0.0.1 GET /VnabEabsWeb/secure/home 63
      15:13:07,906 INFO [STDOUT] 15:13:07,906 ERROR [[HomeServlet]] Servlet.service() for servlet HomeServlet threw exception
      common_exceptions.unexpected_exception,5935, Could not open Hibernate Session for transaction; nested exception is nl.vnab.eabs.common.exception.EabsRuntimeException: common_exceptions.unexpected_exception, You cannot commit with autocommit set!
       at nl.vnab.eabs.common.interceptor.ServiceInterceptor.invoke(ServiceInterceptor.java:91)
       at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
       at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
       at $Proxy79.retreiveDefaultLocaleForUser(Unknown Source)
       at nl.vnab.eabs.presentation.servlets.HomeServlet.doGet(HomeServlet.java:113)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:264)
       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:274)
       at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:110)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
       at org.acegisecurity.wrapper.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:81)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
       at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:217)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
       at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:193)
       at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:274)
       at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java:148)
       at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:98)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at nl.vnab.eabs.presentation.filters.RequestLoggingFilter.doFilter(RequestLoggingFilter.java:29)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at nl.vnab.eabs.presentation.filters.SessionTimeOutFilter.doFilter(SessionTimeOutFilter.java:65)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
       at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
       at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
       at java.lang.Thread.run(Thread.java:534)
      15:13:08,937 INFO [STDOUT] Hibernate: select this_.resources_id as resources1_54_0_, this_.KEY as KEY54_0_, this_.LANGUAGE as LANGUAGE54_0_, this_.VALUE as VALUE54_0_ from RESOURCES this_ where this_.KEY=? and this_.LANGUAGE=?
      15:13:09,375 INFO [STDOUT] Hibernate: select this_.resources_id as


      data source configuration :


      <bean id="dataSource"
       class="org.springframework.jndi.JndiObjectFactoryBean">
       <property name="jndiName" value="jdbc/abcd" />
       <property name="initialSize" value="5"/>
       <property name="maxActive" value="20"/>
       <property name="minIdle" value="5"/>
       <property name="maxIdle" value="5"/>
       <property name="cache"><value>false</value></property>
       <property name="proxyInterface"><value>javax.sql.DataSource</value></property>
       <property name="reobtainTransactionalConnections" value="true"/>
       <property name="useTransactionAwareDataSource" value="true"/>
      
       <prop key="hibernate.connection.release_mode">after_statement</prop>
      
      
       </bean>



      Thanks & Regards
      Yughandhar Kakani