2 Replies Latest reply on Dec 9, 2011 8:00 AM by Pau Baffoe

    JBoss, Icefaces 2.0.2 , jsf 2 and Weld

    Pau Baffoe Newbie

      I am developing an application using Jboss 7, Icefaces 2.0.2, jsf 2 and CDI and getting the following errors

       

      14:49:37,580 SEVERE [javax.enterprise.resource.webcontainer.jsf.application] (http--127.0.0.1-8080-1) org.apache.xerces.dom.DocumentImpl from [Module "deployment.sot-app.war:main" from Service Module Loader]: java.lang.ClassNotFoundException: org.apache.xerces.dom.DocumentImpl from [Module "deployment.sot-app.war:main" from Service Module Loader]

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

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

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

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

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

                at java.lang.Class.forName0(Native Method) [:1.7.0]

                at java.lang.Class.forName(Class.java:264) [:1.7.0]

                at com.sun.faces.renderkit.ApplicationObjectInputStream.resolveClass(ApplicationObjectInputStream.java:95) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1593) [:1.7.0]

                at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514) [:1.7.0]

                at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750) [:1.7.0]

                at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [:1.7.0]

                at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) [:1.7.0]

                at java.util.HashMap.readObject(HashMap.java:1043) [:1.7.0]

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.7.0]

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [:1.7.0]

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [:1.7.0]

                at java.lang.reflect.Method.invoke(Method.java:601) [:1.7.0]

                at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:991) [:1.7.0]

                at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1866) [:1.7.0]

                at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) [:1.7.0]

                at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [:1.7.0]

                at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964) [:1.7.0]

                at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888) [:1.7.0]

                at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) [:1.7.0]

                at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347) [:1.7.0]

                at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1685) [:1.7.0]

                at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1341) [:1.7.0]

                at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1685) [:1.7.0]

                at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1341) [:1.7.0]

                at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369) [:1.7.0]

                at com.sun.faces.renderkit.ClientSideStateHelper.doGetState(ClientSideStateHelper.java:255) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.renderkit.ClientSideStateHelper.getState(ClientSideStateHelper.java:198) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.renderkit.ResponseStateManagerImpl.getState(ResponseStateManagerImpl.java:100) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:192) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:452) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.ocpsoft.rewrite.faces.RewriteViewHandler.restoreView(RewriteViewHandler.java:96) [rewrite-integration-faces-1.0.0.Alpha4.jar:]

                at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:303) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]

                at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:192) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at com.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:134) [rewrite-impl-servlet-1.0.0.Alpha4.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

                at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

                at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49) [jboss-as-jpa-7.0.2.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

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

       

       

      14:49:37,588 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/sot-app].[Faces Servlet]] (http--127.0.0.1-8080-1) Servlet.service() for servlet Faces Servlet threw exception: java.lang.NullPointerException

                at com.sun.faces.context.PartialViewContextImpl.createPartialResponseWriter(PartialViewContextImpl.java:441) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.context.PartialViewContextImpl.access$300(PartialViewContextImpl.java:71) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.context.PartialViewContextImpl$DelayedInitPartialResponseWriter.getWrapped(PartialViewContextImpl.java:582) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at javax.faces.context.PartialResponseWriter.startDocument(PartialResponseWriter.java:115) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]

                at com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError(AjaxExceptionHandlerImpl.java:199) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.context.AjaxExceptionHandlerImpl.handle(AjaxExceptionHandlerImpl.java:123) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at org.icefaces.impl.application.ExtendedExceptionHandler.handle(ExtendedExceptionHandler.java:110) [icefaces-2.0.2.jar:]

                at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118) [jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]

                at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593) [jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67) [weld-core-1.1.2.Final.jar:2011-07-26 15:02]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at com.ocpsoft.rewrite.servlet.RewriteFilter.doFilter(RewriteFilter.java:134) [rewrite-impl-servlet-1.0.0.Alpha4.jar:]

                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:139) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

                at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]

                at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:49) [jboss-as-jpa-7.0.2.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

                at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.1.Final.jar:7.0.2.Final]

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

       

      My pom.xml looks like this

       

      <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/xsd/maven-4.0.0.xsd">

        <modelVersion>4.0.0</modelVersion>

        <groupId>com.sot</groupId>

        <artifactId>sot-app</artifactId>

        <version>2.0-SNAPSHOT</version>

        <packaging>war</packaging>

        <name>sot-app</name>

        <description/>

       

                <properties>

                          <jboss-javaee6-spec.version>2.0.0.Final</jboss-javaee6-spec.version>

                          <richfaces.version>4.0.0.Final</richfaces.version>

                </properties>

      <!-- 

                <repositories>

                           The JBoss Community public repository is a composite repository of

                                    several major repositories

                           see http://community.jboss.org/wiki/MavenGettingStarted-Users

                          At the time of writing, Arquillian and the JBoss Java EE specification

                                    POMs are only in the JBoss Community public repository (not Maven central)

                           <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>

                                              <updatePolicy>never</updatePolicy>

                                    </releases>

                                    <snapshots>

                                              <updatePolicy>daily</updatePolicy>

                                    </snapshots>

                          </repository>

       

                          <repository>

                  <id>ICEfaces Repo</id>

                  <name>ICEfaces Repo</name>

                  <url>http://anonsvn.icefaces.org/repo/maven2/releases/</url>

              </repository>

                </repositories>

      -->

                <dependencyManagement>

                          <dependencies>

                                    <!-- Define the version of JBoss' Java EE 6 APIs we want to import. Any

                                              dependencies from org.jboss.spec will have their version defined by this

                                              BOM -->

                                    <!-- JBoss distributes a complete set of Java EE 6 APIs including a Bill

                                              of Materials (BOM). A BOM specifies the versions of a "stack" (or a collection)

                                              of artifacts. We use this here so that we always get the correct versions

                                              of artifacts. Here we use the jboss-javaee-web-6.0 stack (you can read this

                                              as the JBoss stack of the Java EE Web Profile 6 APIs), and we use version

                                              2.0.0.Beta1 which is the latest release of the stack. You can actually use

                                              this stack with any version of JBoss AS that implements Java EE 6, not just

                                              JBoss AS 7! -->

                                    <dependency>

                                              <groupId>org.jboss.spec</groupId>

                                              <artifactId>jboss-javaee-6.0</artifactId>

                                              <version>${jboss-javaee6-spec.version}</version>

                                              <type>pom</type>

                                              <scope>provided</scope>

                                    </dependency>

                                    <!--

                                    <dependency>

                                              <groupId>org.richfaces</groupId>

                                              <artifactId>richfaces-bom</artifactId>

                                              <version>${richfaces.version}</version>

                                              <scope>import</scope>

                                              <type>pom</type>

                                    </dependency>

                                     -->

                          </dependencies>

                </dependencyManagement>

      <!-- 

                <pluginRepositories>

                          <pluginRepository>

                                    <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>

                                              <updatePolicy>never</updatePolicy>

                                    </releases>

                                    <snapshots>

                                               Set to true to fix error in which Maven cannot find org.apache.maven.plugins:maven-archetype-plugin:maven-plugin:2.0-alpha-6-SNAPSHOT

                          <updatePolicy>daily</updatePolicy>

                                    </snapshots>

                          </pluginRepository>

                          <pluginRepository>

                                    <id>ICEfaces Repo</id>

                  <name>ICEfaces Repo</name>

                  <url>http://anonsvn.icefaces.org/repo/maven2/releases/</url>

                          </pluginRepository>

                </pluginRepositories>

      -->

                <dependencies>

                

                           <dependency>

                                     <groupId>org.metawidget.forge</groupId>

                                     <artifactId>metawidget-forge-scaffold</artifactId>

                                    <version>1.0.0-SNAPSHOT</version>

                          </dependency>

       

       

                          <dependency>

                  <groupId>javax</groupId>   

                  <artifactId>javaee-web-api</artifactId>

                  <version>6.0</version>

                  <scope>provided</scope>

              </dependency>

             

                          <dependency>

                                    <groupId>org.icepush</groupId>

                                    <artifactId>icepush</artifactId>

                                    <version>2.0.2</version>

                          </dependency>

       

                          <dependency>

                                    <groupId>org.icefaces</groupId>

                                    <artifactId>icefaces</artifactId>

                                    <version>2.0.2</version>

                                    <exclusions>

                                              <exclusion>

                                                        <artifactId>jsf-impl</artifactId>

                                                        <groupId>com.sun.faces</groupId>

                                              </exclusion>

       

                                    </exclusions>

                          </dependency>

       

                          <dependency>

                                    <groupId>org.icefaces</groupId>

                                    <artifactId>icefaces-ace</artifactId>

                                    <version>2.0.2</version>

                          </dependency>

       

                          <dependency>

                                    <groupId>org.icefaces</groupId>

                                    <artifactId>icefaces-compat</artifactId>

                                    <version>2.0.2</version>

                          </dependency>

       

                </dependencies>

        <build>

                  <finalName>sot-app</finalName>

          <sourceDirectory>${basedir}/src</sourceDirectory>

          <outputDirectory>${basedir}/target/classes</outputDirectory>

          <resources>

            <resource>

              <directory>${basedir}/src</directory>

              <excludes>

                <exclude>**/*.java</exclude>

              </excludes>

            </resource>

          </resources>

          <plugins>

            <plugin>

              <artifactId>maven-war-plugin</artifactId>

              <configuration>

                <warSourceDirectory>${basedir}/WebContent</warSourceDirectory>

              </configuration>

            </plugin>

            <plugin>

              <artifactId>maven-compiler-plugin</artifactId>

              <configuration>

                <source>1.6</source>

                <target>1.6</target>

              </configuration>

            </plugin>

          </plugins>

        </build>

      </project>

       

      Thanks.