1 2 Previous Next 27 Replies Latest reply on May 5, 2012 8:29 AM by ceefour Go to original post
      • 15. Re: Seam Faces causes exception in JBoss AS 7 (ear deployment)

        Hi,


        has anybody working SEAM 3.1 in EAR configuration on Jboss 6 or 7 ??


        I've been struggling with it for few days without success :(
        I have structure my app as suggested here.
        Right now the application is deploying without error but when I call


        http://localhost:8080/sandbox/home.jsf


        i get


        HTTP Status 404 - /sandbox/home.jsp


        why jsp?


        When I deploy the app as standalone WAR everything is working.


        Why there is no example of using Seam 3 in EAR deployment?


        How can I construct application with a number of web application and a number of EJB modules which i want to use in this web apps (using Seam 3.1)?


        Is there any possibility to use only WAR's with some common core EJB services used accross this wars? How?


        Can anybody provide some simple, working example?


        Any help and suggestions would be very welcome


        Regards


        Jarek

        • 16. Re: Seam Faces causes exception in JBoss AS 7 (ear deployment)
          lightguard

          At the very least we need a JIRA to track the EAR issue, would you mind opening one (and all those who need it please vote)?

          • 17. Re: Seam Faces causes exception in JBoss AS 7 (ear deployment)

            Jason Porter wrote on Jan 25, 2012 14:41:


            At the very least we need a JIRA to track the EAR issue, would you mind opening one (and all those who need it please vote)?


            To which project? Can you provide the link?

            • 18. Re: Seam Faces causes exception in JBoss AS 7 (ear deployment)
              lightguard

              Jarek Gilewski wrote on Jan 26, 2012 03:32:


              To which project? Can you provide the link?


              Because this is about Seam Faces, I'd put it in the Seam Faces JIRA

              • 20. Re: Seam Faces causes exception in JBoss AS 7 (ear deployment)
                antoine.antoine.abside.com

                Hi,


                I have one application using Seam Faces in EAR. As it contains some work done for a customer, I need to clean it up before giving access to it. But I can give you the poms of the project.


                It's a maven project with a classical structure build with JBoss Java EE 6 maven archetype.



                MyApp-parent
                 |
                 +--MyApp-ear
                 |   |
                 |   +--pom.xml
                 |
                 +--MyApp-ejb
                 |   |
                 |   +--src
                 |   |
                 |   +--pom.xml
                 |
                 +--MyApp-war
                 |   |
                 |   +--src
                 |   |
                 |   +--pom.xml
                 |
                 +--pom.xml 
                



                Here's the 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>fr.asd.myapp</groupId>
                     <artifactId>myapp</artifactId>
                     <version>1.0-SNAPSHOT</version>
                     <packaging>pom</packaging>
                     <name>my ear app</name>
                
                     <modules>
                          <module>myapp-ejb</module>
                          <module>myapp-web</module>
                          <module>myapp-ear</module>
                     </modules>
                
                     <properties>
                          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
                          <primefaces.version>3.0</primefaces.version>
                          <seam.version>3.1.0.Final</seam.version>
                     </properties>
                
                     <dependencyManagement>
                          <dependencies>
                
                               <dependency>
                                    <groupId>fr.asd.myapp</groupId>
                                    <artifactId>myapp-ejb</artifactId>
                                    <version>${project.version}</version>
                                    <type>ejb</type>
                               </dependency>
                
                               <dependency>
                                    <groupId>fr.asd.myapp</groupId>
                                    <artifactId>myapp-web</artifactId>
                                    <version>${project.version}</version>
                                    <type>war</type>
                                    <scope>compile</scope>
                               </dependency>
                
                               <dependency>
                                    <groupId>org.jboss.spec</groupId>
                                    <artifactId>jboss-javaee-web-6.0</artifactId>
                                    <version>2.0.0.Final</version>
                                    <type>pom</type>
                                    <scope>import</scope>
                               </dependency>
                
                               <dependency>
                                    <groupId>org.hibernate</groupId>
                                    <artifactId>hibernate-validator</artifactId>
                                    <version>4.1.0.Final</version>
                                    <scope>provided</scope>
                                    <exclusions>
                                         <exclusion>
                                              <groupId>org.slf4j</groupId>
                                              <artifactId>slf4j-api</artifactId>
                                         </exclusion>
                                    </exclusions>
                               </dependency>
                
                               <!-- Test dependencies -->
                               <dependency>
                                    <groupId>junit</groupId>
                                    <artifactId>junit</artifactId>
                                    <version>4.8</version>
                                    <type>jar</type>
                                    <scope>test</scope>
                               </dependency>
                               <dependency>
                                    <groupId>org.primefaces</groupId>
                                    <artifactId>primefaces</artifactId>
                                    <version>${primefaces.version}</version>
                                    <scope>compile</scope>
                               </dependency>
                
                               <dependency>
                                    <groupId>org.jboss.solder</groupId>
                                    <artifactId>solder-impl</artifactId>
                                    <version>${seam.version}</version>
                               </dependency>
                
                               <dependency>
                                    <groupId>org.jboss.seam.faces</groupId>
                                    <artifactId>seam-faces</artifactId>
                                    <version>${seam.version}</version>
                               </dependency>
                
                               <dependency>
                                    <groupId>org.jboss.arquillian</groupId>
                                    <artifactId>arquillian-bom</artifactId>
                                    <version>1.0.0.CR7</version>
                                    <scope>import</scope>
                                    <type>pom</type>
                               </dependency>
                
                          </dependencies>
                     </dependencyManagement>
                
                     <build>
                          <pluginManagement>
                               <plugins>
                                    <plugin>
                                         <artifactId>maven-compiler-plugin</artifactId>
                                         <version>2.3.2</version>
                                         <configuration>
                                              <source>1.6</source>
                                              <target>1.6</target>
                                         </configuration>
                                    </plugin>
                                    <plugin>
                                         <groupId>org.jboss.as.plugins</groupId>
                                         <artifactId>jboss-as-maven-plugin</artifactId>
                                         <version>7.0.2.Final</version>
                                         <inherited>true</inherited>
                                         <configuration>
                                              <skip>true</skip>
                                         </configuration>
                                    </plugin>
                               </plugins>
                          </pluginManagement>
                     </build>
                </project>
                



                The ear 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>
                
                     <parent>
                          <artifactId>myapp</artifactId>
                          <groupId>fr.asd.myapp</groupId>
                          <version>1.0-SNAPSHOT</version>
                     </parent>
                
                     <artifactId>myapp-ear</artifactId>
                     <packaging>ear</packaging>
                
                     <name>myapp EAR module</name>
                
                     <dependencies>
                
                          <!-- Depend on the ejb module and war so that we can package them -->
                          <dependency>
                               <groupId>fr.asd.myapp</groupId>
                               <artifactId>myapp-web</artifactId>
                               <type>war</type>
                          </dependency>
                          <dependency>
                               <groupId>fr.asd.myapp</groupId>
                               <artifactId>myapp-ejb</artifactId>
                               <type>ejb</type>
                          </dependency>
                          <!-- Solder needs to be in EAR and nowhere else. That can be a problem
                          if you need servlet CDI support. In that case you need
                          to extract Web fragment from solder and put it in your war-->
                          <dependency>
                               <groupId>org.jboss.solder</groupId>
                               <artifactId>solder-impl</artifactId>
                          </dependency>
                     </dependencies>
                
                     <build>
                          <finalName>myapp</finalName>
                          <plugins>
                               <plugin>
                                    <groupId>org.apache.maven.plugins</groupId>
                                    <artifactId>maven-ear-plugin</artifactId>
                                    <version>2.6</version>
                                    <configuration>
                                         <!-- Tell Maven we are using Java EE 6 -->
                                         <version>6</version>
                                         <!-- Use Java EE ear libraries as needed. Java EE ear libraries are 
                                              in easy way to package any libraries needed in the ear, and automatically 
                                              have any modules (EJB-JARs and WARs) use them -->
                                         <defaultLibBundleDir>lib</defaultLibBundleDir>
                                         <modules>
                                              <!-- Register our War as a web module, and set the context root -->
                                              <webModule>
                                                   <groupId>fr.asd.myapp</groupId>
                                                   <artifactId>myapp-web</artifactId>
                                                   <!-- Define the context root for the webapp -->
                                                   <contextRoot>/myapp</contextRoot>
                                              </webModule>
                                         </modules>
                                    </configuration>
                               </plugin>
                               <!-- The JBoss AS plugin deploys your ear to a local JBoss AS container -->
                               <!-- Due to Maven's lack of intelligence with EARs we need to configure 
                                    the jboss-as maven plugin to skip deployment for all modules. We then enable 
                                    it specifically in the ear module. -->
                               <plugin>
                                    <groupId>org.jboss.as.plugins</groupId>
                                    <artifactId>jboss-as-maven-plugin</artifactId>
                                    <configuration>
                                         <skip>false</skip>
                                    </configuration>
                               </plugin>
                          </plugins>
                     </build>
                
                </project>
                



                The EJB 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>
                
                   <parent>
                      <artifactId>myapp</artifactId>
                      <groupId>fr.asd.myapp</groupId>
                      <version>1.0-SNAPSHOT</version>
                   </parent>
                
                   <artifactId>myapp-ejb</artifactId>
                   <packaging>ejb</packaging>
                
                   <name>myapp EJB module</name>
                
                   <dependencies>
                      <dependency>
                         <groupId>org.jboss.spec.javax.ejb</groupId>
                         <artifactId>jboss-ejb-api_3.1_spec</artifactId>
                         <scope>provided</scope>
                      </dependency>
                
                      <dependency>
                         <groupId>javax.enterprise</groupId>
                         <artifactId>cdi-api</artifactId>
                         <scope>provided</scope>
                      </dependency>
                
                      <dependency>
                         <groupId>org.hibernate.javax.persistence</groupId>
                         <artifactId>hibernate-jpa-2.0-api</artifactId>
                         <scope>provided</scope>
                      </dependency>
                
                      <dependency>
                         <groupId>org.hibernate</groupId>
                         <artifactId>hibernate-validator</artifactId>
                         <scope>provided</scope>
                      </dependency>
                
                
                      <!-- Test scope dependencies -->
                      <dependency>
                         <groupId>junit</groupId>
                         <artifactId>junit</artifactId>
                         <scope>test</scope>
                      </dependency>
                
                      <dependency>
                         <groupId>org.jboss.arquillian.junit</groupId>
                         <artifactId>arquillian-junit-container</artifactId>
                         <scope>test</scope>
                      </dependency>
                
                   </dependencies>
                
                   <build>
                      <plugins>
                         <plugin>
                            <artifactId>maven-ejb-plugin</artifactId>
                            <version>2.3</version>
                            <configuration>
                               <!-- Tell Maven we are using EJB 3.1 -->
                               <ejbVersion>3.1</ejbVersion>
                            </configuration>
                         </plugin>
                      </plugins>
                   </build>
                
                   <profiles>
                      <profile>
                         <!-- The default profile skips all tests, though you can tune it 
                            to run just unit tests based on a custom pattern -->
                         <!-- Seperate profiles are provided for running all tests, including 
                            Arquillian tests that execute in the specified container -->
                         <id>default</id>
                         <activation>
                            <activeByDefault>true</activeByDefault>
                         </activation>
                         <build>
                            <plugins>
                               <plugin>
                                  <artifactId>maven-surefire-plugin</artifactId>
                                  <version>2.4.3</version>
                                  <configuration>
                                     <skip>true</skip>
                                  </configuration>
                               </plugin>
                            </plugins>
                         </build>
                      </profile>
                
                      <profile>
                         <repositories>
                            <repository>
                               <id>jboss-public-repository</id>
                               <name>JBoss Repository</name>
                               <url>http://repository.jboss.org/nexus/content/groups/public</url>
                               <!-- These optional flags are designed to speed up your builds 
                                  by reducing remote server calls -->
                               <releases>
                                  <enabled>true</enabled>
                               </releases>
                               <snapshots>
                                  <enabled>false</enabled>
                               </snapshots>
                            </repository>
                         </repositories>
                
                         <pluginRepositories>
                            <pluginRepository>
                               <id>jboss-public-repository</id>
                               <name>JBoss Repository</name>
                               <url>http://repository.jboss.org/nexus/content/groups/public</url>
                               <releases>
                                  <enabled>true</enabled>
                               </releases>
                               <snapshots>
                                  <enabled>false</enabled>
                               </snapshots>
                            </pluginRepository>
                         </pluginRepositories>
                
                         <id>arq-jbossas-managed</id>
                         <dependencies>
                            <dependency>
                               <groupId>org.jboss.as</groupId>
                               <artifactId>jboss-as-arquillian-container-managed</artifactId>
                               <version>7.0.2.Final</version>
                               <scope>test</scope>
                            </dependency>
                         </dependencies>
                      </profile>
                
                      <profile>
                            <repository>
                               <id>jboss-public-repository</id>
                               <name>JBoss Repository</name>
                               <url>http://repository.jboss.org/nexus/content/groups/public</url>
                               <!-- These optional flags are designed to speed up your builds 
                                  by reducing remote server calls -->
                               <releases>
                                  <enabled>true</enabled>
                               </releases>
                               <snapshots>
                                  <enabled>false</enabled>
                               </snapshots>
                            </repository>
                         </repositories>
                
                         <pluginRepositories>
                            <pluginRepository>
                               <id>jboss-public-repository</id>
                               <name>JBoss Repository</name>
                               <url>http://repository.jboss.org/nexus/content/groups/public</url>
                               <releases>
                                  <enabled>true</enabled>
                               </releases>
                               <snapshots>
                                  <enabled>false</enabled>
                               </snapshots>
                            </pluginRepository>
                         </pluginRepositories>
                
                         <!-- An optional Arquillian testing profile that executes tests 
                            in a remote JBoss AS instance -->
                         <!-- Run with: mvn clean test -Parq-jbossas-remote -->
                         <id>arq-jbossas-remote</id>
                         <dependencies>
                            <dependency>
                               <groupId>org.jboss.as</groupId>
                               <artifactId>jboss-as-arquillian-container-remote</artifactId>
                               <version>7.0.2.Final</version>
                               <scope>test</scope>
                            </dependency>
                         </dependencies>
                      </profile>
                   </profiles>
                
                </project>
                



                And finally the war pom. We have to exclude all solder dependencies and add extra dependencies for Seam International which comes with Seam Faces


                <?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>
                          <artifactId>myapp</artifactId>
                          <groupId>fr.asd.myapp</groupId>
                          <version>1.0-SNAPSHOT</version>
                     </parent>
                
                     <artifactId>myapp-web</artifactId>
                     <packaging>war</packaging>
                
                     <name>myapp Web module</name>
                
                     <dependencies>
                
                          <!-- Dependency on the EJB module so we can use it's services if needed -->
                          <dependency>
                               <groupId>fr.asd.myapp</groupId>
                               <artifactId>myapp-ejb</artifactId>
                               <type>ejb</type>
                               <scope>provided</scope>
                          </dependency>
                
                          <dependency>
                               <groupId>javax.enterprise</groupId>
                               <artifactId>cdi-api</artifactId>
                               <scope>provided</scope>
                          </dependency>
                          <dependency>
                               <groupId>org.primefaces</groupId>
                               <artifactId>primefaces</artifactId>
                          </dependency>
                          <dependency>
                               <groupId>org.jboss.spec.javax.faces</groupId>
                               <artifactId>jboss-jsf-api_2.0_spec</artifactId>
                               <scope>provided</scope>
                          </dependency>
                          <dependency>
                               <groupId>org.jboss.spec.javax.el</groupId>
                               <artifactId>jboss-el-api_2.2_spec</artifactId>
                               <scope>provided</scope>
                          </dependency>
                          <dependency>
                               <groupId>org.hibernate.javax.persistence</groupId>
                               <artifactId>hibernate-jpa-2.0-api</artifactId>
                               <scope>provided</scope>
                          </dependency>
                          <dependency>
                               <groupId>org.jboss.solder</groupId>
                               <artifactId>solder-impl</artifactId>
                               <scope>provided</scope>
                               <exclusions>
                                    <exclusion>
                                         <artifactId>solder-api</artifactId>
                                         <groupId>org.jboss.solder</groupId>
                                    </exclusion>
                               </exclusions>
                          </dependency>
                          <dependency>
                               <groupId>org.jboss.seam.faces</groupId>
                               <artifactId>seam-faces</artifactId>
                               <exclusions>
                                    <exclusion>
                                         <artifactId>solder-api</artifactId>
                                         <groupId>org.jboss.solder</groupId>
                                    </exclusion>
                               </exclusions>
                          </dependency>
                          <dependency>
                               <groupId>org.jboss.seam.international</groupId>
                               <artifactId>seam-international</artifactId>
                               <version>${seam.version}</version>
                          </dependency>
                          <dependency>
                               <groupId>com.ocpsoft</groupId>
                               <artifactId>prettyfaces-jsf2</artifactId>
                               <version>3.3.2</version>
                          </dependency>
                          <dependency>
                               <groupId>joda-time</groupId>
                               <artifactId>joda-time</artifactId>
                               <version>2.0</version>
                          </dependency>
                          <dependency>
                     <groupId>commons-beanutils</groupId>
                     <artifactId>commons-beanutils</artifactId>
                     <version>1.8.3</version>
                </dependency>
                
                     </dependencies>
                
                     <build>
                          <finalName>myapp</finalName>
                          <plugins>
                               <plugin>
                                    <artifactId>maven-war-plugin</artifactId>
                                    <version>2.1.1</version>
                                    <configuration>
                                         <!-- Java EE 6 doesn't require web.xml, Maven needs to catch up! -->
                                         <failOnMissingWebXml>false</failOnMissingWebXml>
                                    </configuration>
                               </plugin>
                          </plugins>
                     </build>
                
                </project>
                



                I hope being able to put a ful example on github this WE.


                Regards.

                • 21. Re: Seam Faces causes exception in JBoss AS 7 (ear deployment)

                  Thanks Antoine, it helped me a lot.

                  • 22. Re: Seam Faces causes exception in JBoss AS 7 (ear deployment)
                    ceefour

                    I got hit by this problem in JBoss AS 7.1.1 with only Solder 3.1.0.Final :

                     

                    Exception 0 :

                    java.lang.RuntimeException: Service class org.jboss.solder.resourceLoader.ClasspathResourceLoader didn't implement the Extension interface

                        at org.jboss.solder.util.service.ServiceLoader.loadClass(ServiceLoader.java:217)

                        at org.jboss.solder.util.service.ServiceLoader.loadService(ServiceLoader.java:197)

                        at org.jboss.solder.util.service.ServiceLoader.loadServiceFile(ServiceLoader.java:169)

                        at org.jboss.solder.util.service.ServiceLoader.reload(ServiceLoader.java:143)

                        at org.jboss.solder.util.service.ServiceLoader.iterator(ServiceLoader.java:284)

                        at org.jboss.solder.resourceLoader.ResourceLoaderManager.<init>(ResourceLoaderManager.java:65)

                        at org.jboss.solder.config.xml.bootstrap.ResourceLoaderXmlDocumentProvider.<init>(ResourceLoaderXmlDocumentProvider.java:42)

                        at org.jboss.solder.config.xml.bootstrap.ResourceLoaderXmlDocumentProvider.<init>(ResourceLoaderXmlDocumentProvider.java:51)

                        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

                        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

                        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

                        at java.lang.Class.newInstance0(Class.java:372)

                        at java.lang.Class.newInstance(Class.java:325)

                        at org.jboss.solder.config.xml.bootstrap.XmlConfigExtension.beforeBeanDiscovery(XmlConfigExtension.java:85)

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                        at java.lang.reflect.Method.invoke(Method.java:601)

                        at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264)

                        at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)

                        at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)

                        at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260)

                        at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)

                        at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)

                        at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)

                        at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:241)

                        at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:229)

                        at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:207)

                        at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)

                        at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)

                        at org.jboss.weld.bootstrap.events.BeforeBeanDiscoveryImpl.fire(BeforeBeanDiscoveryImpl.java:46)

                        at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:322)

                        at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:81)

                        at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                        at java.lang.Thread.run(Thread.java:722)

                    Exception 0 :

                    java.lang.RuntimeException: Service class org.jboss.solder.resourceLoader.ClasspathResourceLoader didn't implement the Extension interface

                        at org.jboss.solder.util.service.ServiceLoader.loadClass(ServiceLoader.java:217)

                        at org.jboss.solder.util.service.ServiceLoader.loadService(ServiceLoader.java:197)

                        at org.jboss.solder.util.service.ServiceLoader.loadServiceFile(ServiceLoader.java:169)

                        at org.jboss.solder.util.service.ServiceLoader.reload(ServiceLoader.java:143)

                        at org.jboss.solder.util.service.ServiceLoader.iterator(ServiceLoader.java:284)

                        at org.jboss.solder.resourceLoader.ResourceLoaderManager.<init>(ResourceLoaderManager.java:65)

                        at org.jboss.solder.config.xml.bootstrap.ResourceLoaderXmlDocumentProvider.<init>(ResourceLoaderXmlDocumentProvider.java:42)

                        at org.jboss.solder.config.xml.bootstrap.ResourceLoaderXmlDocumentProvider.<init>(ResourceLoaderXmlDocumentProvider.java:51)

                        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

                        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

                        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

                        at java.lang.Class.newInstance0(Class.java:372)

                        at java.lang.Class.newInstance(Class.java:325)

                        at org.jboss.solder.config.xml.bootstrap.XmlConfigExtension.beforeBeanDiscovery(XmlConfigExtension.java:85)

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

                        at java.lang.reflect.Method.invoke(Method.java:601)

                        at org.jboss.weld.util.reflection.SecureReflections$13.work(SecureReflections.java:264)

                        at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52)

                        at org.jboss.weld.util.reflection.SecureReflectionAccess.runAsInvocation(SecureReflectionAccess.java:137)

                        at org.jboss.weld.util.reflection.SecureReflections.invoke(SecureReflections.java:260)

                        at org.jboss.weld.introspector.jlr.WeldMethodImpl.invokeOnInstance(WeldMethodImpl.java:170)

                        at org.jboss.weld.introspector.ForwardingWeldMethod.invokeOnInstance(ForwardingWeldMethod.java:51)

                        at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:154)

                        at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:241)

                        at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:229)

                        at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:207)

                        at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:75)

                        at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:46)

                        at org.jboss.weld.bootstrap.events.BeforeBeanDiscoveryImpl.fire(BeforeBeanDiscoveryImpl.java:46)

                        at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:322)

                        at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:81)

                        at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)

                        at java.lang.Thread.run(Thread.java:722)

                    "}}}}

                     

                    Sample project to reproduce:

                     

                    https://github.com/soluvas/ear-sample/commit/61d4ecbbbf6c03b7c0acac7d344120e1f80787fb

                    • 23. Re: Seam Faces causes exception in JBoss AS 7 (ear deployment)
                      ceefour

                      After clean restart of JBoss AS, error becomes:

                       

                      03:56:13,501 INFO  [org.jboss.solder.Version] (MSC service thread 1-4) Solder 3.1.0.Final (build id: 3.1.0.Final)

                      +03:56:14,938 INFO  [org.jboss.solder.core.CoreExtension] (MSC service thread 1-4) Preventing class org.jboss.seam.international.locale.LocaleConfiguration from being installed as bean due to @Veto annotation

                      03:56:15,325 INFO  [org.jboss.seam.international.status.TypedStatusMessageBundleExtension] (MSC service thread 1-4) Add @MessageBundle to org.jboss.solder.reflection.annotated.AnnotationBuilder.messages injection point for the type: org.jboss.solder.support.SolderMessages

                      03:56:15,363 INFO  [org.jboss.seam.international.status.TypedStatusMessageBundleExtension] (MSC service thread 1-4) Add @MessageBundle to org.jboss.solder.reflection.annotated.AnnotatedTypeBuilder.messages injection point for the type: org.jboss.solder.support.SolderMessages

                      03:56:15,562 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."ear-sample-ear.ear".WeldService: org.jboss.msc.service.StartException in service jboss.deployment.unit."ear-sample-ear.ear".WeldService: org.jboss.weld.exceptions.DeploymentException: WELD-001414 Bean name is ambiguous. Name defaultLocale resolves to beans [Producer Field [Locale] with qualifiers [@Any @Default @Named] declared as [[field] @Produces @Named private org.jboss.seam.international.locale.DefaultLocaleProducer.defaultLocale], Producer Field [Locale] with qualifiers [@Any @Default @Named] declared as [[field] @Produces @Named private org.jboss.seam.international.locale.DefaultLocaleProducer.defaultLocale]]

                          at org.jboss.as.weld.services.WeldService.start(WeldService.java:83)

                          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

                          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_147-icedtea]

                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_147-icedtea]

                          at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_147-icedtea]

                      Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001414 Bean name is ambiguous. Name defaultLocale resolves to beans [Producer Field [Locale] with qualifiers [@Any @Default @Named] declared as [[field] @Produces @Named private org.jboss.seam.international.locale.DefaultLocaleProducer.defaultLocale], Producer Field [Locale] with qualifiers [@Any @Default @Named] declared as [[field] @Produces @Named private org.jboss.seam.international.locale.DefaultLocaleProducer.defaultLocale]]

                          at org.jboss.weld.bootstrap.Validator.validateBeanNames(Validator.java:440)

                          at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:337)

                          at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:366)

                          at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:83)

                          at org.jboss.as.weld.services.WeldService.start(WeldService.java:76)

                          ... 5 more

                      • 24. Re: Seam Faces causes exception in JBoss AS 7 (ear deployment)
                        ceefour

                        Adding Seam International doesn't help.

                        • 25. Re: Seam Faces causes exception in JBoss AS 7 (ear deployment)
                          lightguard

                          That kind of seems like it's in there twice. Take a look at https://github.com/antoinesd/contentieux

                          • 26. Re: Seam Faces causes exception in JBoss AS 7 (ear deployment)
                            matt.hibb

                            I too and trying to package a Seam 3 app as an EAR and am having trouble.

                             

                            I tried the example at https://github.com/antoinesd/contentieux, but when I try that straight out of the box in AS 7.1.1, I get the below info level message during deployment. Should I consider this a problem? It certainly doesn't look very neat during AS startup.

                             

                            13:05:59,996 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-15) WELD-000119 Not generating any bean definitions from org.jboss.seam.faces.transaction.TransactionPhaseListener because of underlying class loading error

                            13:05:59,997 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-15) catching: org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class org.jboss.seam.faces.transaction.TransactionPhaseListener

                                at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:152) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

                                at org.jboss.as.weld.services.WeldService.start(WeldService.java:76) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

                                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]

                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]

                                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]

                            Caused by: java.lang.NoClassDefFoundError: Lorg/jboss/seam/transaction/SeamTransaction;

                                at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_04]

                                at java.lang.Class.privateGetDeclaredFields(Class.java:2308) [rt.jar:1.7.0_04]

                                at java.lang.Class.getDeclaredFields(Class.java:1760) [rt.jar:1.7.0_04]

                                at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:102) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:99) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.util.reflection.SecureReflections.getDeclaredFields(SecureReflections.java:99) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:153) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:118) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:49) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:40) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)

                                at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)

                                at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)

                                at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)

                                at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)

                                at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:149) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                ... 11 more

                            Caused by: java.lang.ClassNotFoundException: org.jboss.seam.transaction.SeamTransaction from [Module "deployment.contentieux-ear.ear.contentieux-web-1.0-SNAPSHOT.war:main" from Service Module Loader]

                                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                                ... 29 more

                             

                            13:06:00,092 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-15) WELD-000119 Not generating any bean definitions from org.jboss.seam.faces.security.SecurityPhaseListener because of underlying class loading error

                            13:06:00,092 INFO  [org.jboss.weld.ClassLoading] (MSC service thread 1-15) catching: org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class org.jboss.seam.faces.security.SecurityPhaseListener

                                at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:152) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:115) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.as.weld.WeldContainer.start(WeldContainer.java:82) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

                                at org.jboss.as.weld.services.WeldService.start(WeldService.java:76) [jboss-as-weld-7.1.1.Final.jar:7.1.1.Final]

                                at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                                at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                                at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_04]

                                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_04]

                                at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_04]

                            Caused by: java.lang.NoClassDefFoundError: Lorg/jboss/seam/security/Identity;

                                at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_04]

                                at java.lang.Class.privateGetDeclaredFields(Class.java:2308) [rt.jar:1.7.0_04]

                                at java.lang.Class.getDeclaredFields(Class.java:1760) [rt.jar:1.7.0_04]

                                at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:102) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.util.reflection.SecureReflections$4.work(SecureReflections.java:99) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.util.reflection.SecureReflectionAccess.run(SecureReflectionAccess.java:52) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.util.reflection.SecureReflectionAccess.runAndWrap(SecureReflectionAccess.java:63) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.util.reflection.SecureReflections.getDeclaredFields(SecureReflections.java:99) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:153) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:118) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:49) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:40) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)

                                at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)

                                at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)

                                at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)

                                at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)

                                at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:149) [weld-core-1.1.5.AS71.Final.jar:2012-02-10 15:31]

                                ... 11 more

                            Caused by: java.lang.ClassNotFoundException: org.jboss.seam.security.Identity from [Module "deployment.contentieux-ear.ear.contentieux-web-1.0-SNAPSHOT.war:main" from Service Module Loader]

                                at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                                at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                                at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                                at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                                at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                                ... 29 more

                            • 27. Re: Seam Faces causes exception in JBoss AS 7 (ear deployment)
                              ceefour

                              Matthew, those lines aren't errors, but INFO messages produced by Weld when it can't find optional dependencies. These specific log lines are harmless.

                              1 2 Previous Next