2 Replies Latest reply on Jan 26, 2015 6:06 AM by vata2999

    Seam 2.2 Transaction Management on JBoss AS 7

    vata2999

      I managed to run Seam 2.2 (I had to upgrade Seam Hibernate from 3.3 to 3.6, JSF 1.2) on JBoss AS 7.

      after running my project, there is an issue in jboss transaction. when I use EJB I get following error with no more log

       

       ERROR [org.jboss.as.txn] (http-localhost/127.0.0.1:8080-2) JBAS010152: APPLICATION ERROR: transaction still active in request with status 0
      

       

      here is my components.xml

       

      <core:init jndi-pattern="java:app/myseam-ejb/#{ejbName}" debug="true" distributable="false"/>
        <core:manager concurrent-request-timeout="500"
        conversation-id-parameter="cid" conversation-timeout="600000"
        parent-conversation-id-parameter="pid"/>
        <transaction:ejb-transaction  /> 
        <component class="org.jboss.seam.transaction.EjbSynchronizations" jndi-name="java:app/jboss-seam/EjbSynchronizations"/>
      <persistence:managed-persistence-context auto-create="true" name="entityManager">
              <persistence:persistence-unit-jndi-name>java:/myseamEntityManagerFactory</persistence:persistence-unit-jndi-name>
          </persistence:managed-persistence-context>
      

       

      and my persistence.xml

       

      <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_1_0.xsd" 
                   version="1.0">
         <persistence-unit name="myseam">
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
            <jta-data-source>java:/myseamDatasource</jta-data-source>
            <properties>
               <property name="hibernate.hbm2ddl.auto" value="update"/>
               <property name="hibernate.show_sql" value="true"/>
               <property name="hibernate.cache.provider_class" value="org.hibernate.cache.EhCacheProvider"/>
               <property name="hibernate.cache.use_query_cache" value="true"/>
               <property name="jboss.entity.manager.factory.jndi.name" value="java:/myseamEntityManagerFactory"/>
               <property name="hibernate.jdbc.charSet" value="utf-8"/>
        <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
               <property name="jboss.as.jpa.providerModule" value="org.hibernate:3" />
               <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
            </properties>
         </persistence-unit>
      </persistence>
      

       

      and my datasource in jboss as 7

       

      <datasource  jndi-name="java:/myseamDatasource" pool-name="myseamDatasource" enabled="true" use-java-context="true">
                         <connection-url>jdbc:postgresql://127.0.0.1:5432/myseamdb</connection-url>
                         <driver-class>org.postgresql.Driver</driver-class>
                         <driver>postgresql</driver>
                         <security>
                             <user-name>sa</user-name>
                             <password>PASS</password>
                         </security>
                         <validation>
                             <validate-on-match>false</validate-on-match>
                             <background-validation>false</background-validation>
                             <background-validation-millis>1</background-validation-millis>
                         </validation>
                     </datasource>
      

       

      does any know how to fix this error ?