I am using Wildfly webserver, and trying to implement Apache Shiro within Jakarta EE application, unfortunately I am getting this error:
16:49:36,189 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "testjee8-1.0-SNAPSHOT")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"testjee8-1.0-SNAPSHOT.war\".undertow-deployment.UndertowDeploymentInfoService" => "Failed to start service
Caused by: java.lang.NoClassDefFoundError: Failed to link org/apache/shiro/web/servlet/ShiroFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/AbstractShiroFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/OncePerRequestFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/NameableFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/AbstractFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): javax/servlet/Filter"}}
16:49:36,190 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "testjee8-1.0-SNAPSHOT")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"testjee8-1.0-SNAPSHOT.war\".undertow-deployment.UndertowDeploymentInfoService" => "Failed to start service
Caused by: java.lang.NoClassDefFoundError: Failed to link org/apache/shiro/web/servlet/ShiroFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/AbstractShiroFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/OncePerRequestFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/NameableFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/AbstractFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): javax/servlet/Filter"}}
16:49:36,190 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "testjee8-1.0-SNAPSHOT.war" was rolled back with the following failure message:
{"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"testjee8-1.0-SNAPSHOT.war\".undertow-deployment.UndertowDeploymentInfoService" => "Failed to start service
Caused by: java.lang.NoClassDefFoundError: Failed to link org/apache/shiro/web/servlet/ShiroFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/AbstractShiroFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/OncePerRequestFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/NameableFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/AbstractFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): javax/servlet/Filter"}}
16:49:36,214 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) WFLYSRV0028: Stopped deployment testjee8-1.0-SNAPSHOT (runtime-name: testjee8-1.0-SNAPSHOT.war) in 23ms
[2023-01-02 04:49:36,249] Artifact testjee8:war exploded: Error during artifact deployment. See server log for details.
[2023-01-02 04:49:36,250] Artifact testjee8:war exploded: java.lang.Exception: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"testjee8-1.0-SNAPSHOT.war\".undertow-deployment.UndertowDeploymentInfoService" => "Failed to start service
Caused by: java.lang.NoClassDefFoundError: Failed to link org/apache/shiro/web/servlet/ShiroFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/AbstractShiroFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/OncePerRequestFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/NameableFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): Failed to link org/apache/shiro/web/servlet/AbstractFilter (Module \"deployment.testjee8-1.0-SNAPSHOT.war\" from Service Module Loader): javax/servlet/Filter"}}
looks like the class is not found...
The following web.xml and shiro.ini (placed in WEB-INF) as follows:
web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="https://jakarta.ee/xml/ns/jakartaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_5_0.xsd"
version="5.0">
<context-param>
<param-name>shiroConfigLocations</param-name>
<param-value>/WEB-INF/shiro.ini</param-value>
</context-param>
<listener>
<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
</listener>
<filter>
<filter-name>ShiroFilter</filter-name>
<filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ShiroFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>ERROR</dispatcher>
</filter-mapping>
</web-app>
Shiro.ini:
[main]
[urls]
/** = noSessionCreation,authcJWT[permissive]
Forgot to add the pom.xml:
...
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-web</artifactId>
<version>1.10.0</version>
</dependency>
...
Please help me how to address this issue!
Unfortunately, Apache Shiro is not compatible with Jarkarta namespace yet. According to Apache Shiro's [publication]: https://shiro.apache.org/blog/2022/06/30/jakarta-work.html, version 1.10.0 of Shiro was supposed to be shipped with jakarta but unfortunately as of this writing their latest version, being 1.10.1, does not come with the jakarta namespace yet.
Related
I'm trying to deploy an EJB project which uses Spark libraries to load to a trained ML model and then make a prediction from there.
When I try to deploy the project on my Wildfly server, it throws the error below.
I cannot figure out why it's throwing that ClassNotFoundException, there is a referenced jar in the project with that package inside:
Any thoughts on why this error is happening/how to fix it?
Error Message:
20:34:13,864 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."kmeans-ejb.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."kmeans-ejb.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "kmeans-ejb.jar"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:183)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class ec.spark.KMeansStateless with ClassLoader ModuleClassLoader for Module "deployment.kmeans-ejb.jar" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:78)
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:57)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:106)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:91)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
... 8 more
Caused by: java.lang.NoClassDefFoundError: org/apache/spark/api/java/function/Function
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getDeclaredFields(Class.java:1916)
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:72)
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
... 13 more
Caused by: java.lang.ClassNotFoundException: org.apache.spark.api.java.function.Function from [Module "deployment.kmeans-ejb.jar" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
... 18 more
20:34:13,866 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "kmeans-ejb.jar")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"kmeans-ejb.jar\".POST_MODULE" => "WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"kmeans-ejb.jar\"
Caused by: java.lang.RuntimeException: WFLYSRV0177: Error getting reflective information for class ec.spark.KMeansStateless with ClassLoader ModuleClassLoader for Module \"deployment.kmeans-ejb.jar\" from Service Module Loader
Caused by: java.lang.NoClassDefFoundError: org/apache/spark/api/java/function/Function
Caused by: java.lang.ClassNotFoundException: org.apache.spark.api.java.function.Function from [Module \"deployment.kmeans-ejb.jar\" from Service Module Loader]"}}
May be you are NOT bundled required jar in your war files. Extract your war files and see
I am currently learning the Java EE and wanted to follow a tutorial, who uses cargo tracker as an example.
I could import the maven project to the eclipse successfully and can build it with mvn clean install successfully.
At the end of the day, there is a war file in the target folder of the project but wildfly 10 could not start it.
In the readme of the project, I have read such a sentence and would like to issue it;
mvn -Pwildfly package cargo:run
however, in this case, maven gives the following error;
[ERROR] Failed to execute goal org.codehaus.cargo:cargo-maven2-plugin:1.4.14:run (default-cli) on project cargo-tracker: Execution default-cli of goal org.codehaus.cargo:cargo-maven2-plugin:1.4.14:run failed: Failed to create a GlassFish 4.x standalone configuration: GlassFish admin command with args (--interactive=false --user admin --passwordfile /home/laptop/Schreibtisch/cargo-tracker-ee-master/target/cargo/configurations/glassfish4x/password.properties create-domain --adminport 4848 --instanceport 8080 --domainproperties jms.port=7676:orb.listener.port=3700:orb.ssl.port=3820:http.ssl.port=8181:orb.mutualauth.port=3920:domain.jmxPort=8686:java.debugger.port=9009:osgi.shell.telnet.port=6666
--domaindir /home/laptop/Schreibtisch/cargo-tracker-ee-master/target/cargo/configurations/glassfish4x cargo-domain) failed: asadmin exited 1 -> [Help 1]
If you need more info, I can supply.
Edit
When I deploy the war file manually as K5 mentioned in this comment, I get the following error from wildfly;
19:18:36,042 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."cargo-tracker.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."cargo-tracker.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "cargo-tracker.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
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: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.ejb.default-resource-adapter-name-service not found
at org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:669)
at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.getDefaultResourceAdapterName(MessageDrivenComponentDescriptionFactory.java:274)
at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processMessageBeans(MessageDrivenComponentDescriptionFactory.java:154)
at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processAnnotations(MessageDrivenComponentDescriptionFactory.java:81)
at org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:57)
at org.jboss.as.ejb3.deployment.processors.AbstractDeploymentUnitProcessor.deploy(AbstractDeploymentUnitProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
19:18:36,050 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "cargo-tracker.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"cargo-tracker.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"cargo-tracker.war\".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment \"cargo-tracker.war\"
Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.ejb.default-resource-adapter-name-service not found"},
"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"cargo-tracker.war\".PARSE"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
19:18:36,080 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "cargo-tracker.war" (runtime-name : "cargo-tracker.war")
19:18:36,083 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."cargo-tracker.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."cargo-tracker.war".PARSE: WFLYSRV0153: Failed to process phase PARSE of deployment "cargo-tracker.war"
On the download page of the wildfly, there are several download options. It is possible that you have downloaded a version, which does not have the needed service for your application. In order to find if the problem is because of your wildfly version, download the Java EE7 Full & Web Distribution and see if something will change.
add dependency :
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.12.1.1</version>
<scope>test</scope>
</dependency>
update maven project and built it and recreate the jar file and try to deploy.
i work in maven project, I created a pom maven project and 2 maven module
A module for the business layer (Ejb) and the other for the web layer (war maven project)
my problem is when i run a simple servlet wildfly show me 404 - Not Found
this is my Console output
18:53:18,813 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./BanquePPWeb.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanquePPWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: test.Test1 from [Module "deployment.BanquePPWeb.war:main" from Service Module Loader]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:1079)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:284)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
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: test.Test1 from [Module "deployment.BanquePPWeb.war:main" from Service Module Loader]
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)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:723)
... 6 more
18:53:18,992 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 1) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "BanquePPWeb.war")]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./BanquePPWeb.UndertowDeploymentInfoService" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanquePPWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: test.Test1 from [Module \"deployment.BanquePPWeb.war:main\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: test.Test1 from [Module \"deployment.BanquePPWeb.war:main\" from Service Module Loader]"},
"WFLYCTL0412: Required services that are not installed:" => ["jboss.undertow.deployment.default-server.default-host./BanquePPWeb.UndertowDeploymentInfoService"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
18:53:19,056 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0010: Deployed "BanquePPWeb.war" (runtime-name : "BanquePPWeb.war")
18:53:19,057 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./BanquePPWeb.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanquePPWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: test.Test1 from [Module "deployment.BanquePPWeb.war:main" from Service Module Loader]
and this is my web.xml
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4" id="WebApp_ID">
<display-name>BanquePPWeb</display-name>
<servlet>
<description>
</description>
<display-name>Test1</display-name>
<servlet-name>Test1</servlet-name>
<servlet-class>test.Test1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Test1</servlet-name>
<url-pattern>/Test1</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
I am getting the below exception:
18:45:51,355 WARN [org.jboss.modules] (MSC service thread 1-3) Failed to define class org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider in Module "deployment.Sample.war:main" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link org/apache/cxf/ws/security/sts/provider/SecurityTokenServiceProvider (Module "deployment.Sample.war:main" from Service Module Loader): javax/xml/ws/Provider
Logs :
18:45:51,365 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."Sample.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."Sample.war".INSTALL: WFLYSRV0153: Failed to process phase INSTALL of deployment "Sample.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:154)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
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.NoClassDefFoundError: Failed to link org/apache/cxf/ws/security/sts/provider/SecurityTokenServiceProvider (Module "deployment.Sample.war:main" from Service Module Loader): javax/xml/ws/Provider
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:446)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:274)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:78)
at org.jboss.modules.Module.loadModuleClass(Module.java:606)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
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)
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.loadClassInfoSet(ServletContainerInitializerDeploymentProcessor.java:259)
at org.wildfly.extension.undertow.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:169)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
I found this resource helpful, when solving similar problem to the reported. https://developer.jboss.org/thread/268163
When I applied suggestion made by Reto Hodel (2017-03-07 09:56), that is, "Adding two module dependencies in the jboss-deployment-structure.xml: java.xml.ws.api (which actually contains the Provider interface) and javax.jws.api", the problem has fixed iself.
The error:
2016-04-12 12:32:04,399 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 62) HHH000230: Schema export complete
2016-04-12 12:32:04,753 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:870)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.start(UndertowDeploymentInfoService.java:242)
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.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_66]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_66]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_66]
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.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]
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.addListener(UndertowDeploymentInfoService.java:1145)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService.createServletConfig(UndertowDeploymentInfoService.java:734)
... 6 more
2016-04-12 12:32:05,109 INFO [org.jboss.weld.Bootstrap] (weld-worker-4) WELD-000119: Not generating any bean definitions from org.apache.struts2.tiles.StrutsTilesListener because of underlying class loading error: Type org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader] not found. If this is unexpected, enable DEBUG logging to see the full error.
2016-04-12 12:32:07,323 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation ("deploy") failed - address: ([("deployment" => "BanqueEE.ear")]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module \"deployment.BanqueEE.ear.BanqueEEWeb.war:main\" from Service Module Loader]
Caused by: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module \"deployment.BanqueEE.ear.BanqueEEWeb.war:main\" from Service Module Loader]"}}
2016-04-12 12:32:07,408 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) JBAS018559: Deployed "BanqueEE.ear" (runtime-name : "BanqueEE.ear")
2016-04-12 12:32:07,410 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./BanqueEEWeb.UndertowDeploymentInfoService: java.lang.ClassNotFoundException: org.apache.struts2.tiles.StrutsTilesListener from [Module "deployment.BanqueEE.ear.BanqueEEWeb.war:main" from Service Module Loader]
How to debug this error in Struts 2?
You have missed a library struts2-tiles-plugin-x.x.x.x.jar and probably their dependencies.
What you need is to add these libraries to the Deployment Assembly. It will help you to archive ear project and include dependencies that have equivalent manifest settings in their classpath.
If you want to know what is a Deployment Assembly you can read this article Eclipse : Java EE Module Dependencies is replaced by Web Deployment Assembly.
“Web Deployment Assembly“, which provide more powerful and flexible ways to configure the project packaging structure.
There's also a page that describes the process of linking external resources with the ear application: Web Application Development: Configuring Projects with External Resources.
Do you have some javaee api jar in your war ? Maybe a servlet.jar ? Please remove it, and check after that.