2015-09-30 99 views
-1

我正在將項目從jsf 1.2遷移到jsf 2.2.12。建立成功後,我部署到JBoss 7服務器,並得到了這樣的錯誤消息:將jsf 1.2遷移到jsf時出現問題2.2.12

14:14:10,255 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."myproject-war.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myproject-war.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "myproject-war.war" 
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] 
    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:1145) [rt.jar:1.7.0_80] 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_80] 
    at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80] 
Caused by: java.lang.RuntimeException: Error getting reflective information for class org.richfaces.taglib.ColumnsTag with ClassLoader ModuleClassLoader for Module "deployment.myproject-war.war:main" from Service Module Loader 
    at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] 
    at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58) 
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85) 
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70) 
    at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55) 
    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] 
    ... 5 more 
Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "javax.faces.webapp.UIComponentClassicTagBase.getParent()Ljavax/servlet/jsp/tagext/Tag;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/richfaces/taglib/ColumnsTag, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for interface javax/servlet/jsp/tagext/Tag have different Class objects for the type ervlet/jsp/tagext/Tag; used in the signature 
    at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_80] 
    at java.lang.Class.privateGetDeclaredFields(Class.java:2509) [rt.jar:1.7.0_80] 
    at java.lang.Class.getDeclaredFields(Class.java:1819) [rt.jar:1.7.0_80] 
    at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] 
    at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final] 
    ... 10 more 

14:14:10,286 INFO [org.jboss.as.server] (management-handler-thread - 2) JBAS015870: Deploy of deployment "myproject-war.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myproject-war.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myproject-war.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"myproject-war.war\""}} 
14:14:10,484 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015877: Stopped deployment myproject-war.war in 198ms 
14:14:10,486 INFO [org.jboss.as.controller] (management-handler-thread - 2) JBAS014774: Service status report 
JBAS014777: Services which failed to start:  service jboss.deployment.unit."myproject-war.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."myproject-war.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "myproject-war.war" 

[2015-09-30 02:14:10,579] Artifact myproject-war:war exploded: Error during artifact deployment. See server log for details. 
[2015-09-30 02:14:10,579] Artifact myproject-war:war exploded: java.lang.Exception: {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"myproject-war.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"myproject-war.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"myproject-war.war\""}} 

你能有這個一個什麼想法?

這裏是我的系統細節: 服務器:jboss7 當前庫:JSF 1.2,RichFaces的3.3.3 遷移庫:JSF 2.2.17 體形:行家

最好的問候,

回答

3

Caused by: java.lang.LinkageError: loader constraint violation in interface itable initialization: when resolving method "javax.faces.webapp.UIComponentClassicTagBase.getParent()Ljavax/servlet/jsp/tagext/Tag;" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/richfaces/taglib/ColumnsTag, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for interface javax/servlet/jsp/tagext/Tag have different Class objects for the type ervlet/jsp/tagext/Tag; used in the signature

java.lang.LinkageError是多個不同版本化庫的類路徑污染跡象。你最好讓Maven產生一個WAR文件,然後檢查它的/WEB-INF/lib是否有任何不在那裏的庫(也就是應該由目標服務器提供的庫,比如Java EE,JSP,Servlet,JSF,等等。在你的情況下與JBoss AS)。然後相應地修復Maven pom.xml以標記爲provided

您得到的特定建議是重複的javax.servlet.jsp.* API。您在/WEB-INF/lib中最有可能有jsp-api.jar或覆蓋此的其他JAR(例如javaee.jar)。在這種情況下,您需要將pom.xml中的依存關係標記爲provided。或者,如果它實際上jsp-api,那麼就乾脆刪除它,使用單個javaee-apijavaee-web-api依賴與6.0版本和範圍provided覆蓋整個Java EE 6(網絡配置文件)已經,完全按照JBoss應用服務器7

完成
相關問題