2

I encountered ClassNotFoundException during deploying a war file to my jboss server. I think it is related to log4j since it returns "Deployment error processing SCI for JAR: log4j-web-2.2.jar" error. However, the web app works properly on apache tomcat on eclipse. I have no idea of how to solve it. Thank you in advance.

Log:

12:32:52,002 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."WarTest.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."WarTest.war".INSTALL: Failed to process phase INSTALL of deployment "WarTest.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_91]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_91]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_91]

Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Deployment error processing SCI for JAR: log4j-web-2.2.jar
at org.jboss.as.web.deployment.ServletContainerInitializerDeploymentProcessor.loadSci(ServletContainerInitializerDeploymentProcessor.java:186)
at org.jboss.as.web.deployment.ServletContainerInitializerDeploymentProcessor.deploy(ServletContainerInitializerDeploymentProcessor.java:121)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more

Caused by: java.lang.ClassNotFoundException: # from [Module "deployment.WarTest.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at org.jboss.as.web.deployment.ServletContainerInitializerDeploymentProcessor.loadSci(ServletContainerInitializerDeploymentProcessor.java:183)
... 7 more
2
  • Is there more to the stack trace? My guess is you're missing some log4j2 libraries. Commented Jan 25, 2016 at 19:09
  • 1
    @Code Eater encountered the same error on wildfly 8.2 for log4j-web 2.11 Commented Jun 7, 2019 at 10:55

2 Answers 2

1

From the log it looks like jboss needs a jar in your WAR's WEB-INF/lib - this is what it mean when it says java.lang.ClassNotFoundException: # from [Module "deployment.WarTest.war:main" from Service Module Loader]

There is a detailed discussion here: https://issues.apache.org/jira/browse/LOG4J2-890

Sign up to request clarification or add additional context in comments.

1 Comment

although it looks like this error is "ClassNotFoundException", it is due to the a comment in the ServletContainerInitializer in meta-inf/services directory of log4j-web jar
0

If you're using Jakarta EE 9 or 10, you'll have to upgrade your version of Wildfly to a version that supports Jakarta EE > 9. In my case, I had the stable release of version 26 that supported Jakarta EE 8, and not 9. So I upgraded to the beta version (version 27) of Wildfly that came with support for Jakarta EE >= 9 out of the box. If you can't find the war file, generate it using the maven command mvn -e -U clean install

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.