0 Replies Latest reply on Nov 22, 2012 4:41 AM by mesut.alp

    Seam 2.3.0.Final Could not start transaction Exception

    mesut.alp Newbie

      Hi,

       

      Using Jetty 8.1.8 server, I upgraded my project to Seam 2.3.0 Final, Hibernate 4.1.8.Final and JSF 2.0 from Jsf 1.2, Seam 2.2, Hibernate 3.4

      Now I get the following error when I try to run jetty server. Do you have an any idea about this problem?

       

       

      component.xml

      <components xmlns="http://jboss.com/products/seam/components"

                  xmlns:core="http://jboss.com/products/seam/core"

                  xmlns:persistence="http://jboss.com/products/seam/persistence"

                  xmlns:transaction="http://jboss.com/products/seam/transaction"

                  xmlns:drools="http://jboss.com/products/seam/drools"

                  xmlns:bpm="http://jboss.com/products/seam/bpm"

                  xmlns:security="http://jboss.com/products/seam/security"

                  xmlns:mail="http://jboss.com/products/seam/mail"

                  xmlns:web="http://jboss.com/products/seam/web"

                  xmlns:cache="http://jboss.com/products/seam/cache"

                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                  xsi:schemaLocation=

                      "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.3.xsd

                       http://jboss.com/products/seam/transaction http://jboss.com/products/seam/transaction-2.3.xsd

                       http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.3.xsd

                       http://jboss.com/products/seam/drools http://jboss.com/products/seam/drools-2.3.xsd

                       http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.3.xsd

                       http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.3.xsd

                       http://jboss.com/products/seam/mail http://jboss.com/products/seam/mail-2.3.xsd

                       http://jboss.com/products/seam/web http://jboss.com/products/seam/web-2.3.xsd

                       http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.3.xsd

                       http://jboss.com/products/seam/cache http://jboss.com/products/seam/cache-2.3.xsd">

       

       

        

         <core:init debug="true"/>

        

         <core:manager conversation-timeout="300000" conversation-id-parameter="cid" />

       

         <web:hot-deploy-filter url-pattern="*.jsf"/>

        

        <persistence:entity-manager-factory name="entityManagerFactory" persistence-unit-name="myDataSoruce" />

       

        <persistence:managed-persistence-context

        name="entityManager" auto-create="true" entity-manager-factory="#{entityManagerFactory}" />

       

        <transaction:entity-transaction entity-manager="#{entityManager}"/>

       

         <drools:rule-base name="securityRules">

            <drools:rule-files>

               <value>/security.drl</value>

            </drools:rule-files>

         </drools:rule-base>

       

         <security:rule-based-permission-resolver security-rules="#{securityRules}"/>

       

         <security:identity authenticate-method="#{authenticator.authenticate}"/>

       

         <event type="org.jboss.seam.security.notLoggedIn">

            <action execute="#{redirect.captureCurrentView}"/>

         </event>

         <event type="org.jboss.seam.security.loginSuccessful">

            <action execute="#{redirect.returnToCapturedView}"/>

         </event>

       

         <mail:mail-session host="localhost" port="25"/>

       

      </components>

       

      persistence.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <!-- Persistence deployment descriptor for dev profile -->

      <persistence xmlns="http://java.sun.com/xml/ns/persistence"

                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                   xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"

                   version="2.0">

         

         <persistence-unit name="myDataSoruce">

             <provider>org.hibernate.ejb.HibernatePersistence</provider>

             <class>com.myproject.model.DemoCustomers</class>

             <class>com.myproject.model.DemoOrderItems</class>

             <class>com.myproject.model.DemoOrders</class>

             <class>com.myproject.model.DemoProductInfo</class>

             <class>com.myproject.model.DemoStates</class>

             <class>com.myproject.model.DemoStatesId</class>

             <class>com.myproject.model.DemoUsers</class>

             <class>com.myproject.model.Dept</class>

             <class>com.myproject.model.Emp</class>

            <properties>

               <property name="hibernate.connection.driver_class" value="oracle.jdbc.OracleDriver"/>

               <property name="hibernate.connection.url" value="jdbc:oracle:thin:@localhost:1521:XE"/>

               <property name="hibernate.connection.username" value="DD"/>

               <property name="hibernate.connection.password" value="1234"/>

               <property name="hibernate.default_schema" value="DD"/>     

               <property name="hibernate.dialect" value="org.hibernate.dialect.OracleDialect"/>      

               <property name="hibernate.hbm2ddl.auto" value="update"/>

               <property name="hibernate.show_sql" value="true"/>

               <property name="hibernate.format_sql" value="true"/>

               <property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.JDBCTransactionFactory" />

            </properties>

         </persistence-unit>

         

      </persistence>

       

       

      SEVERE: swallowing exception

      java.lang.IllegalStateException: Could not start transaction

              at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:602)

              at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:587)

              at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:326)

              at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:143)

              at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:117)

              at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)

              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)

              at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)

              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)

              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)

              at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)

              at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)

              at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)

              at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)

              at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)

              at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

              at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)

              at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)

              at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)

              at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)

              at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

              at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

              at org.mortbay.jetty.Server.handle(Server.java:326)

              at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

              at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)

              at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)

              at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)

              at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

              at org.mortbay.jetty.nio.BlockingChannelConnector$Connection.run(BlockingChannelConnector.java:164)

              at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

      Caused by: java.lang.UnsupportedOperationException: no transaction

              at org.jboss.seam.transaction.NoTransaction.begin(NoTransaction.java:36)

              at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:597)

              ... 38 more

       

       

      Kas 22, 2012 9:36:30 AM org.jboss.seam.jsf.SeamPhaseListener beforePhase

      SEVERE: swallowing exception

      java.lang.IllegalStateException: Could not start transaction

              at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:602)

              at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:587)

              at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsBeforePhase(SeamPhaseListener.java:326)

              at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:143)

              at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:117)

              at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)

              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)

              at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)

              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)

              at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)

              at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1221)

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)

              at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)

              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)

              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)

              at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)

              at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)

              at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

              at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)

              at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)

              at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)

              at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)

              at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)

              at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)

              at org.mortbay.jetty.Server.handle(Server.java:326)

              at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)

              at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)

              at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)

              at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)

              at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)

              at org.mortbay.jetty.nio.BlockingChannelConnector$Connection.run(BlockingChannelConnector.java:164)

              at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

      Caused by: java.lang.UnsupportedOperationException: no transaction

              at org.jboss.seam.transaction.NoTransaction.begin(NoTransaction.java:36)

              at org.jboss.seam.jsf.SeamPhaseListener.begin(SeamPhaseListener.java:597)

              ... 37 more