Hi Alessio, thanks for the reply,
We made it work by adding a variable to the build path of the project pointing to the cxf-api inside "JBOSS_HOME/org/apache/cxf/main/".We were not sure that this was the right approach tough. Here is the full stack trace before the fix.
10:43:05,681 INFO [org.jboss.modules] JBoss Modules version 1.1.1.GA
10:43:07,187 INFO [org.jboss.msc] JBoss MSC version 1.0.2.GA
10:43:07,299 INFO [org.jboss.as] JBAS015899: JBoss AS 7.1.1.Final "Brontes" starting
10:43:12,827 INFO [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
10:43:12,827 INFO [org.xnio] XNIO Version 3.0.3.GA
10:43:12,983 INFO [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
10:43:13,006 INFO [org.jboss.remoting] JBoss Remoting version 3.2.3.GA
10:43:13,068 INFO [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
10:43:13,079 INFO [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
10:43:13,076 INFO [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
10:43:13,260 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
10:43:13,263 INFO [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
10:43:13,268 INFO [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
10:43:13,501 INFO [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
10:43:13,603 INFO [org.jboss.as.security] (MSC service thread 1-7) JBAS013100: Current PicketBox version=4.0.7.Final
10:43:13,869 INFO [org.jboss.as.connector] (MSC service thread 1-6) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)
10:43:14,714 INFO [org.jboss.as.naming] (MSC service thread 1-8) JBAS011802: Starting Naming Service
10:43:14,902 INFO [org.jboss.as.mail.extension] (MSC service thread 1-1) JBAS015400: Bound mail session [java:jboss/mail/Default]
10:43:16,012 INFO [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
10:43:17,120 INFO [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-5) Starting Coyote HTTP/1.1 on http-localhost-127.0.0.1-8080
10:43:18,939 INFO [org.jboss.ws.common.management] (MSC service thread 1-2) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.1.1.Final
10:43:19,120 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
10:43:19,625 INFO [org.jboss.as.remoting] (MSC service thread 1-7) JBAS017100: Listening on /127.0.0.1:9999
10:43:19,625 INFO [org.jboss.as.remoting] (MSC service thread 1-2) JBAS017100: Listening on localhost/127.0.0.1:4447
10:43:19,628 INFO [org.jboss.as.server.deployment.scanner] (MSC service thread 1-5) JBAS015012: Started FileSystemDeploymentService for directory F:\Desenvolvimento\Programas\jboss-as-7.1.1.Final\standalone\deployments
10:43:19,640 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found GeneratedFromArchetype.war in deployment directory. To trigger deployment create a file called GeneratedFromArchetype.war.dodeploy
10:43:19,643 INFO [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015003: Found teste.war in deployment directory. To trigger deployment create a file called teste.war.dodeploy
10:43:20,632 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "teste.war"
10:43:23,247 INFO [org.jboss.ws.cxf.metadata] (MSC service thread 1-6) JBWS024061: Adding service endpoint metadata: id=SampleWS
address=http://localhost:8080/teste/ws
implementor=com.sample.ws.SampleWSImpl
serviceName={http://ws.sample.com/}SampleWS
portName={http://ws.sample.com/}SampleWSImplPort
annotationWsdlLocation=null
wsdlLocationOverride=null
mtomEnabled=false
10:43:24,572 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.deployment.unit."teste.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."teste.war".INSTALL: Failed to process phase INSTALL of deployment "teste.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.Error: Unresolved compilation problems:
The import org.apache.cxf cannot be resolved
InInterceptors cannot be resolved to a type
The attribute interceptors is undefined for the annotation type InInterceptors
OutInterceptors cannot be resolved to a type
The attribute interceptors is undefined for the annotation type OutInterceptors
at com.sample.ws.SampleWSImpl.<init>(SampleWSImpl.java:4)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_45]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [rt.jar:1.6.0_45]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_45]
at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_45]
at java.lang.Class.newInstance0(Class.java:357) [rt.jar:1.6.0_45]
at java.lang.Class.newInstance(Class.java:310) [rt.jar:1.6.0_45]
at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.newInstance(NonSpringBusHolder.java:169)
at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:94)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:128)
at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:67)
at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
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
10:43:24,590 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "teste.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"teste.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"teste.war\".INSTALL: Failed to process phase INSTALL of deployment \"teste.war\""}}
10:43:24,596 INFO [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015877: Stopped deployment teste.war in 6ms
10:43:24,598 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777: Services which failed to start: service jboss.deployment.unit."teste.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."teste.war".INSTALL: Failed to process phase INSTALL of deployment "teste.war"
10:43:24,600 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.\"teste.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"teste.war\".INSTALL: Failed to process phase INSTALL of deployment \"teste.war\""}}}}
We´ve decided to use Maven with JBossWs, but it seems very confusing. We´ve seen several tutorials with different approaches. Should we add the CXF´s dependencies to our POM that comes packaged with JBoss AS
<dependency>
<groupId>org.jboss.ws.cxf</groupId>
<artifactId>jbossws-cxf-client</artifactId>
<scope>provided</scope>
</dependency>
Or plain CXF´s dependencies
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>2.7.7</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>2.7.7</version>
</dependency>
Thanks in advance.