简体   繁体   English

问题一旦将jsf 1.2迁移到jsf 2.2.12

[英]Problems once migrate jsf 1.2 to jsf 2.2.12

I am migrating project from jsf 1.2 to jsf 2.2.12. 我正在将项目从jsf 1.2迁移到jsf 2.2.12。 After built successful, I deployed to the jboss 7 server and got error message like that: 构建成功后,我部署到jboss 7服务器,并收到如下错误消息:

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\""}}

Could you have any idea for this one? 您对此有任何想法吗?

Here are my system detail: Server: jboss7 Current libs: jsf 1.2, richfaces 3.3.3 Migration libs: jsf 2.2.17 Build: maven 这是我的系统详细信息:服务器:jboss7当前库:jsf 1.2,richfaces 3.3.3迁移库:jsf 2.2.17构建:maven

Best regards, 最好的祝福,

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;" 由以下原因导致:java.lang.LinkageError:接口可迭代初始化中的加载程序约束违规:当解析方法“ 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; 当前类org / richfaces / taglib / ColumnsTag的类加载器(org / jboss / modules / ModuleClassLoader的实例)和接口javax / servlet / jsp /的类加载器(org / jboss / modules / ModuleClassLoader的实例) tagext / Tag对于ervlet / jsp / tagext / Tag类型具有不同的Class对象; used in the signature 用于签名

java.lang.LinkageError is sign of classpath pollution with multiple different versioned libraries. java.lang.LinkageError是带有多个不同版本库的类路径污染的标志。 You'd best let Maven produce a WAR file and then inspect its /WEB-INF/lib for any libraries which doesn't belong there (ie libraries which are supposed to be already provided by the target server, such as Java EE, JSP, Servlet, JSF, etc.. in your case with JBoss AS). 您最好让Maven生成WAR文件,然后检查其/WEB-INF/lib中是否存在不属于该文件的任何库(即,目标服务器已经提供的库,例如Java EE,JSP ,Servlet,JSF等)。 Then fix the Maven pom.xml accordingly to mark exactly those as provided . 然后相应地修复Maven pom.xml ,以准确标记provided

The particular one you got suggests a duplicated javax.servlet.jsp.* API. 您获得的特定建议建议使用重复的javax.servlet.jsp.* API。 You'll in /WEB-INF/lib most likely have a jsp-api.jar or another JAR which covers this (eg javaee.jar ). 您将在/WEB-INF/lib很可能有一个jsp-api.jar或另一个涵盖此内容的JAR(例如javaee.jar )。 In that case, you need to mark exactly that dependency in pom.xml as provided . 在这种情况下,您需要按provided那样在pom.xml准确标记该依赖项。 Or, if it's actually jsp-api , then just remove it altogether and use a single javaee-api or javaee-web-api dependency with version 6.0 and scope provided which covers the entire Java EE 6 (Web profile) already, exactly as done by JBoss AS 7. 或者,如果它实际上是jsp-api ,则将其完全删除,并使用具有版本6.0和所provided范围的单个javaee-apijavaee-web-api依赖项,它已经完全覆盖了整个Java EE 6(Web配置文件)由JBoss AS 7。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM