2011-10-31 80 views
0

你好我試圖部署我辦公室同事的web應用程序,這裏是錯誤:ERROR部署Web應用程序JBOSS 6.0.0 javax.servlet.ServletException

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 [email protected]{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 

的LIB在我的JBoss /應用/服務器/默認/ 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

這些問題讓我感到頭暈 – musefan

+0

對不起,它是爲了給問題更清晰的看法 – Lynx777

回答

0
java.lang.ClassNotFoundException: javax.faces.context.FacesContext from [email protected]{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] 

這表明SpringBeanFacesELResolver是由JBoss服務器級的類加載器,而不是WAR級類加載器加載。由於JBoss的6.0,JSF是可供WAR級別的類加載器。另見http://community.jboss.org/wiki/JSFOnJBossAS6

在你jboss/apps/server/default/lib上市我看到幾類,這是爲了只,而不是被服務器所使用的戰爭。我認爲幾乎所有你那裏列出的JAR真正屬於在/WEB-INF/lib。在那裏還有spring-web JAR確認了這個異常的原因。這個JAR需要在WAR中才能解決這個特殊的異常。從上市,我認爲只有mysql-connector-java-5.1.6.jar是好的有,假設你使用的需要一個JAR服務器管理的數據源。

+0

你能告訴我哪個jar應該在web-in/lib中,哪些應該在jboss/lib中?我試圖把春天的網站放在webinf/lib和部署錯誤,然後我把所有的spring * jar放在jboss/lib中,並得到相同的錯誤..謝謝你 – Lynx777

+0

你應該**從'jboss/lib'並把它們放在'/ WEB-INF/lib'中。您應該只將服務器特定的JAR放入'jboss/lib'中(例如,JBoss管理的JBDC連接池將使用的JDBC驅動程序)。 – BalusC

+0

嗯,老實說我想這些方法昨晚: 的拆卸,相同的庫 在JBoss的/ lib目錄 -Updating庫版本的拆卸,Java EE的網絡API和servlet API(我讀了這兩個不應該被包含在weapps) - 關於春天似乎JBoss的需要,所以我還是有春春2.5.6網絡2.5.6的彈簧測試2.5.6和Spring AOP 2.5.6在我的JBoss/lib如果我將其刪除或移動到WEB-INF/LIB就會有錯誤,同時啓動.. - 我也試過配置我jsf.deployer像鏈接,您給了我,但沒有奏效 – Lynx777