错误部署Web应用程序JBOSS 6.0.0 javax.servlet.ServletException

时间:2011-10-31 11:24:34

标签: jsf jboss jboss6.x

您好我试图部署我的办公室伙伴的网络应用程序,这是错误:

ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/mb-web-0.0.1-SNAPSHOT].[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception: java.lang.ClassNotFoundException: javax.faces.context.FacesContext from BaseClassLoader@161bfa3{vfs:///apps/jboss/server/default/conf/jboss-service.xml}
        at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480) [jboss-classloader.jar:2.2.0.GA]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252) [:1.6.0_10]
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [:1.6.0_10]
        at org.springframework.web.jsf.el.SpringBeanFacesELResolver.getWebApplicationContext(SpringBeanFacesELResolver.java:89) [:2.5.6]
        at org.springframework.web.jsf.el.SpringBeanFacesELResolver.getBeanFactory(SpringBeanFacesELResolver.java:78) [:2.5.6]
        at org.springframework.beans.factory.access.el.SpringBeanELResolver.getValue(SpringBeanELResolver.java:49) [:2.5.6]
        at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176) [:2.1.2-FCS]
        at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203) [:2.1.2-FCS]
        at org.apache.el.parser.AstIdentifier.getValue(AstIdentifier.java:67) [:6.0.0.Final]
        at org.apache.el.parser.AstValue.getValue(AstValue.java:115) [:6.0.0.Final]
        at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:187) [:6.0.0.Final]
        at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109) [:2.1.2-FCS]
        at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194) [:2.1.2-FCS]
        at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:182) [:2.1.2-FCS]
        at javax.faces.component.UIData.getValue(UIData.java:731) [:2.1.2-FCS]
        at org.primefaces.component.datatable.DataTable.getValue(DataTable.java:789) [:]
        at javax.faces.component.UIData.getDataModel(UIData.java:1798) [:2.1.2-FCS]
        at javax.faces.component.UIData.getRowCount(UIData.java:356) [:2.1.2-FCS]
        at org.primefaces.component.datatable.DataTable.calculatePage(DataTable.java:749) [:]
        at org.primefaces.component.datatable.DataTableRenderer.encodeMarkup(DataTableRenderer.java:185) [:]
        at org.primefaces.component.datatable.DataTableRenderer.encodeEnd(DataTableRenderer.java:95) [:]
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) [:2.1.2-FCS]
        at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:63) [:]
        at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47) [:]
        at org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:184) [:]
        at org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:107) [:]
        at org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:55) [:]
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) [:2.1.2-FCS]
        at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:312) [:2.1.2-FCS]
        at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185) [:2.1.2-FCS]
        at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129) [:2.1.2-FCS]
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) [:2.1.2-FCS]
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1756) [:2.1.2-FCS]
        at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) [:2.1.2-FCS]
        at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) [:2.1.2-FCS]
        at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:59) [:]
        at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47) [:]
        at org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:184) [:]
        at org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:107) [:]
        at org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:55) [:]
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) [:2.1.2-FCS]
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1763) [:2.1.2-FCS]
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759) [:2.1.2-FCS]
        at org.primefaces.component.tabview.TabViewRenderer.encodeTabContent(TabViewRenderer.java:228) [:]
        at org.primefaces.component.tabview.TabViewRenderer.encodeContents(TabViewRenderer.java:201) [:]
        at org.primefaces.component.tabview.TabViewRenderer.encodeMarkup(TabViewRenderer.java:120) [:]
        at org.primefaces.component.tabview.TabViewRenderer.encodeEnd(TabViewRenderer.java:68) [:]
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) [:2.1.2-FCS]
        at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:63) [:]
        at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:47) [:]
        at org.primefaces.component.layout.LayoutUnitRenderer.encodeEnd(LayoutUnitRenderer.java:51) [:]
        at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) [:2.1.2-FCS]
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1763) [:2.1.2-FCS]
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759) [:2.1.2-FCS]
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759) [:2.1.2-FCS]
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759) [:2.1.2-FCS]
        at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:401) [:2.1.2-FCS]
        at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131) [:2.1.2-FCS]
        at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121) [:2.1.2-FCS]
        at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) [:2.1.2-FCS]
        at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [:2.1.2-FCS]
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [:2.1.2-FCS]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
        at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
        at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
        at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
        at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
        at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
        at java.lang.Thread.run(Thread.java:619) [:1.6.0_10]

我的应用程序中的lib是:

activation-1.1.1.jar                         glass-x-1.0.1.jar                saaj-api-1.3.jar
activeio-core-3.1.2.jar                      itext-2.1.7.jar                  saaj-impl-1.3.2.jar
activemq-core-5.5.0.jar                      jasypt-1.7.jar                   spring-beans-2.5.6.jar
activemq-pool-5.5.0.jar                      jcommon-1.0.16.jar               spring-context-2.5.6.jar
activemq-protobuf-1.1.jar                    jfreechart-1.0.13.jar            spring-context-support-2.5.6.jar
antlr-2.7.6.jar                              jsf-api-2.1.2.jar                spring-core-2.5.6.jar
aopalliance-1.0.jar                          jsf-facelets-1.1.15.B1.jar       spring-dao-2.0.8.jar
bcmail-jdk14-138.jar                         jsf-impl-2.1.2.jar               spring-jdbc-2.0.8.jar
bcprov-jdk14-138.jar                         jstl-1.2.jar                     spring-security-acl-2.0.2.jar
bctsp-jdk14-1.38.jar                         juli-6.0.32.jar                  spring-security-core-2.0.5.RELEASE.jar
cglib-2.1_3.jar                              jul-to-slf4j-1.6.1.jar           spring-security-core-tiger-2.0.2.jar
commons-codec-1.3.jar                        kahadb-5.5.0.jar                 spring-security-taglibs-2.0.2.jar
commons-digester-1.6.jar                     logback-classic-0.9.29.jar       spring-support-2.0.8.jar
commons-httpclient-3.1.jar                   logback-core-0.9.9.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
geronimo-j2ee-management_1.1_spec-1.0.1.jar  openfaces-3.0.jar                stax-api-1.0.1.jar
geronimo-jms_1.1_spec-1.1.1.jar              org.osgi.core-4.1.0.jar          tomcat-jdbc-1.1.0.1.jar

我的jboss / apps / server / default / lib中的lib是

activemq-all-5.5.0.jar       commons-io-1.4.jar         jdbc-stdext-2.0.jar                  quartz-1.8.5.jar
antlr-2.7.6.jar              commons-lang-2.2.jar       json-lib-jdk15-2.2.2.jar             router-lib-1.0-SNAPSHOT.jar
asm-1.5.3.jar                commons-logging-1.1.1.jar  json.simple-1.0.jar                  slf4j-api-1.5.11.jar
asm-attrs-1.5.3.jar          commons-net-2.0.jar        jta-1.0.1B.jar                       slf4j-log4j12-1.5.11.jar
asn1j-1.0.jar                concurrent-1.3.2.jar       junit-4.4.jar                        spring-2.5.6.jar
aspectjtools-1.6.2.jar       dom4j-1.6.1.jar            log4j-1.2.14.jar                     spring-aop-2.5.6.jar
aspectjweaver-1.6.2.jar      ehcache-1.2.4.jar          LogDataService-0.0.1-SNAPSHOT.jar    spring-test-2.5.6.jar
c3p0-0.9.1.jar               ezmorph-1.0.5.jar          messaging-2.1-20111012.120035-3.jar  spring-web-2.5.6.jar
cglib-nodep-2.1_3.jar        hibernate-3.2.7.ga.jar     mysql-connector-java-5.1.6.jar       xml-apis-1.0.b2.jar
commons-beanutils-1.6.jar    jaxen-1.1.jar              Notification-0.0.1-SNAPSHOT.jar
commons-collections-3.2.jar  jcl-over-slf4j-1.5.11.jar  oro-2.0.8.jar
geronimo-jta_1.0.1B_spec-1.0.1.jar           primefaces-3.0.M3.jar
我已经花了半天时间坐在这里搞砸什么。有人知道我的错误在哪里?谢谢

1 个答案:

答案 0 :(得分:0)

java.lang.ClassNotFoundException: javax.faces.context.FacesContext from BaseClassLoader@161bfa3{vfs:///apps/jboss/server/default/conf/jboss-service.xml}
    at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480) [jboss-classloader.jar:2.2.0.GA]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252) [:1.6.0_10]
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320) [:1.6.0_10]
    at org.springframework.web.jsf.el.SpringBeanFacesELResolver.getWebApplicationContext(SpringBeanFacesELResolver.java:89) [:2.5.6]

这表明JBoss服务器级别类加载器而不是WAR级别类加载器加载了SpringBeanFacesELResolver。从JBoss 6.0开始,JSF在WAR级别类加载器中仅 。另请参阅http://community.jboss.org/wiki/JSFOnJBossAS6

jboss/apps/server/default/lib列表中,我看到几个应该由WAR使用的类,而不是服务器。我认为你列出的几乎所有 JAR都属于/WEB-INF/lib。那里还有spring-web JAR,这反过来证实了这个例外的原因。此JAR需要在WAR中才能修复此特定异常。从列表中,我认为只有mysql-connector-java-5.1.6.jar在那里是好的,假设您使用的是需要该JAR的服务器管理的数据源。