How is inter module dependencies achieved in wildfly swarm - wildfly

How is inter module dependencies achieved in wildfly swarm?
For example, I have a module with these contents:
<module xmlns="urn:jboss:module:1.3" name="com.obbi.domain.security">
<resources>
<artifact name="com.obbi.domain.platform:domain-service-security-jboss:2.0.86"/>
<artifact name="com.obbi.domain.platform:domain-service-security-client:2.0.86"/>
</resources>
<dependencies>
<module name="org.jboss.as.web"/>
<module name="org.jboss.logging"/>
<module name="org.picketbox"/>
<module name="javax.api"/>
<module name="javax.security.auth.message.api"/>
<module name="javax.servlet.api"/>
</dependencies>
</module>
At runtime, when I try to access my application, it fails because it can't find the dependencies specified in the module.
2017-07-05 16:58:50,312 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /Test/rest/Ping: java.lang.NoClassDefFoundError: org/jose4j/json/internal/json_simple/parser/ParseException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
at java.lang.Class.getConstructor0(Class.java:3075)
at java.lang.Class.getConstructor(Class.java:1825)
at org.jboss.security.auth.message.config.JBossServerAuthConfig.createSAM(JBossServerAuthConfig.java:244)
at org.jboss.security.auth.message.config.JBossServerAuthConfig.getAuthContext(JBossServerAuthConfig.java:178)
at org.jboss.security.plugins.auth.JASPIServerAuthenticationManager.secureResponse(JASPIServerAuthenticationManager.java:158)
at org.wildfly.extension.undertow.security.jaspi.JASPICSecureResponseHandler.handleRequest(JASPICSecureResponseHandler.java:35)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.api.LegacyThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:211)
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:809)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.jose4j.json.internal.json_simple.parser.ParseException from [Module "com.obbi.domain.security:main" from BootModuleLoader#752325ad for finders [BootstrapClasspathModuleFinder, BootstrapModuleFinder(org.wildfly.swarm.bootstrap:main), ClasspathModuleFinder, ContainerModuleFinder(swarm.container:main), ApplicationModuleFinder(swarm.application:main), org.wildfly.swarm.bootstrap.modules.DynamicModuleFinder#279fedbd]]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93)
... 28 more
I have tried copying the dependencies modules from the normal wildfly modules directory into the wildfly swarm resources, but the issue persists.
So how are these dependencies within the module configured?
Regards

I had to include
<artifact name="org.bitbucket.b_c:jose4j:0.5.0"/>
in my module.xml, as well as
<dependency>
<groupId>org.bitbucket.b_c</groupId>
<artifactId>jose4j</artifactId>
<version>0.5.0</version>
</dependency>
in my POM.
The issue had nothing to do with inter module dependencies

Related

REST jersey json NoSuchFieldError: WADL and IllegalStateException

I'm trying to build a WebApplication with REST Web Services and successfully fought some troubles already. But i couldn't solve this one so far.
I'm using a TomCat v7.0 localhost and try to access a simple #GET Resource. But when i click on the Resource, the following Errors appear:
A MultiException has 2 exceptions. They are:
1. java.lang.NoSuchFieldError: WADL
2. java.lang.IllegalStateException: Unable to perform operation: create on org.glassfish.jersey.server.wadl.processor.WadlModelProcessor
I was searching stackoverflow and found a question with a maybe identical problem, but no solution (asked in April 2016)
I started this project as Maven project in eclipse neon.
Here are some files:
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!-- This web.xml file is not required when using Servlet 3.0 container,
see implementation details http://jersey.java.net/nonav/documentation/latest/jax-rs.html -->
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>Jersey Web Application</servlet-name>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>org.project.projecttest</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-value>data.controller</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Jersey Web Application</servlet-name>
<url-pattern>/resource/*</url-pattern>
</servlet-mapping>
</web-app>
pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.project</groupId>
<artifactId>projecttest</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>projecttest</name>
<build>
<finalName>projecttest</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<inherited>true</inherited>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>central</id>
<name>Central Repository</name>
<url>http://repo2.maven.org/maven2/</url>
<layout>default</layout>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey</groupId>
<artifactId>jersey-bom</artifactId>
<version>${jersey.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<!-- use the following artifactId if you don't need servlet 2.x compatibility -->
<!-- artifactId>jersey-container-servlet</artifactId -->
</dependency>
<!-- uncomment this to get JSON support-->
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-moxy</artifactId>
</dependency>
<!-- -->
</dependencies>
<properties>
<jersey.version>2.16</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
</project>
simple REST Test class:
package data.controller;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.Response;
#Path("/test")
public class RESTTest {
#GET
public Response getString() {
return Response.status(200).entity("getString is called").build();
}
}
and finally the stack trace:
HTTP Status 500 - Servlet.init() for servlet Jersey Web Application threw exception
type Exception report
message Servlet.init() for servlet Jersey Web Application threw exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet Jersey Web Application threw exception
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1083)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)
root cause A MultiException has 2 exceptions. They are:
1. java.lang.NoSuchFieldError: WADL
2. java.lang.IllegalStateException: Unable to perform operation: create on org.glassfish.jersey.server.wadl.processor.WadlModelProcessor
org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:394)
org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:114)
org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:102)
org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
java.util.concurrent.FutureTask.run(Unknown Source)
org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:153)
org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2151)
org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
org.glassfish.jersey.internal.inject.Providers.getAllRankedProviders(Providers.java:245)
org.glassfish.jersey.server.ApplicationHandler.processResourceModel(ApplicationHandler.java:704)
org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:457)
org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:163)
org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:323)
org.glassfish.jersey.internal.Errors$2.call(Errors.java:289)
org.glassfish.jersey.internal.Errors$2.call(Errors.java:286)
org.glassfish.jersey.internal.Errors.process(Errors.java:315)
org.glassfish.jersey.internal.Errors.process(Errors.java:297)
org.glassfish.jersey.internal.Errors.processWithException(Errors.java:286)
org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:320)
org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:285)
org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:310)
org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:170)
org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:358)
javax.servlet.GenericServlet.init(GenericServlet.java:158)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1083)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)
root cause java.lang.NoSuchFieldError: WADL org.glassfish.jersey.server.wadl.processor.WadlModelProcessor.<init>(WadlModelProcessor.java:96)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java.lang.reflect.Constructor.newInstance(Unknown Source)
org.glassfish.hk2.utilities.reflection.ReflectionHelper.makeMe(ReflectionHelper.java:1104)
org.jvnet.hk2.internal.ClazzCreator.createMe(ClazzCreator.java:274)
org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:368)
org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:456)
org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:114)
org.jvnet.hk2.internal.SingletonContext$1.compute(SingletonContext.java:102)
org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture$1.call(Cache.java:97)
java.util.concurrent.FutureTask.run(Unknown Source)
org.glassfish.hk2.utilities.cache.Cache$OriginThreadAwareFuture.run(Cache.java:154)
org.glassfish.hk2.utilities.cache.Cache.compute(Cache.java:199)
org.jvnet.hk2.internal.SingletonContext.findOrCreate(SingletonContext.java:153)
org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2151)
org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:98)
org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:87)
org.glassfish.jersey.internal.inject.Providers.getAllRankedProviders(Providers.java:245)
org.glassfish.jersey.server.ApplicationHandler.processResourceModel(ApplicationHandler.java:704)
org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:457)
org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:163)
org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:323)
org.glassfish.jersey.internal.Errors$2.call(Errors.java:289)
org.glassfish.jersey.internal.Errors$2.call(Errors.java:286)
org.glassfish.jersey.internal.Errors.process(Errors.java:315)
org.glassfish.jersey.internal.Errors.process(Errors.java:297)
org.glassfish.jersey.internal.Errors.processWithException(Errors.java:286)
org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:320)
org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:285)
org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:310)
org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:170)
org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:358)
javax.servlet.GenericServlet.init(GenericServlet.java:158)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442)
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1083)
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640)
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
java.lang.Thread.run(Unknown Source)
my Libs:
referenced libraries
WEB-INF lib-folder
I think the problem might be caused by some libs, but I'm not sure and several changes didnt fix this problem.
I'm thankful for each answer. If i forgot something, feel free to ask.
Thank you
If you are using IntelliJ IDE, Search for WadlModelProcessor class, you will see which library has this class. In this case, it will be more than one library.
You need to exclude one of the library which is the culprit from your pom.
In my case, it was jaxrs-ri - 2.11 jar - I excluded this
I think you have miss the #RequestMapping annotation
e.g.
#RequestMapping(value="/methodName", method=RequestMethod.GET)
public Response getString() {
return Response.status(200).entity("getString is called").build();
}

"Could not find default constructor" error during webapp deployment in WildFly 8.2

I am deploying a Spring 3.2.9 based web app within WildFly 8.2.0 using the following runtime descriptor
<jboss-deployment-structure>
<deployment>
<exclude-subsystems>
<subsystem name="jaxrs" />
<subsystem name="weld" />
</exclude-subsystems>
<exclusions>
<module name="org.apache.commons.logging" />
<module name="org.apache.log4j" />
<module name="org.hibernate"/>
<module name="org.jboss.logging.jul-to-slf4j-stub" />
<module name="org.jboss.logmanager" />
<module name="org.jboss.logmanager.log4j" />
<module name="org.slf4j" />
<module name="org.slf4j.impl"/>
</exclusions>
<dependencies>
<module name="org.javassist"/>
<module name="org.antlr"/>
<module name="org.jboss.jboss-transaction-spi"/>
<module name="org.jboss.marshalling"/>
<module name="org.jboss.marshalling.river"/>
<module name="org.dom4j"/>
<module name="org.scannotation.scannotation"/>
<module name="org.mariadb"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
My expectation was that Spring instead of Weld (the default with WildFly) will be used as the DI engine
However when deploying our webapp, I am hitting the following error
The JobGridLiveListServiceImpl class has a single constructor that receives another bean via injection
2016-02-18 12:27:49,040 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."dfm-app.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."dfm-app.war".INSTALL: JBAS018733: Failed to process phase INSTALL of deployment "dfm-app.war" at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166)
[wildfly-server-8.2.0.Final.jar:8.2.0.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
[jboss-msc-1.2.2.Final.jar:1.2.2.Final]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[rt.jar:1.8.0_51]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[rt.jar:1.8.0_51]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51] Caused by:
org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS011030: Could not configure component com.netapp.dfm.webui.server.job.JobGridLiveListServiceImpl
at
org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:95)
at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159)
[wildfly-server-8.2.0.Final.jar:8.2.0.Final]
... 5 more
Caused by:
org.jboss.as.server.deployment.DeploymentUnitProcessingException:
JBAS011054: Could not find default constructor for class com.netapp.dfm.webui.server.job.JobGridLiveListServiceImpl
at
org.jboss.as.ee.component.DefaultInterceptorConfigurator.configure(DefaultInterceptorConfigurator.java:92)
at
org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
... 6 more
The same code was works fine on Jboss AS 6.1.
Any inputs on the probable reasons this exception is thrown?
I faced the same error on JBOSS EAP 7, in order to resolve I added a default constructor without parameters in the mentioned class, however this is only possible when the issue occurs for a cusom jar or external dependency which has been developed by us.

Jboss EAP 6.3 class loading issue

While migrating the application from JBOSS EAP 5.2.1 to JBOSS EAP 6.3.0, I am receiving the following linkage error.
ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/txo/amaster]] (ServerService Thread Pool -- 60) JBWEB000287: Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener: java.lang.LinkageError: loader constraint violation: when resolving method "org.dom4j.io.SAXReader.setEntityResolver(Lorg/xml/sax/EntityResolver;)V" the class loader (instance of org/jboss/modules/ModuleClassLoader) of the current class, org/jboss/seam/util/XML, and the class loader (instance of org/jboss/modules/ModuleClassLoader) for resolved class, org/dom4j/io/SAXReader, have different Class objects for the type setEntityResolver used in the signature
at org.jboss.seam.util.XML.getRootElement(XML.java:22) [jboss-seam-2.1.1.GA.jar:2.1.1.GA]
at org.jboss.seam.init.Initialization.initComponentsFromXmlDocument(Initialization.java:227) [jboss-seam-2.1.1.GA.jar:2.1.1.GA]
at org.jboss.seam.init.Initialization.create(Initialization.java:134) [jboss-seam-2.1.1.GA.jar:2.1.1.GA]
at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:35) [jboss-seam-2.1.1.GA.jar:2.1.1.GA]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3339) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3777) [jbossweb-7.4.8.Final-redhat-4.jar:7.4.8.Final-redhat-4]
at org.jboss.as.web.deployment.WebDeploymentService.doStart(WebDeploymentService.java:161) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.deployment.WebDeploymentService.access$000(WebDeploymentService.java:59) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at org.jboss.as.web.deployment.WebDeploymentService$1.run(WebDeploymentService.java:94) [jboss-as-web-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_11]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_11]
at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_11]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_11]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_11]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Can you please guide me to fix those errors?
I have fixed the issue. In the dom4j module.xml I have changed the order of the dependencies also provided export="true"
<module xmlns="urn:jboss:module:1.1" name="org.dom4j">
<properties>
<property name="jboss.api" value="unsupported"/>
</properties>
<resources>
<resource-root path="dom4j-1.6.1.redhat-6.jar"/>
</resources>
<dependencies>
<module name="com.sun.xml.bind"/>
<module name="javax.xml.bind.api"/>
<module name="org.jaxen"/>
<module name="javax.api" export="true"/> <!-- This one always goes last. -->
</dependencies>
</module>

Maven: java.lang.ClassNotFoundException on Jboss

Firstable sorry for my English, I have a Maven Project which is a Web Service (packaged into a war file)
I use this pom:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>ec.gob.turismo</groupId>
<artifactId>mintur-bpm</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>mintur-bpm</name>
<description>Servicio Web que interactúa con los procesos del negocio</description>
<properties>
<jbpm.version>6.0.1.Final</jbpm.version>
</properties>
<build>
<sourceDirectory>src/main/java</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.jboss.as.plugins</groupId>
<artifactId>jboss-as-maven-plugin</artifactId>
<version>7.5.Final</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>ec.gob.turismo.siete.establecimientos</groupId>
<artifactId>establecimientos-dto</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-core</artifactId>
<version>2.7.11</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>2.7.11</version>
</dependency>
<dependency>
<groupId>org.kie</groupId>
<artifactId>kie-api</artifactId>
<version>${jbpm.version}</version>
</dependency>
<dependency>
<groupId>org.kie.remote</groupId>
<artifactId>kie-services-client</artifactId>
<version>${jbpm.version}</version>
</dependency>
</dependencies>
</project>
I use JbossEAP 6.3, when I type mvn clean install, maven generates the war file and copy inside the standalone directory. Next when I see my console in my eclipse I see this error:
[DEBUG] Executing deployment
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18.643s
[INFO] Finished at: Thu Oct 02 16:49:19 COT 2014
[INFO] Final Memory: 29M/358M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:deploy (default) on project mintur-bpm: Deployment failed and was rolled back. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jboss.as.plugins:jboss-as-maven-plugin:7.5.Final:deploy (default) on project mintur-bpm: Deployment failed and was rolled back.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.jboss.as.plugin.common.DeploymentExecutionException: Deployment failed and was rolled back.
at org.jboss.as.plugin.deployment.standalone.StandaloneDeployment.execute(StandaloneDeployment.java:180)
at org.jboss.as.plugin.deployment.AbstractDeployment.executeDeployment(AbstractDeployment.java:121)
at org.jboss.as.plugin.deployment.AbstractDeployment.doExecute(AbstractDeployment.java:146)
at org.jboss.as.plugin.deployment.AbstractAppDeployment.doExecute(AbstractAppDeployment.java:70)
at org.jboss.as.plugin.deployment.AbstractDeployment.execute(AbstractDeployment.java:111)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Finally in Jboss log (server.log), I see this stack trace:
16:49:17,770 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."mintur-bpm-0.0.1-SNAPSHOT.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."mintur-bpm-0.0.1-SNAPSHOT.war".INSTALL: JBAS018733: Error al procesar la fase INSTALL de deployment "mintur-bpm-0.0.1-SNAPSHOT.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: ec.gob.turismo.siete.serviciosweb.bmp.BusinessProcessManagement from [Module "deployment.mintur-bpm-0.0.1-SNAPSHOT.war:main" from Service Module Loader]
at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.createDDEndpoint(MetadataBuilder.java:241)
at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.build(MetadataBuilder.java:82)
at org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect.generateMetadataFromDeployment(DescriptorDeploymentAspect.java:135)
at org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect.start(DescriptorDeploymentAspect.java:68)
at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
... 5 more
Caused by: java.lang.ClassNotFoundException: ec.gob.turismo.siete.serviciosweb.bmp.BusinessProcessManagement from [Module "deployment.mintur-bpm-0.0.1-SNAPSHOT.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final-redhat-2]
at org.jboss.wsf.stack.cxf.metadata.MetadataBuilder.createDDEndpoint(MetadataBuilder.java:237)
... 10 more
16:49:17,781 ERROR [org.jboss.as.server] (management-handler-thread - 29) JBAS015870: La implementaci▒n de "mintur-bpm-0.0.1-SNAPSHOT.war" se deshizo con el siguiente mensaje de fallo:
{"JBAS014671: Servicios fallidos" => {"jboss.deployment.unit.\"mintur-bpm-0.0.1-SNAPSHOT.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"mintur-bpm-0.0.1-SNAPSHOT.war\".INSTALL: JBAS018733: Error al procesar la fase INSTALL de deployment \"mintur-bpm-0.0.1-SNAPSHOT.war\"
Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: ec.gob.turismo.siete.serviciosweb.bmp.BusinessProcessManagement from [Module \"deployment.mintur-bpm-0.0.1-SNAPSHOT.war:main\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: ec.gob.turismo.siete.serviciosweb.bmp.BusinessProcessManagement from [Module \"deployment.mintur-bpm-0.0.1-SNAPSHOT.war:main\" from Service Module Loader]"}}
16:49:19,100 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Se detuvo la implementaci▒nmintur-bpm-0.0.1-SNAPSHOT.war (runtime-name: mintur-bpm-0.0.1-SNAPSHOT.war) en 1317ms
The error above says that a Class is not found in my war file, which is incorrect because I have opened many times the war file and there are all the classes inside.
Could you help me please, because I can't find a solution?
Thanks.
PD: If you need more information, please let me know.
It was my fault, this package does not exist in my war file, that's why the error:
ec.gob.turismo.siete.serviciosweb.bmp.BusinessProcessManagement
The correct package is:
ec.gob.turismo.serviciosweb.bmp.BusinessProcessManagement
Aditional I have placed a web.xml file that makes references to the class that implements the BusinessProcessManagement interface.
Thanks.

Problems creating jms bridge in wildfly8

Im trying to create a jms bridge from WildFly 8 to openmq. Every example i tried did not work. Can someone help me. I never have created a jms bridge before.
The jms-bridge entry in my standalone-full.xml
<source>
<connection-factory name="jms/ConnectionFactory"/>
<destination name="jms/TestQueue"/>
<context>
<property key="java.naming.factory.initial" value="com.sun.enterprise.naming.SerialInitContextFactory"/>
<property key="java.naming.provider.url" value="mq://localhost:7676"/>
</context>
</source>
<target>
<connection-factory name="jmsConnectionFactory"/>
<destination name="/"jms/TestQueue"/>
</target>
<quality-of-service>AT_MOST_ONCE</quality-of-service>
<failure-retry-interval>500</failure-retry-interval>
<max-retries>1</max-retries>
<max-batch-size>500</max-batch-size>
<max-batch-time>500</max-batch-time>
<add-messageID-in-header>true</add-messageID-in-header>
</jms-bridge>
I created a module from imqjmsra.rar.
The module.xml
<resource-root path="fscontext.jar"/>
<resource-root path="imqbroker.jar"/>
<resource-root path="imqjmsbridge.jar"/>
<resource-root path="imqjmsra.jar"/>
<resource-root path="imqjmx.jar"/>
<resource-root path="imqstomp.jar"/>
<!-- add the dependencies required by JMS Bridge code -->
<module name="javax.api" />
<module name="javax.jms.api" />
<module name="javax.transaction.api"/>
<module name="javax.resource.api"/>
The error that i get is
2014-04-04 14:36:04,846 WARN [org.hornetq.jms.server] (pool-3-thread-1) HQ122010: Failed to connect JMS Bridge: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory com.sun.enterprise.naming.SerialInitContextFactory from classloader ModuleClassLoader for Module "org.glassfish:main" from local module loader #6b573f80 (finder: local module finder #2d0a238e (roots: C:\Installs\JBoss\wildfly-8.0.0.Final\modules,C:\Installs\JBoss\wildfly-8.0.0.Final\modules\system\layers\base)) [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory from [Module "org.glassfish:main" from local module loader #6b573f80 (finder: local module finder #2d0a238e (roots: C:\Installs\JBoss\wildfly-8.0.0.Final\modules,C:\Installs\JBoss\wildfly-8.0.0.Final\modules\system\layers\base))]]
at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:116)
at org.jboss.as.naming.InitialContext.init(InitialContext.java:99)
at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:153) [rt.jar:1.7.0_45]
at org.jboss.as.naming.InitialContext.<init>(InitialContext.java:90)
at org.jboss.as.naming.InitialContextFactory.getInitialContext(InitialContextFactory.java:44)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684) [rt.jar:1.7.0_45]
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307) [rt.jar:1.7.0_45]
at javax.naming.InitialContext.init(InitialContext.java:242) [rt.jar:1.7.0_45]
at javax.naming.InitialContext.<init>(InitialContext.java:216) [rt.jar:1.7.0_45]
at org.hornetq.jms.bridge.impl.JNDIFactorySupport.createObject(JNDIFactorySupport.java:53)
at org.hornetq.jms.bridge.impl.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:38)
at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1217)
at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjectsWithRetry(JMSBridgeImpl.java:1457)
at org.hornetq.jms.bridge.impl.JMSBridgeImpl.access$2000(JMSBridgeImpl.java:76)
at org.hornetq.jms.bridge.impl.JMSBridgeImpl$FailureHandler.run(JMSBridgeImpl.java:2046)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
I figured it out. I needed to change module.xml file to
<module xmlns="urn:jboss:module:1.0" name="org.glassfish">
<resources>
<resource-root path="glassfish-embedded-all-3.1.1.jar"/>
</resources>
<dependencies>
<system export="true">
<paths>
<path name="sun/corba"/>
</paths>
</system>
<module name="javax.api" />
<module name="javax.jms.api" />
<module name="javax.transaction.api"/>
<module name="javax.resource.api"/>
<module name="javax.rmi.api"/>
</dependencies>
</module>