0 Replies Latest reply on Nov 1, 2011 2:26 AM by Bobby Harsono

    javax.servlet.ServletException: javax/faces/context/FacesContext when deploy a jsf webapp in jboss as6 final

    Bobby Harsono Newbie

      Hi im trying to deploy a jsf webapp and encountering this error:

       

      javax.servlet.ServletException: javax/faces/context/FacesContext

      javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)

      root cause

      java.lang.NoClassDefFoundError: javax/faces/context/FacesContext
      org.springframework.web.jsf.el.SpringBeanFacesELResolver.getWebApplicationContext(SpringBeanFacesELResolver.java:89)
      org.springframework.web.jsf.el.SpringBeanFacesELResolver.getBeanFactory(SpringBeanFacesELResolver.java:78)
      org.springframework.beans.factory.access.el.SpringBeanELResolver.getValue(SpringBeanELResolver.java:49)
      com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
      com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
      org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:67)
      org.apache.el.parser.AstValue.getValue(AstValue.java:115)
      org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:187)
      com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
      javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
      javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
      javax.faces.component.UIData.getValue(UIData.java:731)
      org.primefaces.component.datatable.DataTable.getValue(DataTable.java:789)
      javax.faces.component.UIData.getDataModel(UIData.java:1798)
      javax.faces.component.UIData.getRowCount(UIData.java:356)
      org.primefaces.component.datatable.DataTable.calculatePage(DataTable.java:749)
      org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:185)
      org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:95)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
      org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:63)
      org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47)
      org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:184)
      org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:107)
      org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:55)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
      com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)
      com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)
      com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1756)
      javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
      org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:59)
      org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47)
      org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:184)
      org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:107)
      org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:55)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1763)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
      org.primefaces.component.tabview.TabViewRenderer.encodeTabContent(TabViewRenderer.java:228)
      org.primefaces.component.tabview.TabViewRenderer.encodeContents(TabViewRenderer.java:201)
      org.primefaces.component.tabview.TabViewRenderer.encodeMarkup(TabViewRenderer.java:120)
      org.primefaces.component.tabview.TabViewRenderer.encodeEnd(TabViewRenderer.java:68)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
      org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:63)
      org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47)
      org.primefaces.component.layout.LayoutUnitRenderer.encodeEnd(LayoutUnitRenderer.java:51)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1763)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
      com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:401)
      com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)

      root cause

      java.lang.ClassNotFoundException: javax.faces.context.FacesContext from BaseClassLoader@f32dde{vfs:///apps/jboss/server/default/conf/jboss-service.xml}
      org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480)
      java.lang.ClassLoader.loadClass(ClassLoader.java:252)
      java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
      org.springframework.web.jsf.el.SpringBeanFacesELResolver.getWebApplicationContext(SpringBeanFacesELResolver.java:89)
      org.springframework.web.jsf.el.SpringBeanFacesELResolver.getBeanFactory(SpringBeanFacesELResolver.java:78)
      org.springframework.beans.factory.access.el.SpringBeanELResolver.getValue(SpringBeanELResolver.java:49)
      com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
      com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
      org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:67)
      org.apache.el.parser.AstValue.getValue(AstValue.java:115)
      org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:187)
      com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
      javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
      javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182)
      javax.faces.component.UIData.getValue(UIData.java:731)
      org.primefaces.component.datatable.DataTable.getValue(DataTable.java:789)
      javax.faces.component.UIData.getDataModel(UIData.java:1798)
      javax.faces.component.UIData.getRowCount(UIData.java:356)
      org.primefaces.component.datatable.DataTable.calculatePage(DataTable.java:749)
      org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:185)
      org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:95)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
      org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:63)
      org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47)
      org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:184)
      org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:107)
      org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:55)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
      com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312)
      com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)
      com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1756)
      javax.faces.render.Renderer.encodeChildren(Renderer.java:168)
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845)
      org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:59)
      org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47)
      org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:184)
      org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:107)
      org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:55)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1763)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
      org.primefaces.component.tabview.TabViewRenderer.encodeTabContent(TabViewRenderer.java:228)
      org.primefaces.component.tabview.TabViewRenderer.encodeContents(TabViewRenderer.java:201)
      org.primefaces.component.tabview.TabViewRenderer.encodeMarkup(TabViewRenderer.java:120)
      org.primefaces.component.tabview.TabViewRenderer.encodeEnd(TabViewRenderer.java:68)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
      org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:63)
      org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47)
      org.primefaces.component.layout.LayoutUnitRenderer.encodeEnd(LayoutUnitRenderer.java:51)
      javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1763)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
      com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:401)
      com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)

      Jar In my jboss/lib:

      activemq-all-5.5.0.jar   commons-io-2.0.1.jar   httpmime-4.1.2.jar             quartz-1.8.5.jar
      antlr-2.7.6.jar          commons-lang-2.6.jar   jaxen-1.1.jar                  slf4j-api-1.5.11.jar
      asm-1.5.3.jar            commons-logging-1.1.1.jar  jcl-over-slf4j-1.5.11.jar      slf4j-log4j12-1.5.11.jar
      asm-attrs-1.5.3.jar      commons-net-2.0.jar    jdbc-stdext-2.0.jar            spring-2.5.6.jar
      asn1j-1.0.jar            concurrent-1.3.2.jar   json-lib-jdk15-2.2.2.jar       spring-aop-2.5.6.jar
      aspectjtools-1.6.2.jar   dom4j-1.6.1.jar        json.simple-1.0.jar            spring-test-2.5.6.SEC03.jar
      aspectjweaver-1.6.2.jar  ehcache-1.2.4.jar      jta-1.1.jar                    spring-web-2.5.6.jar
      c3p0-0.9.1.jar           ezmorph-1.0.5.jar      junit-dep-4.8.2.jar            spring-webmvc-2.5.6.jar
      cglib-nodep-2.1_3.jar    hibernate-3.2.7.ga.jar LogDataService-0.0.1-SNAPSHOT.jar  util.concurrent-1.3.2.jar
      commons-beanutils-1.6.jarhttpclient-4.1.2.jar   mysql-connector-java-5.1.6.jar xml-apis-1.0.b2.jar
      commons-collections-3.2.jar  httpcore-4.1.2.jar     oro-2.0.8.jar

       

      Jar in my WEB-INF/lib

      activation-1.1.1.jar                     geronimo-jms_1.1_spec-1.1.1.jar  quartz-1.8.5.jar
      activeio-core-3.1.2.jar                  geronimo-jta_1.0.1B_spec-1.0.1.jar   router-lib-1.0-SNAPSHOT.jar
      activemq-core-5.5.0.jar                  glass-x-1.0.1.jar                saaj-api-1.3.jar
      activemq-pool-5.5.0.jar                  hibernate-3.2.7.ga.jar           saaj-impl-1.3.2.jar
      activemq-protobuf-1.1.jar                itext-2.1.7.jar                  servlet-api-2.5-6.0.2.jar
      antlr-2.7.6.jar                          jasypt-1.7.jar                   slf4j-api-1.6.0.jar
      aopalliance-1.0.jar                      javaee-web-api-6.0.jar           spring-2.5.6.jar
      asm-1.5.3.jar                            jcl-over-slf4j-1.6.0.jar         spring-aop-2.0.8.jar
      asm-attrs-1.5.3.jar                      jcommon-1.0.16.jar               spring-beans-2.5.6.jar
      aspectjtools-1.6.2.jar                   jfreechart-1.0.13.jar            spring-context-2.5.6.jar
      aspectjweaver-1.6.2.jar                  jsf-api-2.1.2.jar                spring-context-support-2.5.6.jar
      bcmail-jdk14-138.jar                     jsf-facelets-1.1.15.B1.jar       spring-core-2.5.6.jar
      bcprov-jdk14-138.jar                     jsf-impl-2.1.2.jar               spring-dao-2.0.8.jar
      bctsp-jdk14-1.38.jar                     jstl-1.2.jar                     spring-jdbc-2.0.8.jar
      cglib-2.1_3.jar                          jta-1.0.1B.jar                   spring-security-acl-2.0.2.jar
      commons-codec-1.3.jar                    juli-6.0.32.jar                  spring-security-core-2.0.5.RELEASE.jar
      commons-collections-3.1.jar              jul-to-slf4j-1.6.1.jar           spring-security-core-tiger-2.0.2.jar
      commons-digester-1.6.jar                 kahadb-5.5.0.jar                 spring-security-taglibs-2.0.2.jar
      commons-httpclient-3.1.jar               log4j-1.2.14.jar                 spring-support-2.0.8.jar
      commons-logging-1.1.1.jar                messaging-2.1-20111012.120035-3.jar  spring-web-2.5.6.jar
      commons-net-2.0.jar                      mysql-connector-java-5.1.6.jar   spring-webmvc-2.5.6.jar
      commons-pool-1.5.4.jar                   Notification-0.0.1-SNAPSHOT.jar  spring-ws-1.5.9-all.jar
      dom4j-1.6.1.jar                          openfaces-3.0.jar                stax-api-1.0.1.jar
      ehcache-1.2.3.jar                        org.osgi.core-4.1.0.jar          tomcat-jdbc-1.1.0.1.jar
      geronimo-j2ee-management_1.1_spec-1.0.1.jar  primefaces-3.0.M3.jar            xml-apis-1.0.b2.jar

       

      I keep getting this error..anybody know how to fix this error?? thank you

      i attached my .WAR file btw