I am having a problem with deploying my application on JBoss AS 7.1. Here is what happened, we have a project that has been build on JDK 1.4 currently running on JRun 4. We are migrating the project to JDK 1.7 and deploy on JBoss AS 7.1.1.
Made required changes to the project compile in eclipse using JDK 1.7 like "enum", changed implementation of Log4j, etc. However the current project heavily relies on jaxb ver 1.0 implementation (which we would make changes over a period of time to the latest jaxb version and convert the project to web services).
However when I try to deploy the same project in JBoss I get an error as below, any help to get this resolved would be really appreciated.
12:39:55,710 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "presto.war"
12:40:00,590 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) Class Path entry lib/xerces-1.2.3.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/presto.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
12:40:00,591 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) Class Path entry lib/xalan-2.0.0.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/presto.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
12:40:00,593 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) Class Path entry lib/xalanj1compat.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/presto.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
12:40:00,595 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) Class Path entry lib/batik.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/presto.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
12:40:00,596 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) Class Path entry lib/jimi-1.0.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/presto.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
12:40:00,598 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) Class Path entry lib/logkit-1.0b4.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/presto.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
12:40:00,599 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) Class Path entry lib/avalon-framework-4.0.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/presto.war/WEB-INF/lib/fop.jar" does not point to a valid jar for a Class-Path reference.
12:40:00,611 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) Class Path entry jaxp.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/presto.war/WEB-INF/lib/xalan.jar" does not point to a valid jar for a Class-Path reference.
12:40:00,612 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) Class Path entry crimson.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/presto.war/WEB-INF/lib/xalan.jar" does not point to a valid jar for a Class-Path reference.
12:40:00,617 WARN [org.jboss.as.server.deployment] (MSC service thread 1-5) Class Path entry sax.jar in "/C:/jboss-as-7.1.1.Final/standalone/deployments/presto.war/WEB-INF/lib/xt.jar" does not point to a valid jar for a Class-Path reference.
12:40:01,495 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."presto.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."presto.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "presto.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_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_51]
Caused by: java.lang.RuntimeException: Error getting reflective information for class org.apache.taglibs.xtags.xslt.XalanStyleTag with ClassLoader ModuleClassLoader for Module "deployment.presto.war:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
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.NoClassDefFoundError: Lorg/apache/xalan/xslt/XSLTResultTarget;
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_51]
at java.lang.Class.privateGetDeclaredFields(Class.java:2397) [rt.jar:1.7.0_51]
at java.lang.Class.getDeclaredFields(Class.java:1806) [rt.jar:1.7.0_51]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: org.apache.xalan.xslt.XSLTResultTarget from [Module "deployment.presto.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
... 15 more
From the error stack you can see that:
Caused by: java.lang.ClassNotFoundException: org.apache.xalan.xslt.XSLTResultTarget from [Module "deployment.presto.war:main" from Service Module Loader]
So the class jar file getting loaded is from default JBOSS Modules and clearly the xalan.jar that comes with the JBoss 7(jboss-as-7.1.1.Final\modules\org\apache\xalan\main) does not contain that that class:
You need to either start using the jar file that your application refers to by replacing it with this jar(which is not reccomended) or use jboss-deployment-structure.xml to do so. This link could help you to decide what works best for you
Related
I'm building an application using Wildfly Swarm 2018.5.0.
When I setup the application tests, every thing works fine in an "Hello World" application, but when I add it to my application with all dependencies, there is a lot of erros like: Unsatisfied dependencies for type LoggingFraction with qualifiers #Any
How the best approach to fix this errors and setup correctly my tests? This is an Wildfly Swarm bug? There is any way to make it work? Just for clarify I had updated to Thorntail 2.1.0.Final, and I have a similar problem with jandex dependency. Works in a "Hello World", but when I add some dependency I have errors.
For now I'm developing without test, and I do not like to do that! :(
2018-08-27 10:20:48,696 WARN [org.jboss.weld.Validator] (MSC service thread 1-2) WELD-001471: Interceptor method setupFactories defined on class org.wildfly.swarm.container.runtime.xmlconfig.StandaloneXMLParserProducer is not defined according to the specification. It should not throw java.lang.Exception, which is a checked exception.
at org.wildfly.swarm.container.runtime.xmlconfig.StandaloneXMLParserProducer.setupFactories(StandaloneXMLParserProducer.java:0)
StackTrace
2018-08-27 10:20:48,698 WARN [org.jboss.weld.Validator] (MSC service thread 1-2) WELD-001471: Interceptor method postConstruct defined on class org.wildfly.swarm.container.runtime.wildfly.ShrinkWrapFileSystem is not defined according to the specification. It should not throw java.io.IOException, which is a checked exception.
at org.wildfly.swarm.container.runtime.wildfly.ShrinkWrapFileSystem.postConstruct(ShrinkWrapFileSystem.java:0)
StackTrace
2018-08-27 10:20:48,730 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.unit."FirmwareTest.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."FirmwareTest.war".WeldStartService: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1978)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.jboss.weld.exceptions.DeploymentException: Exception List with 2 exceptions:
Exception 0 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type LoggingFraction with qualifiers #Any
at injection point [BackedAnnotatedField] #Inject #Any private org.wildfly.swarm.logging.runtime.EarlyLoggingCustomizer.fraction
at org.wildfly.swarm.logging.runtime.EarlyLoggingCustomizer.fraction(EarlyLoggingCustomizer.java:0)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:362)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:284)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:137)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:158)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:501)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:61)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:59)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Exception 1 :
org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type LoggingFraction with qualifiers #Any
at injection point [BackedAnnotatedField] #Inject #Any private org.wildfly.swarm.logging.runtime.LoggingCustomizer.fraction
at org.wildfly.swarm.logging.runtime.LoggingCustomizer.fraction(LoggingCustomizer.java:0)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:362)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:284)
at org.jboss.weld.bootstrap.Validator.validateGeneralBean(Validator.java:137)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:158)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:501)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:61)
at org.jboss.weld.bootstrap.ConcurrentValidator$1.doWork(ConcurrentValidator.java:59)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:62)
at org.jboss.weld.executor.IterativeWorkerTaskFactory$1.call(IterativeWorkerTaskFactory.java:55)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
at org.jboss.threads.JBossThread.run(JBossThread.java:320)
at org.jboss.weld.bootstrap.ConcurrentValidator.validateBeans(ConcurrentValidator.java:69)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:462)
at org.jboss.weld.bootstrap.WeldStartup.validateBeans(WeldStartup.java:477)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:90)
at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:96)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
... 3 more
The error is reproduced in this branch: https://github.com/vepo/microprofile-tutorial/tree/error
I have created two maven projects
A jar project to store remote interfaces. (project name: ejblib)
A Java EE 7 EJB module to implement the interfaces. (project name: ejb)
My setup works fine when deploying to glassfish 4 but won't work in WildFly.
Below is the stack trace.
10:39:05,473 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) WFLYSRV0027: Starting deployment of "service-1.0-SNAPSHOT.jar" (runtime-name: "service-1.0-SNAPSHOT.jar")
10:39:05,482 WARN [org.jboss.modules] (MSC service thread 1-8) Failed to define class me.chege.service.TestEjb in Module "deployment.service-1.0-SNAPSHOT.jar:main" from Service Module Loader: java.lang.NoClassDefFoundError: Failed to link me/chege/service/TestEjb (Module "deployment.service-1.0-SNAPSHOT.jar:main" from Service Module Loader): me/chege/service/TestEjbRemote
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 java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:21)
at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:14)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:84)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
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)
10:39:05,483 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC000001: Failed to start service jboss.deployment.unit."service-1.0-SNAPSHOT.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."service-1.0-SNAPSHOT.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "service-1.0-SNAPSHOT.jar"
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 me/chege/service/TestEjb (Module "deployment.service-1.0-SNAPSHOT.jar:main" from Service Module Loader): me/chege/service/TestEjbRemote
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 java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:21)
at org.jboss.as.ee.utils.ClassLoadingUtils.loadClass(ClassLoadingUtils.java:14)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:84)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:76)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
... 5 more
10:39:05,483 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) WFLYCTL0013: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {
"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"service-1.0-SNAPSHOT.jar\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"service-1.0-SNAPSHOT.jar\".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment \"service-1.0-SNAPSHOT.jar\"
Caused by: java.lang.NoClassDefFoundError: Failed to link me/chege/service/TestEjb (Module \"deployment.service-1.0-SNAPSHOT.jar:main\" from Service Module Loader): me/chege/service/TestEjbRemote"},
"WFLYCTL0412: Required services that are not installed:" => ["jboss.deployment.unit.\"service-1.0-SNAPSHOT.jar\".POST_MODULE"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => undefined
}
10:39:05,491 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) WFLYSRV0016: Replaced deployment "service-1.0-SNAPSHOT.jar" with deployment "service-1.0-SNAPSHOT.jar"
10:39:05,491 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) WFLYCTL0183: Service status report
WFLYCTL0186: Services which failed to start: service jboss.deployment.unit."ejb-1.0-SNAPSHOT.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ejb-1.0-SNAPSHOT.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "ejb-1.0-SNAPSHOT.jar"
service jboss.deployment.unit."service-1.0-SNAPSHOT.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."service-1.0-SNAPSHOT.jar".POST_MODULE: WFLYSRV0153: Failed to process phase POST_MODULE of deployment "service-1.0-SNAPSHOT.jar"
service jboss.deployment.unit."service-1.0-SNAPSHOT.jar".POST_MODULE
How should I fix this?
When i try to deploy war file in jboss 7 AS server i got following error
23:23:07,111 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."testapp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."testapp.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "testapp.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_95]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_95]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_95]
Caused by: java.lang.RuntimeException: Error getting reflective information for class fr.improve.struts.taglib.layout.LabelledTag with ClassLoader ModuleClassLoader for Module "deployment.testapp.war:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
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.NoClassDefFoundError: Lorg/apache/struts/util/MessageResources;
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_95]
at java.lang.Class.privateGetDeclaredFields(Class.java:2509) [rt.jar:1.7.0_95]
at java.lang.Class.getDeclaredFields(Class.java:1819) [rt.jar:1.7.0_95]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 10 more
Caused by: java.lang.ClassNotFoundException: org.apache.struts.util.MessageResources from [Module "deployment.testapp.war:main" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.1.1.GA]
... 15 more
23:23:07,118 INFO [org.jboss.as.server] (HttpManagementService-threads - 7) JBAS015870: Deploy of deployment "testapp.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"testapp.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"testapp.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"testapp.war\""}}
23:23:07,206 INFO [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment testapp.war in 87ms
23:23:07,206 INFO [org.jboss.as.controller] (HttpManagementService-threads - 7) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."testapp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."testapp.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "testapp.war"
This problem happens when you try to deploy an ear/war/jar deployment in jboss7/wildfly and you have not specified what dependencies need your application.
Jboss7/Wildfly has his own module class loader to isolate applications and dependencies running into the same java virtual machine.
All deployments in jboss/wildfly are loaded as modules (not only the content included in modules folder, the content of deployments folder are modules too).
If you don't have packaged "struts" jar into the application deployment file, you will need to deploy the required dependencies as modules and tell to jboss that your application depends on it.
So, you have at least five alternatives:
Build your application as an Uber-Jar including your dependencies
inside.
Deploy your application and dependencies in the deployments folder and add a manifest entry in your application to tell to jboss that
your application depends on it.
Deploy your application and application dependencies (jars) in the deployments folder and add a jboss deployment descriptor xml in your
application to tell to jboss that your application depends on it.
Deploy your application in the deployments folder and create modules for your dependencies (if do not exist) and add a manifest
entry in your application to tell to jboss that your application
depends on it.
Deploy your application in deployments folder and create modules for your dependencies (if do not exist) and use a jboss deployment
descriptor xml in your application to tell to jboss that your
application depends on it.
For more information visit:
jboss 7 classloader
jboss 7 deployment descriptors
seems for me JSF 2.2 is not working at all on JBoss 7.1.1
with jboss's multi jsf I just dropped in replacement of the jsf api and jsf implementation modules with respective jars of jsf 2.2
when my application starts I see following error:
01:46:59,286 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Initializing Mojarra 2.2.0 ( 20130502-2118 https://svn.java.net/svn/mojarra~svn/tags/2.2.0#11930) for context '/broker'
01:46:59,922 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-5) Critical error during deployment: : java.lang.NoClassDefFoundError: com/sun/faces/spi/InjectionProvider
at javax.faces.FactoryFinder$FactoryManager.copyInjectionProviderFromFacesContext(FactoryFinder.java:1051) [jboss-jsf-api_2.2_spec-2.2.0.jar:2.2.0]
at javax.faces.FactoryFinder$FactoryManager.<init>(FactoryFinder.java:1035) [jboss-jsf-api_2.2_spec-2.2.0.jar:2.2.0]
at javax.faces.FactoryFinder$FactoryManagerCache.getApplicationFactoryManager(FactoryFinder.java:856) [jboss-jsf-api_2.2_spec-2.2.0.jar:2.2.0]
at javax.faces.FactoryFinder$FactoryManagerCache.getApplicationFactoryManager(FactoryFinder.java:793) [jboss-jsf-api_2.2_spec-2.2.0.jar:2.2.0]
at javax.faces.FactoryFinder$FactoryManagerCache.access$100(FactoryFinder.java:768) [jboss-jsf-api_2.2_spec-2.2.0.jar:2.2.0]
at javax.faces.FactoryFinder.setFactory(FactoryFinder.java:409) [jboss-jsf-api_2.2_spec-2.2.0.jar:2.2.0]
at com.sun.faces.config.processor.FactoryConfigProcessor.setFactory(FactoryConfigProcessor.java:317) [jsf-impl-2.2.0.jar:2.2.0]
at com.sun.faces.config.processor.FactoryConfigProcessor.processFactories(FactoryConfigProcessor.java:259) [jsf-impl-2.2.0.jar:2.2.0]
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:216) [jsf-impl-2.2.0.jar:2.2.0]
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:435) [jsf-impl-2.2.0.jar:2.2.0]
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:214) [jsf-impl-2.2.0.jar:2.2.0]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3392) [jbossweb-7.0.13.Final.jar:]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3850) [jbossweb-7.0.13.Final.jar:]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:90) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_09]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_09]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_09]
Caused by: java.lang.ClassNotFoundException: com.sun.faces.spi.InjectionProvider from [Module "javax.faces.api:main" from local module loader #70dc82be (roots: /Users/ilyadyoshin/develop/jboss-as-7.1.1.Final/modules)]
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)
... 19 more
Even more: when I look through contents of the jsf-api.jar I see this class.
may be I'm late but for other peoples who fall into the same problem, I found a solution here : https://community.jboss.org/thread/203257?start=0&tstart=0
Add to the module.xml of your JSF API module a depency to the JSF IMPL module by adding this line :
<module name="com.sun.jsf-impl"/>
Some changes may be required when multiple JSF versions exists on the AS.
Tested with JBoss 7.1 and JSF 2.2.0m12
EDIT : I didn't saw "(final)" in your subject, with the final JSF 2.2 version I ran into another probleme with NoContextActiveException for FlowDefinition :(
You are right, JSF 2.2 seems only to be supported starting from Wildfly / AS 8. I found a thread at JBoss community with installation instructions, followed by the information that it makes no sense to install with AS 7.1.1.
The thread referenced in the other answer (https://community.jboss.org/thread/203257) has been updated. I've tried it on my AS 7.1.1 and it works
My question is more related to "Force Jboss logging to use of SLF4J" but couldn't find more details in it so i am posting it here again. How to make slf4j work, if one of my class calls for slf4j i get the below error. Since jboss 7.1.1 already have slf4j module, what else i need add to make it work.
20:20:31,565 ERROR [stderr] (MSC service thread 1-8) SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
20:20:31,572 ERROR [stderr] (MSC service thread 1-8) SLF4J: Defaulting to no-operation (NOP) logger implementation
20:20:31,578 ERROR [stderr] (MSC service thread 1-8) SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
There is no need to force anything. slf4j is a logging facade. JBoss AS provides a bridge between slf4j and the JBoss Log Manager. All you need to do to get it to work is
Make sure you don't include the slf4j API library in your deployment
Also make sure you don't include an slf4j bridge in your deployment
Other than those two things there souldn't be anything else to do.