0 Replies Latest reply on Dec 22, 2015 5:07 AM by william lu

    java.lang.NoSuchMethodError: org.jboss.logging.Logger.getLoggerPlugin()Lorg/jboss/logging/LoggerPlugin

    william lu Newbie

      我在项目里面使用jboss-common-4.2.2.jar,但是jboss eap 启动项目时,由于自带的jboss-logging,导致我的项目里面调用的是jboss eap 的logging,但是自带的logging没有getLoggerPlugin,能怎么解决jar包冲突的问题。

      我尝试使用jboss-web.xml来解决,但是设置后,又报另外的错误,xml和错误如下图

      jboss-web.xml

       

      <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN" 

      "http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd"> 

      <jboss-web> 

       

          <!-- For load class independently --> 

          <class-loading java2ClassLoadingCompliance='true'> 

              <loader-repository> 

                  com.example:archive=unique-archive-name 

                  <loader-repository-config> 

                      java2ParentDelegaton=true 

                 </loader-repository-config> 

              </loader-repository> 

          </class-loading> 

      </jboss-web> 

       

       

      error:

      ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.deployment.unit."SuTengServer.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."SuTengServer.war".PARSE: JBAS018733: 处理 PARSE 的 deployment "SuTengServer.war" 阶段失败

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.5.Final-redhat-1.jar:1.1.5.Final-redhat-1]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_79]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_79]

        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018014: 解析 XML 描述符 "/D:/JavaTools/jboss-eap-6.4/standalone/deployments/SuTengServer.war/WEB-INF/jboss-web.xml" 的 [6,5] 失败

        at org.jboss.as.web.deployment.JBossWebParsingDeploymentProcessor.deploy(JBossWebParsingDeploymentProcessor.java:79)

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.5.0.Final-redhat-21.jar:7.5.0.Final-redhat-21]

        ... 5 more

      Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[6,5]

      Message: Unexpected element 'class-loading' encountered

        at org.jboss.metadata.parser.util.MetaDataElementParser.unexpectedElement(MetaDataElementParser.java:109)

        at org.jboss.metadata.parser.jbossweb.JBossWebMetaDataParser.parse(JBossWebMetaDataParser.java:210)

        at org.jboss.as.web.deployment.JBossWebParsingDeploymentProcessor.deploy(JBossWebParsingDeploymentProcessor.java:71)

        ... 6 more

       

       

      18:05:37,902 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014612: 操作("deploy") 失败 -- 地址:([("deployment" => "SuTengServer.war")])-- 失败操作:{"JBAS014671: 失败的服务" => {"jboss.deployment.unit.\"SuTengServer.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"SuTengServer.war\".PARSE: JBAS018733: 处理 PARSE 的 deployment \"SuTengServer.war\" 阶段失败

          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018014: 解析 XML 描述符 \"/D:/JavaTools/jboss-eap-6.4/standalone/deployments/SuTengServer.war/WEB-INF/jboss-web.xml\" 的 [6,5] 失败

          Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[6,5]

      Message: Unexpected element 'class-loading' encountered"}}

      18:05:37,981 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 28) JBAS015859: 已部署的 "SuTengServer.war"(runtime-name: "SuTengServer.war")

      18:05:38,105 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: 服务状态报告

      JBAS014777: 启动失败的服务:      service jboss.deployment.unit."SuTengServer.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."SuTengServer.war".PARSE: JBAS018733: 处理 PARSE 的 deployment "SuTengServer.war" 阶段失败