GUJ Discussões   :   últimos tópicos   |   categorias   |   GUJ Respostas

Erro ao fazer deploy de arquivo WAR no WildFly 8

java
server
servidor
web
webservice
Tags: #<Tag:0x00007f31113c77f8> #<Tag:0x00007f31113c7640> #<Tag:0x00007f31113c74b0> #<Tag:0x00007f31113c7230> #<Tag:0x00007f31113c6f60>

#1

Senhores, preciso fazer deploy de uma aplicação WAR no Wildfly 8.0.0-final. Porém, o servidor apresenta erro quase no fim do processo. Vi que a stack menciona algo relacionado a concorrência, mas não identifiquei onde exatamente. Parece ser algo relacionado ao Axis.Poderiam me dar uma luz, por favor?

17:22:17,475 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.undertow.deployment.defau
lt-server.default-host./openxds-web: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host.
/openxds-web: Failed to start service
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.0.Final.jar:1.2.0.Fina
l]
        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.NoClassDefFoundError: org/apache/axiom/om/OMMetaFactory
        at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_80]
        at java.lang.Class.forName(Class.java:195) [rt.jar:1.7.0_80]
        at org.apache.axiom.om.OMAbstractFactory.getOMFactory(OMAbstractFactory.java:107)
        at org.apache.axis2.description.AxisDescription.<init>(AxisDescription.java:72)
        at org.apache.axis2.engine.AxisConfiguration.<init>(AxisConfiguration.java:172)
        at org.apache.axis2.deployment.DeploymentEngine.populateAxisConfiguration(DeploymentEngine.java:855)
        at org.apache.axis2.deployment.WarBasedAxisConfigurator.<init>(WarBasedAxisConfigurator.java:156)
        at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
        at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
        at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:208)
        at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:116)
        at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:496)
        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1
.2.0.Final]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Fina
l]
        ... 3 more
Caused by: java.lang.ClassNotFoundException: org.apache.axiom.om.OMMetaFactory from [Module "deployment.openxds-web.war:main" from Service 
Module Loader]
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final
]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final]
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final]
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final]
        ... 19 more

17:22:17,504 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - addres
s: ([("deployment" => "openxds-web.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-ser
ver.default-host./openxds-web" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./o
penxds-web: Failed to start service
    Caused by: java.lang.NoClassDefFoundError: org/apache/axiom/om/OMMetaFactory
    Caused by: java.lang.ClassNotFoundException: org.apache.axiom.om.OMMetaFactory from [Module \"deployment.openxds-web.war:main\" from Se
rvice Module Loader]"}}

#2

Pelo erro, está faltando essa classe: org/apache/axiom/om/OMMetaFactory no classpath.


#3

Vi isso tb. Atualmente meu projeto tem as libs do axis2, axis2-kernel e axis2-transport-http.
Tem alguma ideia de qual dependência essa classe vem?


#4

Talvez esteja faltando essa: https://ws.apache.org/axiom/download.html

Você está usando maven?


#5

Estou usando Maven, sim.


#6

Tenta usar essa dependência então:

<!-- https://mvnrepository.com/artifact/org.apache.ws.commons.axiom/axiom-api -->
<dependency>
    <groupId>org.apache.ws.commons.axiom</groupId>
    <artifactId>axiom-api</artifactId>
    <version>1.2.20</version>
</dependency>

#7

Já tinha ela aqui no projeto, mas continha algumas exclusions. Removi as exclusões e tb adicionei a axiom-impl. Vou testar e posto o resultado.

Valeu


#8

O erro mudou agora! Bom sinal!!! A exception da vez é um NoSuchMethodError.
Será que pode ser versão?

10:08:20,829 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.undertow.deployment.defau
lt-server.default-host./openxds-web: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host.
/openxds-web: Failed to start service
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.0.Final.jar:1.2.0.Fina
l]
        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.NoSuchMethodError: org.apache.axis2.deployment.util.Utils.createClassLoader(Ljava/util/ArrayList;Ljava/lang/ClassLoade
r;ZLjava/io/File;)Ljava/lang/ClassLoader;
        at org.apache.axis2.jaxws.framework.JAXWSDeployer.deployServicesInWARClassPath(JAXWSDeployer.java:100)
        at org.apache.axis2.jaxws.framework.JAXWSDeployer.init(JAXWSDeployer.java:80)
        at org.apache.axis2.deployment.DeploymentEngine.initializeDeployers(DeploymentEngine.java:1168)
        at org.apache.axis2.deployment.DeploymentEngine.setConfigContext(DeploymentEngine.java:1157)
        at org.apache.axis2.deployment.WarBasedAxisConfigurator.setConfigContext(WarBasedAxisConfigurator.java:349)
        at org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:89)
        at org.apache.axis2.transport.http.AxisServlet.initConfigContext(AxisServlet.java:584)
        at org.apache.axis2.transport.http.AxisServlet.init(AxisServlet.java:454)
        at io.undertow.servlet.core.ManagedServlet$DefaultInstanceStrategy.start(ManagedServlet.java:208)
        at io.undertow.servlet.core.ManagedServlet.createServlet(ManagedServlet.java:116)
        at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:496)
        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1
.2.0.Final]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Fina
l]
        ... 3 more

10:08:20,878 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - addres
s: ([("deployment" => "openxds-web.war")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-ser
ver.default-host./openxds-web" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./o
penxds-web: Failed to start service
    Caused by: java.lang.NoSuchMethodError: org.apache.axis2.deployment.util.Utils.createClassLoader(Ljava/util/ArrayList;Ljava/lang/ClassL
oader;ZLjava/io/File;)Ljava/lang/ClassLoader;"}}

#9

Provavelmente sim. Qual a versão do Axis que você está usando?


#10

O problema do método de fato era a versão. Fiz o downgrade pra 1.2.8.
Agora pipocou outro noclassdeffound.

org.apache.axiom.om.OMXMLBuilderFactory


#11

1.4.1 - axis
1.6.2 - axis-kernel
1.6.2 - axis2-transport-http


#12

Fazendo downgrade das libs do Axiom pra 1.2.5.