Using Netbeans, I've created my Java Enterprise Application with a ejb module and a war module.
I've done some changes in the war module and everything worked just fine. But now I'm trying to call an remote ejb defined in the ejb module. I've followed this tutorial https://netbeans.org/kb/docs/javaee/entappclient.html.
Now, when I try to deploy the ear file in my applicational server (JBoss AS7) I get the following error:
{"JBAS014653: Composite operation failed and was rolled back. Steps
that failed:" => {"Operation step-2" => {"JBAS014671: Failed services"
=> {"jboss.deployment.subunit.\"events.ear\".\"events-ejb.jar\".POST_MODULE"
=> "org.jboss.msc.service.StartException in service jboss.deployment.subunit.\"events.ear\".\"events-ejb.jar\".POST_MODULE:
Failed to process phase POST_MODULE of subdeployment
\"events-ejb.jar\" of deployment \"events.ear\""}}}}
/Users/Luis/NetBeansProjects/events/nbproject/build-impl.xml:307: The
module has not been deployed.
Why is this happening?
EDIT
teste-ejb module
NewSessionBean
package a;
import javax.ejb.Stateless;
#Stateless
public class NewSessionBean implements NewSessionBeanRemote {
// Add business logic below. (Right-click in editor and choose
// "Insert Code > Add Business Method")
}
teste-war module (not modified)
AuthenticationInterface (the java application)
SessionbeanRemote
package a;
import javax.ejb.Remote;
#Remote
public interface NewSessionBeanRemote {
}
2º EDIT
17:59:24,759 WARN [org.jboss.modules] (MSC service thread 1-4) Failed
to define class a.NewSessionBean in Module
"deployment.teste-ejb.jar:main" from Service Module Loader:
java.lang.LinkageError: Failed to link a/NewSessionBean (Module
"deployment.teste-ejb.jar:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
at org.jboss.modules.Module.loadModuleClass(Module.java:517)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
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 java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_51]
at java.lang.Class.forName(Class.java:270) [rt.jar:1.7.0_51]
at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:63)
[jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)
[jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)
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: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.NoClassDefFoundError: a/NewSessionBeanRemote
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_51]
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_51]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[rt.jar:1.7.0_51]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)
... 19 more Caused by: java.lang.ClassNotFoundException: a.NewSessionBeanRemote from [Module "deployment.teste-ejb.jar: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)
... 24 more
17:59:24,860 WARN [org.jboss.modules] (MSC service thread 1-4) Failed
to define class a.NewSessionBean in Module
"deployment.teste-ejb.jar:main" from Service Module Loader:
java.lang.LinkageError: Failed to link a/NewSessionBean (Module
"deployment.teste-ejb.jar:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)
[jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)
[jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
[jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.Module.loadModuleClass(Module.java:517) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
[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]
at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getEjbClass(BusinessViewAnnotationProcessor.java:225)
at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:97)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)
[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.NoClassDefFoundError: a/NewSessionBeanRemote
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_51]
at java.lang.ClassLoader.defineClass(ClassLoader.java:800) [rt.jar:1.7.0_51]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[rt.jar:1.7.0_51]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)
[jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)
[jboss-modules.jar:1.1.1.GA]
... 16 more Caused by: java.lang.ClassNotFoundException: a.NewSessionBeanRemote from [Module "deployment.teste-ejb.jar: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]
17:59:24,970 ERROR [org.jboss.msc.service.fail] (MSC service thread
1-4) MSC00001: Failed to start service
jboss.deployment.unit."teste-ejb.jar".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."teste-ejb.jar".POST_MODULE: Failed to process
phase POST_MODULE of deployment "teste-ejb.jar"
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:
org.jboss.as.server.deployment.DeploymentUnitProcessingException:
Could not load EJB class a.NewSessionBean
at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getEjbClass(BusinessViewAnnotationProcessor.java:227)
at org.jboss.as.ejb3.deployment.processors.BusinessViewAnnotationProcessor.deploy(BusinessViewAnnotationProcessor.java:97)
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: a.NewSessionBean from [Module "deployment.teste-ejb.jar: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.ejb3.deployment.processors.BusinessViewAnnotationProcessor.getEjbClass(BusinessViewAnnotationProcessor.java:225)
... 7 more
17:59:25,033 INFO [org.jboss.as.server] (DeploymentScanner-threads -
1) JBAS015870: Deploy of deployment "teste-ejb.jar" was rolled back
with failure message {"JBAS014671: Failed services" =>
{"jboss.deployment.unit.\"teste-ejb.jar\".POST_MODULE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"teste-ejb.jar\".POST_MODULE: Failed to process
phase POST_MODULE of deployment \"teste-ejb.jar\""}} 17:59:25,037 INFO
[org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877:
Stopped deployment teste-ejb.jar in 3ms 17:59:25,059 INFO
[org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774:
Service status report JBAS014777: Services which failed to start:
service jboss.deployment.unit."teste-ejb.jar".POST_MODULE:
org.jboss.msc.service.StartException in service
jboss.deployment.unit."teste-ejb.jar".POST_MODULE: Failed to process
phase POST_MODULE of deployment "teste-ejb.jar"
17:59:25,071 ERROR [org.jboss.as.server.deployment.scanner]
(DeploymentScanner-threads - 2) {"JBAS014653: Composite operation
failed and was rolled back. Steps that failed:" => {"Operation step-2"
=> {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"teste-ejb.jar\".POST_MODULE" =>
"org.jboss.msc.service.StartException in service
jboss.deployment.unit.\"teste-ejb.jar\".POST_MODULE: Failed to process
phase POST_MODULE of deployment \"teste-ejb.jar\""}}}}
Thanks
I don't know much about netbeans. I would suggest using GlassFish like the tutorial you linked above. If you really want to use JBoss AS 7 then you need to start reading documentation. By default, modules in JBoss can't see eachother due to proper isolated classloaders. My guess is you just need to either turn that off or package your code properly. Documentation here:
https://docs.jboss.org/author/display/AS7/Developer+Guide
Related
I searched a lot, but could not find a solution for my issue. I generated stubs from a wsdl using wsimport, and added to my project. Following is the error I get when I try to initialize a class MyServiceEp from the stub. I identify this as probably a j-boss 7 issue. But I am new to the server and do not know the workaround for this. I tried adding
<property name="org.jboss.osgi.system.modules.extra">
javax.xml.ws
</property>
to my standalone.xml as I read in another forum that this is the workaround for this, but could not get the issue solved..
10:49:23,351 ERROR [org.springframework.web.portlet.DispatcherPortlet] (MSC service thread 1-2) Context initialization failed: org.springframework.beans.factory
.BeanCreationException: Error creating bean with name 'MyServiceImpl': Injection of autowired dependencies failed; nested exception is java.lang.NoClassDefFoundError: org/abc/bcd/MyServiceEp
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java
:288) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1120) [spring-beans
-3.2.0.RELEASE.jar:3.2.0.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522) [spring-beans-
3.2.0.RELEASE.jar:3.2.0.RELEASE]
at
].................................
..............................
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: java.lang.NoClassDefFoundError: org/abc/bcd/MyServiceEp
at org.xx.portal.ws.client.MyServiceImpl.setMyClient(MyServiceImpl.java:37) [classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_25]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_25]
at
... 53 more
I am using Liferay 6.2 - jboss 7.1.1 final bundled version and use spring MVC. The NoClassDefFound error occurs for an auto generated class in the stub. I will post more details if required.
Update
I run the server with verbose:class and got the following error as well..
12:31:00,501 WARN [org.jboss.modules] (MSC service thread 1-4) Failed to define class gov.or.hix.wsdl.ee.individualcaseservice.IndividualCaseServiceEp in Modul
e "deployment.My-Portlet-1.0.0.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/abc/bcd/MyServiceEp (Module "deployment.My-Portlet-1.0.0.war:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.Module.loadModuleClass(Module.java:517) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.1.1.GA]
at
..................................
................................
com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54) [portal-service.jar:]
at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116) [portal-service.jar:]
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:1145) [rt.jar:1.7.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25]
at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
Caused by: java.lang.NoClassDefFoundError: javax/xml/ws/Service
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.7.0_25]
at java.lang.ClassLoader.defineClass(ClassLoader.java:792) [rt.jar:1.7.0_25]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [rt.jar:1.7.0_25]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.1.GA]
... 70 more
Caused by: java.lang.ClassNotFoundException: javax.xml.ws.Service from [Module "deployment.My-Portlet-1.0.0.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]
... 75 more
You might be using Eclipse IDE. Upon this assumption, try the following steps:
You've got your stubs regarding your web service say in the directory webservices. Now Link the source of these file in your project.
Right click you project > Properties > Java Build Path > Locate Source Tab > Click Link Source > Locate webservices's path from the directory structure
Click OK and OK again.
Now try to import the classes regarding your studs.
This will definitely work for you as it worked in my case.
I was able to get this solved. It was an issue due to jboss 7. Jboss 7 doesnot have the files for javax.xml.ws.Service and hence the error. I got this resolved by adding the following dependencies to my project.
<dependency>
<groupId>javax.xml.ws</groupId>
<artifactId>jaxws-api</artifactId>
<version>2.2.8</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.1.4</version>
</dependency>
Adding this resolved the java.lang.NoClassDefFoundError: javax/xml/ws/Service error and hence the issue was resolved.
i have tow projects :
1=> MyApplication (WAR) where i use some EJB by Injecting them (#EJB)
2=> MyEJBProject where i have all my Interfaces and Implimentations annoted by #Statless and #local
I work with jboss EAP6.
When i try to clean and install the EJBProject first , it works good but when i wanna put it on the server (deployement folder ) it gives me the following errors :
ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."org-services-abk.jar".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."org-services-abk.jar".POST_MODULE: JBAS018733: N'a pas pu traiter la phase POST_MODULE de deployment "org-services-abk.jar"
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_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_65]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_65]
Caused by: java.lang.RuntimeException: JBAS018757: Erreur d'obtention d'informations réflectives pour class eu.org.dataservice.abk.action.impl.GroupVersionHome pour le ClassLoader (Chargeur de classe) ModuleClassLoader for Module "deployment.org-services-abk.jar:main" from Service Module Loader
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:72) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:107)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:92)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:77)
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.NoClassDefFoundError: org/hibernate/envers/exception/RevisionDoesNotExistException
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_65]
at java.lang.Class.privateGetDeclaredFields(Class.java:2436) [rt.jar:1.7.0_65]
at java.lang.Class.getDeclaredFields(Class.java:1806) [rt.jar:1.7.0_65]
at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:68) [jboss-as-server-7.3.0.Final-redhat-14.jar:7.3.0.Final-redhat-14]
... 10 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.envers.exception.RevisionDoesNotExistException from [Module "deployment.org-services-abk.jar: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]
... 15 more
Manifest-Version: 1.0
...
Dependencies: org.hibernate, org.hibernate.envers
Try adding this in your META-INF/MANIFEST
Manifest-Version: 1.0
...
Dependencies: org.hibernate, org.hibernate.envers
Also checked to see the dependence on your project with envers, must be Hibernate Envers 4.2.7.SP1.Final for JBoss EAP 6.2
See the docs: JPA Reference Guide
I am trying to deploy a .war file on Jboss-7.1.1 and getting the following error in stacktrace. I have searched about it on web but not sure the cause of this exception
23:01:20,483 WARN [org.jboss.as.server.deployment] (MSC service thread 1-6) Class Path entry p6psy.jar in "/D:/development_environment/servers/Final_jboss/jboss-as-7.1.0.Final/standalone/deployments/SSOAdminTool.war/WEB-INF/lib/xapool.jar" does not point to a valid jar for a Class-Path reference.
23:01:20,800 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.deployment.unit."SSOAdminTool.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."SSOAdminTool.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "SSOAdminTool.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.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$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_18]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_18]
at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_18]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011093: Could not load component class org.displaytag.filter.ResponseOverrideFilter
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:113)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:54)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
... 5 more
Caused by: java.lang.ClassNotFoundException: org.displaytag.filter.ResponseOverrideFilter from [Module "deployment.SSOAdminTool.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]
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:111)
... 7 more
This RESTservice project is deployed on a Jboss 7.1.1 with Liferay SDK 6.2.
'javax.api' has already been added as dependency to the jboss-deployment-structure.xml, but this error appears anyway:
09:11:28,741 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."RESTtest.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."RESTtest.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "RESTtest.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(Unknown Source) [rt.jar:1.7.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.7.0_51]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_51]
Caused by: java.lang.RuntimeException: Error getting reflective information for class de.foo.soa.myfoo.sales.MyfooSalesSF with ClassLoader ModuleClassLoader for Module "de.foo.soa.myfoo.modules:main" from local module loader #41c61c91 (roots: C:\fooTest\liferay-portal-JBOSS6.2-ce-ga2\jboss-7.1.1\modules)
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: javax/naming/NamingException
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_51]
at java.lang.Class.privateGetDeclaredFields(Unknown Source) [rt.jar:1.7.0_51]
at java.lang.Class.getDeclaredFields(Unknown Source) [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: javax.naming.NamingException from [Module "de.foo.soa.myfoo.modules:main" from local module loader #41c61c91 (roots: C:\fooTest\liferay-portal-JBOSS6.2-ce-ga2\jboss-7.1.1\modules)]
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
09:11:28,748 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "RESTtest.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"RESTtest.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"RESTtest.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"RESTtest.war\""}}
09:11:28,757 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment RESTtest.war in 9ms
09:11:28,758 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 1) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."RESTtest.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."RESTtest.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "RESTtest.war"
A look in the module.xml of javax/api shows that javax/naming/NamingException is added as dependency, so everything should be fine:
<dependencies>
<system export="true">
<paths>
...
<path name="javax/naming"/>
<path name="javax/naming/directory"/>
<path name="javax/naming/event"/>
<path name="javax/naming/ldap"/>
<path name="javax/naming/spi"/>
...
</paths>
</system>
</dependencies>
I look forward to any constructive suggestion.
It seems you have added the javax api dependency to the jboss-deployment-structure.xml of your deployment, but if you look at your exception message:
ClassNotFoundException: javax.naming.NamingException from
[Module "de.foo.soa.myfoo.modules:main"
it is missing from "de.foo.soa.myfoo.modules" module, not from your deployment. The modules module.xml file is where you need to add the dependency.
I'm having a hard time implementing a REST web service using Apache CXF 2.x. I have a strict requirement to use JBoss AS 7.1.1 Final, which comes equipped with CXF 2.4.6. I have installed JBossWS 4.1.1: Apache CXF integration stack which upgrades the CXF version to 2.6.4. I'm using Eclipse Kepler SR1 in which I had to install "JBossAS Tools" so I could set JBoss AS 7.1.1 as my project runtime. The following are the different classes I'm using as well as my web.xml:
Web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
<display-name>CXF</display-name>
<servlet>
<servlet-name>RESTServlet</servlet-name>
<servlet-class>org.apache.cxf.jaxrs.servlet.CXFNonSpringJaxrsServlet</servlet-class>
<init-param>
<param-name>jaxrs.serviceClasses</param-name>
<param-value>
webservice.StudentServiceImpl
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>StudentServiceImpl</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout>
</session-config>
</web-app>
Student.java
package pojo;
import javax.xml.bind.annotation.XmlRootElement;
#XmlRootElement(name = "student")
public class Student {
private String name;
private String lName;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getlName() {
return lName;
}
public void setlName(String lName) {
this.lName = lName;
}
}
StudentService
package webservice;
import pojo.Student;
public interface StudentService {
public Student getStudent(String firstName,String lastName);
}
StudentServiceImpl.java
package webservice;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import pojo.Student;
#Path("StudentService")
#Produces(MediaType.APPLICATION_JSON)
public class StudentServiceImpl implements StudentService{
#POST
#Path("/student/{firstName}/{lastName}")
public Student getStudent(#PathParam("firstName") String firstName,#PathParam("lastName") String lastName) {
Student student = new Student();
student.setName(firstName);
student.setlName(lastName);
return student;
}
}
What I'm trying to achieve is having a REST webservice that returns a complex object (Student in this case) as a JSON String. Keep in mind that I've configured the CXF endpoint in Eclipse with a CXFServlet rather than Spring. Another note is that I'm using Apache CXF 2.7.6 as my CXF runtime since I couldn't find a valid link to download CXF 2.6.4. My context root is called "CXF" but when I browse to the URL http://localhost:8080/CXF/, I get error HTTP error 404.
What am I doing wrong?
UPDATE:
I just noticed that upon deployment, the following exception is being thrown:
17:51:26,489 WARN [org.jboss.modules] (MSC service thread 1-1) Failed to define class org.apache.cxf.wsn.jms.JmsPublisher in Module "deployment.CXF.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/apache/cxf/wsn/jms/JmsPublisher (Module "deployment.CXF.war:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
at org.jboss.modules.Module.loadModuleClass(Module.java:517)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_45]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_45]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_45]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [rt.jar:1.6.0_45]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
at org.jboss.modules.Module.loadModuleClass(Module.java:517)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_45]
at java.lang.Class.forName(Class.java:249) [rt.jar:1.6.0_45]
at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:63) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)
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$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: java.lang.NoClassDefFoundError: org/apache/activemq/advisory/ConsumerListener
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_45]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_45]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_45]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [rt.jar:1.6.0_45]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)
... 35 more
Caused by: java.lang.ClassNotFoundException: org.apache.activemq.advisory.ConsumerListener from [Module "deployment.CXF.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.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 41 more
17:51:26,563 WARN [org.jboss.modules] (MSC service thread 1-1) Failed to define class org.apache.cxf.wsn.services.JaxwsPublisher in Module "deployment.CXF.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/apache/cxf/wsn/services/JaxwsPublisher (Module "deployment.CXF.war:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396)
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243)
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
at org.jboss.modules.Module.loadModuleClass(Module.java:517)
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
at java.lang.Class.forName0(Native Method) [rt.jar:1.6.0_45]
at java.lang.Class.forName(Class.java:249) [rt.jar:1.6.0_45]
at org.jboss.as.server.deployment.reflect.DeploymentClassIndex.classIndex(DeploymentClassIndex.java:54)
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:63) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55) [jboss-as-ee-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)
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$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: java.lang.NoClassDefFoundError: org/apache/cxf/wsn/jms/JmsPublisher
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_45]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_45]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_45]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [rt.jar:1.6.0_45]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391)
... 20 more
Caused by: java.lang.ClassNotFoundException: org.apache.cxf.wsn.jms.JmsPublisher from [Module "deployment.CXF.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.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 26 more
17:51:26,690 WARN [org.jboss.modules] (MSC service thread 1-1) Failed to define class org.apache.cxf.wsn.jms.JmsPublisher in Module "deployment.CXF.war:main" from Service Module Loader: java.lang.LinkageError: Failed to link org/apache/cxf/wsn/jms/JmsPublisher (Module "deployment.CXF.war:main" from Service Module Loader)
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:396) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:243) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.Module.loadModuleClass(Module.java:517) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182) [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.performLoadClassChecked(ConcurrentClassLoader.java:423) [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]
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.6.0_45]
at java.lang.Class.privateGetDeclaredFields(Class.java:2300) [rt.jar:1.6.0_45]
at java.lang.Class.getDeclaredFields(Class.java:1745) [rt.jar:1.6.0_45]
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]
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]
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$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: java.lang.NoClassDefFoundError: org/apache/activemq/advisory/ConsumerListener
at java.lang.ClassLoader.defineClass1(Native Method) [rt.jar:1.6.0_45]
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [rt.jar:1.6.0_45]
at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [rt.jar:1.6.0_45]
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) [rt.jar:1.6.0_45]
at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:327) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:391) [jboss-modules.jar:1.1.1.GA]
... 24 more
Caused by: java.lang.ClassNotFoundException: org.apache.activemq.advisory.ConsumerListener from [Module "deployment.CXF.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.performLoadClassChecked(ConcurrentClassLoader.java:423) [jboss-modules.jar:1.1.1.GA]
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423) [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]
... 30 more
17:51:26,757 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."CXF.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."CXF.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "CXF.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$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: java.lang.RuntimeException: Error getting reflective information for class org.apache.cxf.wsn.services.JaxwsNotificationBroker with ClassLoader ModuleClassLoader for Module "deployment.CXF.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: org/apache/cxf/wsn/jms/JmsPublisher
at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.6.0_45]
at java.lang.Class.privateGetDeclaredFields(Class.java:2300) [rt.jar:1.6.0_45]
at java.lang.Class.getDeclaredFields(Class.java:1745) [rt.jar:1.6.0_45]
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.cxf.wsn.jms.JmsPublisher from [Module "deployment.CXF.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.performLoadClassChecked(ConcurrentClassLoader.java:423)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
... 15 more
17:51:26,811 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "CXF.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"CXF.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"CXF.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"CXF.war\""}}
17:51:27,096 INFO [org.jboss.as.server.deployment] (MSC service thread 1-10) JBAS015877: Stopped deployment CXF.war in 285ms
17:51:27,100 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."CXF.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.unit."CXF.war".POST_MODULE: Failed to process phase POST_MODULE of deployment "CXF.war"
17:51:27,107 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"CXF.war\".POST_MODULE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"CXF.war\".POST_MODULE: Failed to process phase POST_MODULE of deployment \"CXF.war\""}}}}
We had a similar problem trying to run a Web Service on JBoss AS 7.1.1 Final + jbossws-cxf-4.0.2.GA. The way we solved the problem was adding the CXF jar´s from the Jboss module as a variable through the build path configuration on Eclipse. This way the libs you will be able to accomplish the "compile dependency" suggested by #mike4263. Here is a good tutorial on how to do it: http://www.wikihow.com/Add-JARs-to-Project-Build-Paths-in-Eclipse-%28Java%29.
You need to remove the other version of CXF from your package. There seems to be some impedance mismatch between the container version and the bundled version. Your application should be relying upon the version deployed with JBoss. This is a fairly common mistake, and it means you aren't leveraging the pre-configured version and will likely hit other integration/support problems
You can configure the dependency to be a "compile dependency", and ensure that it is not bundled intot he output WAR file.
I has same issue. I resolved as below.
Remove below tag in standalone.xml(on jboos)
<subsystem xmlns="urn:jboss:domain:webservices:1.2">
<modify-wsdl-address>true</modify-wsdl-address>
<wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
<endpoint-config name="Standard-Endpoint-Config"/>
<endpoint-config name="Recording-Endpoint-Config">
<pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
<handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
</pre-handler-chain>
</endpoint-config>
</subsystem>
2.If do not want Remove them. Find Lib "cxf-services-wsn-core-2.7.1.jar" to your project.
This solution working to me.