3 Replies Latest reply on Oct 11, 2011 5:23 AM by Thierry Ler

    Could not start transaction : Seam 3 + Tomcat 6

    Thierry Ler Newbie

      Hello,


      I created a Maven (3) Multi-module projet using Seam 3. It worked. Then I added the seam-security artifact and Hibernate. But when I am going to index.jsp (Firefox), I have the following error :





      java.lang.IllegalStateException: Could not start transaction
           at org.jboss.seam.faces.transaction.TransactionPhaseListener.begin(TransactionPhaseListener.java:96)
           at org.jboss.seam.faces.transaction.TransactionPhaseListener.begin(TransactionPhaseListener.java:86)
           at org.jboss.seam.faces.transaction.TransactionPhaseListener.handleTransactionsBeforePhase(TransactionPhaseListener.java:67)
           at org.jboss.seam.faces.transaction.TransactionPhaseListener.beforePhase(TransactionPhaseListener.java:49)
           at org.jboss.seam.faces.event.DelegatingPhaseListener.beforePhase(DelegatingPhaseListener.java:28)
           at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:224)
           at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:95)
           at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
           at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:114)
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:308)
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
           at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:118)
           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.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
           at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436)
           at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374)
           at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302)
           at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:110)
           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:233)
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
           at java.lang.Thread.run(Thread.java:662)
      Caused by: java.lang.RuntimeException: javax.naming.NamingException: Cannot create resource instance
           at org.jboss.seam.transaction.DefaultSeamTransaction.getSeamTransaction(DefaultSeamTransaction.java:153)
           at org.jboss.seam.transaction.DefaultSeamTransaction.isActiveOrMarkedRollback(DefaultSeamTransaction.java:62)
           at org.jboss.seam.faces.transaction.TransactionPhaseListener.begin(TransactionPhaseListener.java:91)
           ... 31 more
      Caused by: javax.naming.NamingException: Cannot create resource instance
           at org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:113)
           at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
           at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
           at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
           at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
           at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
           at org.apache.naming.SelectorContext.lookup(SelectorContext.java:152)
           at javax.naming.InitialContext.lookup(InitialContext.java:392)
           at org.jboss.seam.transaction.DefaultSeamTransaction.getUserTransaction(DefaultSeamTransaction.java:177)
           at org.jboss.seam.transaction.DefaultSeamTransaction.createUTTransaction(DefaultSeamTransaction.java:169)
           at org.jboss.seam.transaction.DefaultSeamTransaction.getSeamTransaction(DefaultSeamTransaction.java:134)
           ... 33 more




      My parent pom :




      <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
           <modelVersion>4.0.0</modelVersion>
      
           <groupId>com.c4</groupId>
           <artifactId>C4LineOpenPoc</artifactId>
           <version>1.0-SNAPSHOT</version>
           <packaging>pom</packaging>
      
           <name>Line Open POC</name>
           
           
           
      
           <modules>
                <module>C4LineOpenPocModel</module>
                <module>C4LineOpenPocUtil</module>
                <module>C4LineOpenPocDAO</module>
                <module>C4LineOpenPocService</module>
                <module>C4LineOpenPocWeb</module>
           </modules>
      
           <properties>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                <maven-compiler-plugin.version>2.3.2</maven-compiler-plugin.version>
                <junit.version>4.8.1</junit.version>
                <maven-site-plugin.version>3.0-beta-3</maven-site-plugin.version>
                <maven-javadoc-plugin.version>2.8</maven-javadoc-plugin.version>
                <maven-checkstyle-plugin.version>2.7</maven-checkstyle-plugin.version>
                <maven-pmd-plugin.version>2.5</maven-pmd-plugin.version>
                <maven-jxr-plugin.version>2.3</maven-jxr-plugin.version>
                <taglist-maven-plugin.version>2.4</taglist-maven-plugin.version>
                <cobertura-maven-plugin.version>2.5.1</cobertura-maven-plugin.version>
                <maven-surefire-plugin.version>2.9</maven-surefire-plugin.version>
                <maven-surefire-report-plugin>2.9</maven-surefire-report-plugin>
                <log4j.version>1.2.13</log4j.version>
                <guava.version>10.0</guava.version>
                
                <version.weld-servlet>1.1.2.Final</version.weld-servlet>
                <version.arquillian>1.0.0.Alpha4</version.arquillian>
                <version.mojarra>2.0.3</version.mojarra>
                
                <seam.version>3.0.0.Final</seam.version>
                
                
                <hibernate-validator.version>4.0.0.GA</hibernate-validator.version>
                <servlet-api.version>2.5</servlet-api.version>
                
                <prettyfaces-jsf2.version>3.3.0</prettyfaces-jsf2.version>
                <ocpsoft-pretty-time.version>1.0.7</ocpsoft-pretty-time.version>
                
                <jpamodelgen.version>1.1.1.Final</jpamodelgen.version>
           </properties>
      
           <repositories>
                <repository>
                     <id>jboss-public-repository</id>
                     <name>JBoss Repository</name>
                     <url>https://repository.jboss.org/nexus/content/groups/public</url>
                     <releases>
                          <updatePolicy>never</updatePolicy>
                     </releases>
                     <snapshots>
                          <updatePolicy>daily</updatePolicy>
                     </snapshots>
                </repository>
           </repositories>
      
           <pluginRepositories>
                <pluginRepository>
                <id>jboss-public-repository</id>
                <name>JBoss Repository</name>
                <url>https://repository.jboss.org/nexus/content/groups/public</url>
                <releases>
                     <updatePolicy>never</updatePolicy>
                </releases>
                <snapshots>
                <enabled>false</enabled>
                     <updatePolicy>daily</updatePolicy>
                </snapshots>
                </pluginRepository>
           </pluginRepositories>
           
           <dependencyManagement>
                <dependencies>
                     <!-- JUnit -->
                     <dependency>
                          <groupId>junit</groupId>
                          <artifactId>junit</artifactId>
                          <version>${junit.version}</version>
                          <scope>test</scope>
                     </dependency>
      
                     <!-- JAX WS RT -->
                     <dependency>
                          <groupId>com.sun.xml.ws</groupId>
                          <artifactId>jaxws-rt</artifactId>
                          <version>${jaxws-rt.version}</version>
                     </dependency>
      
                     <!-- log4j -->
                     <dependency>
                          <groupId>log4j</groupId>
                          <artifactId>log4j</artifactId>
                          <version>${log4j.version}</version>
                     </dependency>
                     
                     <!-- Weld -->
                     <dependency>
                          <groupId>org.jboss.weld.servlet</groupId>
                          <artifactId>weld-servlet-parent</artifactId>
                          <version>${version.weld-servlet}</version>
                          <type>pom</type>
                          <scope>import</scope>
                     </dependency>
                     
                     <!-- Seam -->
                     <dependency>
                          <groupId>org.jboss.seam</groupId>
                          <artifactId>seam-bom</artifactId>
                          <version>${seam.version}</version>
                          <type>pom</type>
                          <scope>import</scope>
                     </dependency>
                     
                     <!-- Guava -->
                     <dependency>
                          <groupId>com.google.guava</groupId>
                          <artifactId>guava</artifactId>
                          <version>${guava.version}</version>
                     </dependency>
                     
                     <!-- Prety time -->
                     <dependency>
                          <groupId>com.ocpsoft</groupId>
                          <artifactId>ocpsoft-pretty-time</artifactId>
                          <version>${ocpsoft-pretty-time.version}</version>
                     </dependency>
                
                
                     <!-- pretty faces -->
                     <dependency>
                          <groupId>com.ocpsoft</groupId>
                          <artifactId>prettyfaces-jsf2</artifactId>
                          <version>${prettyfaces-jsf2.version}</version>
                     </dependency>
      
                </dependencies>
           </dependencyManagement>
      
           <dependencies>
                
                <!-- Common to JEE and Servlet containers -->
                <dependency>
                     <groupId>javax.enterprise</groupId>
                     <artifactId>cdi-api</artifactId>
                     <scope>provided</scope>
                </dependency>
      
                <dependency>
                     <groupId>javax.annotation</groupId>
                     <artifactId>jsr250-api</artifactId>
                     <scope>provided</scope>
                </dependency>
      
                <dependency>
                     <groupId>javax.servlet</groupId>
                     <artifactId>servlet-api</artifactId>
                     <version>${servlet-api.version}</version>
                     <scope>provided</scope>
                </dependency>
      
                <dependency>
                     <groupId>org.jboss.weld.servlet</groupId>
                     <artifactId>weld-servlet</artifactId>
                     <scope>runtime</scope>
                </dependency>
      
                <!-- Bean Validation API (JSR 303) -->
                <dependency>
                     <groupId>javax.validation</groupId>
                     <artifactId>validation-api</artifactId>
                </dependency>
      
                <!-- Bean Validation Implementation -->
                <!-- Provides portable constraints such as @NotEmpty, @Email and @Url -->
                <dependency>
                     <groupId>org.hibernate</groupId>
                     <artifactId>hibernate-validator</artifactId>
                     <version>${hibernate-validator.version}</version>
                </dependency>
      
                <dependency>
                     <groupId>junit</groupId>
                     <artifactId>junit</artifactId>
                     <scope>test</scope>
                </dependency>
      
                <dependency>
                     <groupId>org.jboss.arquillian</groupId>
                     <artifactId>arquillian-junit</artifactId>
                     <version>${version.arquillian}</version>
                     <scope>test</scope>
                </dependency>
      
                <dependency>
                     <groupId>com.sun.faces</groupId>
                     <artifactId>jsf-api</artifactId>
                     <version>${version.mojarra}</version>
                </dependency>
                <dependency>
                     <groupId>com.sun.faces</groupId>
                     <artifactId>jsf-impl</artifactId>
                     <version>${version.mojarra}</version>
                     <scope>runtime</scope>
                </dependency>
                
                <!-- Joda time -->
                <dependency>
                  <groupId>joda-time</groupId>
                  <artifactId>joda-time</artifactId>
              </dependency>
              
                <!-- Pretty time -->
                <dependency>
                     <groupId>com.ocpsoft</groupId>
                     <artifactId>ocpsoft-pretty-time</artifactId>
                </dependency>
                
                <!-- Pretty faces -->
                <dependency>
                     <groupId>com.ocpsoft</groupId>
                     <artifactId>prettyfaces-jsf2</artifactId>
                </dependency>
              
                
              <dependency>
                  <groupId>org.jboss.seam.solder</groupId>
                  <artifactId>seam-solder</artifactId>
              </dependency>
              
              <dependency>
                  <groupId>org.jboss.seam.faces</groupId>
                  <artifactId>seam-faces</artifactId>
              </dependency>
              
              <dependency>
                  <groupId>org.jboss.seam.international</groupId>
                  <artifactId>seam-international</artifactId>
              </dependency>
                
                <dependency>
                 <groupId>org.jboss.seam.security</groupId>
                 <artifactId>seam-security</artifactId>
              </dependency>
              
                <dependency>
                     <groupId>org.jboss.seam.config</groupId>
                     <artifactId>seam-config-xml</artifactId>
                </dependency>
                
                
      <dependency>
      <groupId>org.jboss.seam.persistence</groupId>
      <artifactId>seam-persistence</artifactId>
      </dependency>
      
      <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <version>3.6.7.Final</version>
      <scope>runtime</scope>
      <exclusions>
      <exclusion>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      </exclusion>
      </exclusions>
      </dependency>
      <dependency>
      <groupId>org.hibernate.javax.persistence</groupId>
      <artifactId>hibernate-jpa-2.0-api</artifactId>
      <version>1.0.1.Final</version>
      <scope>compile</scope>
      </dependency>
      
      <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-search</artifactId>
      <version>3.4.1.Final</version>
      </dependency>
      
      <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.16</version>
      </dependency>
      
                
                <!-- Guava -->
                <dependency>
                     <groupId>com.google.guava</groupId>
                     <artifactId>guava</artifactId>
                </dependency>
                
                
                
                
                <dependency>
               <groupId>commons-digester</groupId>
               <artifactId>commons-digester</artifactId>
               <version>2.1</version>
              </dependency>
           </dependencies>
      
           <build>
                <finalName>Carrefour Line Open POC</finalName>
      
                <plugins>
                     <!-- Maven compiler -->
                     <plugin>
                          <artifactId>maven-compiler-plugin</artifactId>
                          <version>${maven-compiler-plugin.version}</version>
                          <configuration>
                               <source>1.6</source>
                               <target>1.6</target>
                               <encoding>${project.build.sourceEncoding}</encoding>
                          </configuration>
                     </plugin>
                     
                     <plugin>
                          <groupId>org.apache.maven.plugins</groupId>
                          <artifactId>maven-eclipse-plugin</artifactId>
                          <version>2.8</version>
                          <configuration>
                               <wtpversion>2.0</wtpversion>
                               <source>1.6</source>
                               <target>1.6</target>
                          </configuration>
                     </plugin>
      
                     <!-- pour faire fonctionner sous maven 3 -->
                     <plugin>
                          <groupId>org.apache.maven.plugins</groupId>
                          <artifactId>maven-site-plugin</artifactId>
                          <version>${maven-site-plugin.version}</version>
                     </plugin>
                     
                     <!-- Surefire -->
                     <plugin>
                          <groupId>org.apache.maven.plugins</groupId>
                          <artifactId>maven-surefire-plugin</artifactId>
                          <version>${maven-surefire-plugin.version}</version>
                     </plugin>
                     
                </plugins>
           </build>
      
      
           <reporting>
                ...
           </reporting>
      
      </project>
      




      My web module pom.xml file :




      <?xml version="1.0" encoding="UTF-8"?>
      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
           <modelVersion>4.0.0</modelVersion>
      
           <parent>
                <groupId>com.c4</groupId>
                <artifactId>C4LineOpenPoc</artifactId>
                <version>1.0-SNAPSHOT</version>
           </parent>
      
           <groupId>com.c4</groupId>
           <artifactId>C4LineOpenPocWeb</artifactId>
           <version>1.0-SNAPSHOT</version>
           <packaging>war</packaging>
      
           <name>C4LineOpenPocWeb</name>
           
           <dependencies>
                
                <dependency>
                     <groupId>com.c4</groupId>
                     <artifactId>C4LineOpenPocModel</artifactId>
                     <version>1.0-SNAPSHOT</version>
                </dependency>
                <dependency>
                     <groupId>com.c4</groupId>
                     <artifactId>C4LineOpenPocUtil</artifactId>
                     <version>1.0-SNAPSHOT</version>
                </dependency>
                <dependency>
                     <groupId>com.c4</groupId>
                     <artifactId>C4LineOpenPocService</artifactId>
                     <version>1.0-SNAPSHOT</version>
                </dependency>
      
                <!-- JUnit -->
                <dependency>
                     <groupId>junit</groupId>
                     <artifactId>junit</artifactId>
                     <scope>test</scope>
                </dependency>
      
      
      
      
      
      
      
                <!-- Common to JEE and Servlet containers -->
                <dependency>
                     <groupId>javax.enterprise</groupId>
                     <artifactId>cdi-api</artifactId>
                     <scope>provided</scope>
                </dependency>
      
                <dependency>
                     <groupId>javax.annotation</groupId>
                     <artifactId>jsr250-api</artifactId>
                     <scope>provided</scope>
                </dependency>
      
                <dependency>
                     <groupId>javax.servlet</groupId>
                     <artifactId>servlet-api</artifactId>
                     <version>${servlet-api.version}</version>
                     <scope>provided</scope>
                </dependency>
      
                <dependency>
                     <groupId>org.jboss.weld.servlet</groupId>
                     <artifactId>weld-servlet</artifactId>
                     <scope>runtime</scope>
                </dependency>
      
                <!-- Bean Validation API (JSR 303) -->
                <dependency>
                     <groupId>javax.validation</groupId>
                     <artifactId>validation-api</artifactId>
                </dependency>
      
                <!-- Bean Validation Implementation -->
                <!-- Provides portable constraints such as @NotEmpty, @Email and @Url -->
                <dependency>
                     <groupId>org.hibernate</groupId>
                     <artifactId>hibernate-validator</artifactId>
                     <version>${hibernate-validator.version}</version>
                </dependency>
      
      
      
                <dependency>
                     <groupId>org.jboss.arquillian</groupId>
                     <artifactId>arquillian-junit</artifactId>
                     <version>${version.arquillian}</version>
                     <scope>test</scope>
                </dependency>
      
                <dependency>
                     <groupId>com.sun.faces</groupId>
                     <artifactId>jsf-api</artifactId>
                     <version>${version.mojarra}</version>
                </dependency>
                <dependency>
                     <groupId>com.sun.faces</groupId>
                     <artifactId>jsf-impl</artifactId>
                     <version>${version.mojarra}</version>
                     <scope>runtime</scope>
                </dependency>
      
                <!-- Joda time -->
                <dependency>
                     <groupId>joda-time</groupId>
                     <artifactId>joda-time</artifactId>
                </dependency>
      
      
                <!-- Pretty time -->
                <dependency>
                     <groupId>com.ocpsoft</groupId>
                     <artifactId>ocpsoft-pretty-time</artifactId>
                </dependency>
      
                <!-- Pretty faces -->
                <dependency>
                     <groupId>com.ocpsoft</groupId>
                     <artifactId>prettyfaces-jsf2</artifactId>
                </dependency>
      
                <dependency>
                     <groupId>org.jboss.seam.solder</groupId>
                     <artifactId>seam-solder</artifactId>
                </dependency>
      
                <dependency>
                     <groupId>org.jboss.seam.faces</groupId>
                     <artifactId>seam-faces</artifactId>
                </dependency>
      
                <dependency>
                     <groupId>org.jboss.seam.international</groupId>
                     <artifactId>seam-international</artifactId>
                </dependency>
      
                <dependency>
                     <groupId>org.jboss.seam.config</groupId>
                     <artifactId>seam-config-xml</artifactId>
                </dependency>
      
                <dependency>
                     <groupId>org.jboss.seam.security</groupId>
                     <artifactId>seam-security</artifactId>
                </dependency>
      
      
      
      <dependency>
      <groupId>org.jboss.seam.persistence</groupId>
      <artifactId>seam-persistence</artifactId>
      </dependency>
      
      
      
       
      <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-entitymanager</artifactId>
      <version>3.6.7.Final</version>
      <scope>runtime</scope>
      <exclusions>
      <exclusion>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
      </exclusion>
      </exclusions>
      </dependency>
      <dependency>
      <groupId>org.hibernate.javax.persistence</groupId>
      <artifactId>hibernate-jpa-2.0-api</artifactId>
      <version>1.0.1.Final</version>
      <scope>compile</scope>
      </dependency>
      
      <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-search</artifactId>
      <version>3.4.1.Final</version>
      </dependency>
      
      <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.1.16</version>
      </dependency>
      
      
                <!-- Guava -->
                <dependency>
                     <groupId>com.google.guava</groupId>
                     <artifactId>guava</artifactId>
                </dependency>
      
           </dependencies>
      
           <build>
                <finalName>${project.artifactId}</finalName>
                <plugins>
      
                     <!-- Maven compiler -->
                     <plugin>
                          <artifactId>maven-compiler-plugin</artifactId>
                          <version>${maven-compiler-plugin.version}</version>
                          <configuration>
                               <source>1.6</source>
                               <target>1.6</target>
                               <encoding>${project.build.sourceEncoding}</encoding>
                          </configuration>
                     </plugin>
      
                     <!-- Embedded Tomcat (package tomcat:run) -->
                     <!-- Standalone Tomcat (package tomcat:deploy) -->
                     <plugin>
                          <groupId>org.codehaus.mojo</groupId>
                          <artifactId>tomcat-maven-plugin</artifactId>
                          <version>1.0</version>
                          <configuration>
                               <path>/${project.build.finalName}</path>
                               <!-- Embedded port -->
                               <port>9090</port>
                               <!-- The default authentication credentials for remote deployment are 
                                    username "admin" with no password To override credentials, define a server 
                                    in settings.xml and activate it using the <server> element -->
                               <url>http://localhost:9090/manager</url>
                          </configuration>
                     </plugin>
                </plugins>
           </build>
      
      
      </project>
      




      My web.xml file :




      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="
            http://java.sun.com/xml/ns/javaee
            http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
      
           <context-param>
                <param-name>javax.faces.PROJECT_STAGE</param-name>
                <param-value>Development</param-value>
           </context-param>
      
           <context-param>
                <param-name>org.apache.myfaces.annotation.SCAN_PACKAGES</param-name>
                <param-value>com.carrefour</param-value>
           </context-param>
      
      
      
           <filter>
                <filter-name>Pretty Filter</filter-name>
                <filter-class>com.ocpsoft.pretty.PrettyFilter</filter-class>
           </filter>
      
           <filter-mapping>
                <filter-name>Pretty Filter</filter-name>
                <url-pattern>/*</url-pattern>
                <dispatcher>FORWARD</dispatcher>
                <dispatcher>REQUEST</dispatcher>
                <dispatcher>ERROR</dispatcher>
           </filter-mapping>
      
      
      
           <!-- Activate the JSF 2.0 servlet -->
           <servlet>
                <servlet-name>Faces Servlet</servlet-name>
                <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
                <load-on-startup>1</load-on-startup>
           </servlet>
      
           <!-- Tell the context which URLs to process with JSF -->
           <servlet-mapping>
                <servlet-name>Faces Servlet</servlet-name>
                <url-pattern>*.jsf</url-pattern>
           </servlet-mapping>
      
           
           <welcome-file-list>
                <welcome-file>index.jsf</welcome-file>
           </welcome-file-list>
      
           <!-- Weld Jetty/Tomcat specific configuration parameters -->
           <!-- *** The <listener> and <resource-env-ref> elements can be deleted when 
                running in a Java EE 6 container *** -->
           <listener>
                <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class>
           </listener>
      
      
      
           <resource-env-ref>
                <description>Object factory for the CDI Bean Manager</description>
                <resource-env-ref-name>BeanManager</resource-env-ref-name>
                <resource-env-ref-type>javax.enterprise.inject.spi.BeanManager</resource-env-ref-type>
           </resource-env-ref>
      
           <!-- Enable this security constraint if you are using *.jsf as your Faces 
                Servlet mapping -->
           <!-- <security-constraint> <display-name>Restrict direct access to Facelets 
                views</display-name> <web-resource-collection> <web-resource-name>Facelets 
                views</web-resource-name> <url-pattern>*.xhtml</url-pattern> </web-resource-collection> 
                <auth-constraint/> </security-constraint> -->
      </web-app>
      




      my seam-bean.xml file :




      <beans xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xmlns:ee="urn:java:ee" 
           xmlns:ss="urn:java:org.jboss.seam.security"
          xsi:schemaLocation="
              http://java.sun.com/xml/ns/javaee 
              http://docs.jboss.org/cdi/beans_1_0.xsd">
      
          <ss:IdentityImpl>
               <ee:modifies />
               <ss:authenticatorName>lineOpenAuthenticator</ss:authenticatorName>
          </ss:IdentityImpl>
               
      </beans>




      my beans.xml file :




      <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:s="urn:java:ee" xmlns:t="urn:java:org.jboss.seam.transaction"
           xsi:schemaLocation="
      http://java.sun.com/xml/ns/javaee
      http://docs.jboss.org/cdi/beans_1_0.xsd">
           <t:SeSynchronizations>
                <s:modifies />
           </t:SeSynchronizations>
           <t:EntityTransaction>
                <s:modifies />
           </t:EntityTransaction>
      </beans>
      




      my persistence.xml file :




      <?xml version="1.0" encoding="UTF-8"?>
      <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="thierry">
              <jta-data-source>jdbc/test_thierry</jta-data-source>
              <properties>
                  <!-- Properties for Hibernate (default provider for JBoss AS) -->
                  <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
                  <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
                  <!-- <property name="hibernate.show_sql" value="true"/> -->
                  <!-- Only format when you need to debug, because it slows things down -->
                  <property name="hibernate.format_sql" value="true"/>
                  <property name="hibernate.show_sql" value="true" />
              </properties>
          </persistence-unit>
      </persistence>
      




      The tomcat 6 server.xml file contains :




      <Resource auth="Container" driverClassName="com.mysql.jdbc.Driver" maxActive="20" maxIdle="30" maxWait="-1" name="jdbc/test_thierry" password="thierry" type="javax.sql.DataSource" url="jdbc:mysql://localhost:3306/test_thierry_01?autoReconnect=true" username="thierry"/>
          



      Help...