3 Replies Latest reply on Jun 23, 2014 2:48 PM by Jacob Israel

    Deploy war file in JBOSS EAP 6.2

    Luís Gonçalves Newbie

      Hi there,

       

      I've been trying to deploy a war file in JBOSS EAP 6.2 without success, having the following message:

       

      {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"foo.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"foo.war\".PARSE: JBAS018733: Failed to process phase PARSE of deployment \"foo.war\"

          Caused by: java.lang.IllegalArgumentException: JBAS015533: Web Service endpoint com.sun.xml.ws.tx.coord.v11.endpoint.RegistrationPortImpl with URL pattern /RegistrationService_V11 is

      already registered. Web service endpoint com.sun.xml.ws.tx.coord.v11.endpoint.RegistrationRequesterPortImpl is requesting the same URL pattern."}}

       

      After some research online I found out that JBOSS starts a web services service which then conflicts while deploying my war file.

       

      I found in this forum (Web Service endpoint already registered.) that by commenting the <extension module="org.jboss.as.webservices"/> in the standalone.xml solves the problem, but this is not a solution for me because there might be other applications deployed in the same JBOSS making use of those webservices.

      I cant also remove the web service related libraries from the application I'm deploying, because the idea is to use the same war file to deploy in other AS.

       

      So, anyone has any idea how can I solve this issue?

       

      Thanks in advance.

        • 1. Re: Deploy war file in JBOSS EAP 6.2
          Luís Gonçalves Newbie

          So, as described in here I should not include the Metro webservices-rt.jar embedded in my war file. Or in case I want that, I should disable the subsystem by adding the jboss-deployment-structure.xml to the WEB-INF folder of my web application. So I added that file with the following content:

           

          <?xml version="1.0" encoding="UTF-8"?>

               <jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">

                    <deployment>

                         <exclude-subsystems>

                              <subsystem name="webservices" />

                         </exclude-subsystems>

                    </deployment>

          </jboss-deployment-structure>

           

          By adding the file with the above content I was able to deploy my application, but when trying to consume one one of the services I get the following:

           

          Exception in thread "Thread-82" java.lang.LinkageError: Failed to link com/sun/xml/messaging/saaj/soap/impl/ElementImpl (Module "deployment.foo.war:main" from Service Module Loader)

                  at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:428)

                  at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)

                  at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)

                  at org.jboss.modules.Module.loadModuleClass(Module.java:548)

                  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189)

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)

                  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)

                  at java.lang.ClassLoader.defineClass1(Native Method)

                  at java.lang.ClassLoader.defineClass(ClassLoader.java:800)

                  at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345)

                  at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423)

                  at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)

                  at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)

                  at org.jboss.modules.Module.loadModuleClass(Module.java:548)

                  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189)

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)

                  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)

                  at java.lang.ClassLoader.defineClass1(Native Method)

                  at java.lang.ClassLoader.defineClass(ClassLoader.java:800)

                  at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345)

                  at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423)

                  at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261)

                  at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76)

                  at org.jboss.modules.Module.loadModuleClass(Module.java:548)

                  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:189)

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)

                  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)

                  at com.sun.xml.messaging.saaj.soap.ver1_2.SOAPFactory1_2Impl.createFault(SOAPFactory1_2Impl.java:80)

                  at com.sun.xml.ws.fault.SOAP12Fault.getProtocolException(SOAP12Fault.java:205)

                  at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:133)

                  at com.sun.xml.ws.client.sei.StubHandler.readResponse(StubHandler.java:253)

                  at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:181)

                  at com.sun.xml.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:258)

                  at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:117)

                  at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:91)

                  at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:154)

                  at com.sun.proxy.$Proxy71.addOrReplaceApplication(Unknown Source)

                  at com.test.gwtui.server.ifs.IfsConfigurationServiceProvider.createApplication(IfsConfigurationServiceProvider.java:65)

                  at com.test.gwtui.server.ifs.IfsWsConsumer.execute(IfsWsConsumer.java:66)

                  at com.test.gwtui.server.admin.session.IfsConfigureAction.run(IfsConfigureAction.java:132)

                  at java.lang.Thread.run(Thread.java:744)

          Caused by: java.lang.NoClassDefFoundError: com/sun/org/apache/xerces/internal/dom/ElementNSImpl

                  at java.lang.ClassLoader.defineClass1(Native Method)

                  at java.lang.ClassLoader.defineClass(ClassLoader.java:800)

                  at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:345)

                  at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:423)

                   ... 46 more

          Caused by: java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.ElementNSImpl from [Module "deployment.foo.war:main" from Service Module Loader]

                  at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197)

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443)

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431)

                  at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373)

                  at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118)

           

          Any clues? Did I forget to include something in the jboss-deployment-structure.xml file?

          • 2. Re: Deploy war file in JBOSS EAP 6.2
            Luís Gonçalves Newbie

            For those who might run into this problem, the solution is to include the following dependency in the jboss-deployment-structure.xml file (or added directly in the sun.jdk module present in <jboss_home>\modules\system\layers\base\sun\jdk\main\module.xml):

             

            <system>

               <paths>

                  <path name="com/sun/org/apache/xerces/internal/dom"/>

               </paths>

            </system>

             

            This is a class from rt.jar but apparently is not loaded by jboss.

            • 3. Re: Deploy war file in JBOSS EAP 6.2
              Jacob Israel Newbie

              Does not work for me. Same error.