11 Replies Latest reply on Dec 17, 2013 11:56 AM by Paulo Vivacqua

    Why aren´t CXF dependencies being imported into my project?

    Paulo Vivacqua Newbie

      We are starting a web service project using jboss AS 7.1.1. and jbossws-cxf-4.1.1.Final. We started with a sample project found at http://www.mastertheboss.com/jboss-web-services/installing-apache-cxf-on-jboss-as.

       

      We installed both Apache CXF libraries and Spring support as modules in JBoss AS 7.1.1 using the ant build provided in the jbossws-cxf-4.1.1.Final package using the following task

       

      ant -Dspring=true deploy-jboss711

       

       

      We created a Dynamic Web Project on Eclipse with JBoss 7.1 Runtime and JDK 1.6.0_45

       

      We added a Dependency to these modules into the META-INF/MANIFEST.MF file

      Manifest-Version: 1.0
      Dependencies: org.apache.cxf org.springframework.spring
      

       

      Declare the web service as Servlet in 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"  xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"  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>Example</display-name>
      
      
      <servlet>
      <servlet-name>SampleWS</servlet-name>
      <servlet-class>com.sample.ws.SampleWSImpl</servlet-class>
      </servlet>
      <servlet-mapping>
      <servlet-name>SampleWS</servlet-name>
      <url-pattern>/ws/*</url-pattern>
      </servlet-mapping>
      </web-app>
      

       

      And created our sample class

      package com.sample.ws;
      
      import javax.jws.WebService;
      import org.apache.cxf.interceptor.*;
      
      @WebService(endpointInterface = "com.sample.ws.SampleWS", serviceName = "SampleWS")
      @InInterceptors(interceptors = "org.apache.cxf.interceptor.LoggingInInterceptor")
      @OutInterceptors(interceptors = "org.apache.cxf.interceptor.LoggingOutInterceptor")
      
      public class SampleWSImpl implements SampleWS {
      
      public String hello(String s) {
      return "Hello "+s;
      }
      }
      

       

      For some reason the Jboss CXF depencies on Jboss modules don´t get picked up by Eclipse and we get the error

      InInterceptors cannot be resolved to a type


      We have been trying to figure this out for almost a week now without success. We appreciate any help.

        • 1. Re: Why aren´t CXF dependencies being imported into my project?
          Alessio Soldano Master

          Can you past the full exception stacktrace? Or perhaps provide a sample reproducer war? This should simply work and we have pretty much equivalent tests in the testsuite.

          On a side note, unless you really use spring, the mentioned example does not need the spring integration, dependencies, etc.

          • 2. Re: Re: Why aren´t CXF dependencies being imported into my project?
            Paulo Vivacqua Newbie

            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.

            • 3. Re: Re: Why aren´t CXF dependencies being imported into my project?
              Alessio Soldano Master

              You're probably getting confused with compile time and runtime dependencies.

              You only need a dependency to org.jboss.ws.cxf:jbossws-cxf-client artifact in your pom, that should transitively pull in all you need.

              In the GeneratedFromArchetype.war you produce, you're not going to have the jbossws nor apache cxf jars, as they're already included in the application server. However, if you really need to use Apache CXF api in your ws endpoint, you need to set proper JBoss Modules dependencies (in this case to org.apache.cxf module). That is achieved either through a Dependencies entry in the MANIFEST.MF or an additional jboss-deployment-structure.xml descriptor. More details in AS7 doc and at  https://docs.jboss.org/author/display/JBWS/JBoss+Modules

              • 4. Re: Re: Re: Why aren´t CXF dependencies being imported into my project?
                Paulo Vivacqua Newbie

                Hello Alessio, thanks again for your help.


                I added the org.apache.cxf module through the Dependencies entry in the MANIFEST.MF as folows:

                Manifest-Version: 1.0
                Dependencies: org.apache.cxf services export
                

                 

                But when  I add the '@InInterceptors' annotation to my endpoint it doesn´t recognize it. Reading AS7 doc you suggested it says:

                When using annotations on your endpoints / handlers such as the Apache CXF ones (@InInterceptor, @GZIP, ...) remember to add the proper module dependency in your manifest. Otherwise your annotations are not picked up and added to the annotation index by JBoss Application Server 7, resulting in them being completely and silently ignored.

                Isn´t 'the proper module dependency' mentioned in the tutorial the org.apache.cxf I already added?  How is that different from adding the org.apache.cxf dependency with a 'provided' scope to my pom? 

                 

                
                
                
                <dependency>
                
                
                
                        <groupId>org.apache.cxf</groupId>
                        <artifactId>cxf-rt-frontend-jaxws</artifactId>
                    </dependency>
                

                 

                thanks in advance.

                • 5. Re: Re: Re: Why aren´t CXF dependencies being imported into my project?
                  Alessio Soldano Master

                  Paulo Vivacqua wrote:

                   

                  Hello Alessio, thanks again for your help.

                   

                  I added the org.apache.cxf module through the Dependencies entry in the MANIFEST.MF as folows:

                  1. Manifest-Version: 1.0 
                  2. Dependencies: org.apache.cxf services export 

                   

                  But when  I add the '@InInterceptors' annotation to my endpoint it doesn´t recognize it.

                  It might also be that the @InInterceptors is recognized, but the class for interceptor you want to be created can't resolved. Just in to be sure, that's not the problem here, try also adding the org.apache.cxf.impl module.

                  And again, be sure you have no cxf jars in the deployment (btw, moe recent WildFly version automatically performs checks to verify this).

                   

                  Reading AS7 doc you suggested it says:

                  When using annotations on your endpoints / handlers such as the Apache CXF ones (@InInterceptor, @GZIP, ...) remember to add the proper module dependency in your manifest. Otherwise your annotations are not picked up and added to the annotation index by JBoss Application Server 7, resulting in them being completely and silently ignored.

                  Isn´t 'the proper module dependency' mentioned in the tutorial the org.apache.cxf I already added?

                  Yes, see above.

                   

                  How is that different from adding the org.apache.cxf dependency with a 'provided' scope to my pom? 

                   

                  1. <dependency> 
                  2.  
                  3.  
                  4.  
                  5.         <groupId>org.apache.cxf</groupId> 
                  6.         <artifactId>cxf-rt-frontend-jaxws</artifactId> 
                  7.     </dependency> 

                   

                  It is a completely different thing.

                  The "provided" scope in you pom is an option for telling Maven when to make the dependency available during the build phases; the most evident consequence of that is that when using the maven plugins to build the jar/war deployment, the dependency is not included in the target archive. Another consequence is that the dependency is not transitively inherited.See http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope in any case.

                  The dependencies you set into the MANIFEST.MF or in jboss-deployment-structure.xml are JBoss Modules dependencies instead. By default, when you deploy a WS app on AS, you get visibility over the plain java api (including jaxws, saaj, etc.) as well as the JBossWS api module. The Apache CXF modules are not automatically visible, so you need to tell the container that you also want to use them.

                   

                  IOW, with Maven you control the compiling, building, testing and packaging of the app. When it comes to runtime, the classloading is controlled by JBoss Modules, so you need to tell it if you need additional dependencies.

                  1 of 1 people found this helpful
                  • 6. Re: Re: Re: Re: Why aren´t CXF dependencies being imported into my project?
                    Paulo Vivacqua Newbie

                    Alessio thanks for the excellent explanation, i really appreciate your help.

                     

                    I added the org.apache.cxf.impl module entry to the MANIFEST.MF, in order for the Apache CXF modules be visible to my project at runtime and the cxf-rt-frontend-jaxws dependecy to my pom in order for the dependencies to be available at compile time.


                     

                     

                     

                    <dependency>
                    <groupId>org.apache.cxf</groupId>
                    <artifactId>cxf-rt-frontend-jaxws</artifactId>
                    <scope>provided</scope>
                    </dependency>
                    
                    <dependency>
                    <groupId>org.jboss.ws.cxf</groupId>
                    <artifactId>jbossws-cxf-client</artifactId>
                    <scope>provided</scope>
                    </dependency>
                    

                     

                    I was able to publish the WS without errors. However when I setup my web.xml and applicationContext.xml to configure my project to use spring, I started get the  error 'class path resource [META-INF/cxf/cxf.xml] cannot be opened because it does not exist' I did some research and none of the approaches suggested worked.

                     

                     

                    11:10:49,242 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-8) Context initialization failed: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf.xml]
                    Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf.xml] cannot be opened because it does not exist
                      at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:192) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:147) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:132) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) [spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) [spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) [spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467) [spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397) [spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282) [spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204) [spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      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$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: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf.xml] cannot be opened because it does not exist
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:186) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      ... 26 more
                    Caused by: java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf.xml] cannot be opened because it does not exist
                      at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158) [spring-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      ... 30 more
                    
                    
                    11:10:49,277 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/GidWsNDSOiVende]] (MSC service thread 1-8) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:META-INF/cxf/cxf.xml]
                    Offending resource: ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf.xml] cannot be opened because it does not exist
                      at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:192) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:147) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:132) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124) [spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93) [spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130) [spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467) [spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397) [spring-context-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282) [spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204) [spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      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$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: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [META-INF/cxf/cxf.xml]; nested exception is java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf.xml] cannot be opened because it does not exist
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:186) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      ... 26 more
                    Caused by: java.io.FileNotFoundException: class path resource [META-INF/cxf/cxf.xml] cannot be opened because it does not exist
                      at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:158) [spring-core-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                      at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328) [spring-beans-3.0.7.RELEASE.jar:3.0.7.RELEASE]
                    

                     

                    ApplicationContext.xml

                    <beans xmlns="http://www.springframework.org/schema/beans"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xmlns:http-conf="http://cxf.apache.org/transports/http/configuration"
                        xmlns:jaxws="http://cxf.apache.org/jaxws"
                        xsi:schemaLocation="
                    http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
                    http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
                    http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
                    
                    
                    
                      <import resource="classpath:META-INF/cxf/cxf.xml"/>
                         
                      <jaxws:endpoint id="Teste" 
                      implementor="br.com.gid.ws.interfaces.impl.TesteImpl" 
                      address="/Teste"/>
                       
                    </beans> 
                    

                     

                    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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
                      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>Teste</display-name>
                    
                    
                      <context-param>
                      <param-name>contextConfigLocation</param-name>
                      <param-value>WEB-INF/applicationContext.xml</param-value>
                      </context-param>
                    
                    
                    
                      <listener>
                      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
                      </listener>
                    
                    
                      <servlet>
                      <servlet-name>Teste</servlet-name>
                      <servlet-class>br.com.gid.ws.interfaces.impl.TesteImpl</servlet-class>
                      <load-on-startup>1</load-on-startup>
                      </servlet>
                      <servlet-mapping>
                      <servlet-name>Teste</servlet-name>
                      <url-pattern>/Teste</url-pattern>
                      </servlet-mapping>
                    
                    
                    
                    
                    </web-app>
                    

                     

                    Pom

                    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
                      <modelVersion>4.0.0</modelVersion>
                      <groupId>br.com.gid.ws</groupId>
                      <artifactId>Teste</artifactId>
                      <version>0.0.1-SNAPSHOT</version>
                      <packaging>war</packaging>
                      <name>br.com.gid.ws</name>
                    
                    
                      <properties>
                    
                    
                      <!-- Explicitly declaring the source encoding eliminates the following 
                      message: -->
                      <!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered 
                      resources, i.e. build is platform dependent! -->
                      <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
                    
                    
                      <!-- Define the version of JBoss' Java EE 6 APIs we want to import. Any 
                      dependencies from org.jboss.spec will have their version defined by this 
                      BOM -->
                      <javaee6.web.spec.version>2.0.0.Final</javaee6.web.spec.version>
                    
                    
                      <org.springframework.version>3.0.7.RELEASE</org.springframework.version>
                    
                    
                      <cxf.version>2.7.7</cxf.version>
                    
                    
                      </properties>
                    
                    
                      <dependencyManagement>
                      <dependencies>
                    
                    
                      <!-- JBoss distributes a complete set of Java EE 6 APIs including a Bill 
                      of Materials (BOM). A BOM specifies the versions of a "stack" (or a collection) 
                      of artifacts. We use this here so that we always get the correct versions 
                      of artifacts. Here we use the jboss-javaee-web-6.0 stack (you can read this 
                      as the JBoss stack of the Java EE Web Profile 6 APIs) -->
                    
                    
                      <dependency>
                      <groupId>org.jboss.spec</groupId>
                      <artifactId>jboss-javaee-web-6.0</artifactId>
                      <version>${javaee6.web.spec.version}</version>
                      <type>pom</type>
                      <scope>import</scope>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.jboss.as</groupId>
                      <artifactId>jboss-as-parent</artifactId>
                      <version>7.1.1.Final</version>
                      <type>pom</type>
                      <scope>import</scope>
                      </dependency>
                    
                    
                      </dependencies>
                      </dependencyManagement>
                    
                    
                      <dependencies>
                    
                    
                      <!-- Libs de Projetos -->
                    
                    
                      <dependency>
                      <groupId>br.com.gid</groupId>
                      <artifactId>B2Br-Criptografia</artifactId>
                      <version>1.0</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>br.com.gid</groupId>
                      <artifactId>B2Br-LDAP</artifactId>
                      <version>1.5.1</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>br.com.gid</groupId>
                      <artifactId>GidCommons-Ws</artifactId>
                      <version>1.0.0-CR</version>
                      </dependency>
                    
                    
                      <!-- Hibernate -->
                    
                    
                      <dependency>
                      <groupId>org.hibernate.javax.persistence</groupId>
                      <artifactId>hibernate-jpa-2.0-api</artifactId>
                      <scope>provided</scope>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.hibernate</groupId>
                      <artifactId>hibernate-validator</artifactId>
                      <scope>provided</scope>
                      <exclusions>
                      <exclusion>
                      <groupId>org.slf4j</groupId>
                      <artifactId>slf4j-api</artifactId>
                      </exclusion>
                      </exclusions>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.hibernate</groupId>
                      <artifactId>hibernate-jpamodelgen</artifactId>
                      <version>1.1.1.Final</version>
                      <scope>provided</scope>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.hibernate.common</groupId>
                      <artifactId>hibernate-commons-annotations</artifactId>
                      <scope>provided</scope>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.hibernate</groupId>
                      <artifactId>hibernate-core</artifactId>
                      <scope>provided</scope>
                      </dependency>
                    
                    
                      <!-- Logs -->
                    
                    
                      <dependency>
                      <groupId>log4j</groupId>
                      <artifactId>log4j</artifactId>
                      <scope>provided</scope>
                      </dependency>
                    
                    
                      <!-- Spring -->
                    
                    
                      <dependency>
                      <groupId>org.springframework</groupId>
                      <artifactId>spring-core</artifactId>
                      <version>${org.springframework.version}</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.springframework</groupId>
                      <artifactId>spring-expression</artifactId>
                      <version>${org.springframework.version}</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.springframework</groupId>
                      <artifactId>spring-beans</artifactId>
                      <version>${org.springframework.version}</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.springframework</groupId>
                      <artifactId>spring-aop</artifactId>
                      <version>${org.springframework.version}</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.springframework</groupId>
                      <artifactId>spring-context</artifactId>
                      <version>${org.springframework.version}</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.springframework</groupId>
                      <artifactId>spring-context-support</artifactId>
                      <version>${org.springframework.version}</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.springframework</groupId>
                      <artifactId>spring-tx</artifactId>
                      <version>${org.springframework.version}</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.springframework</groupId>
                      <artifactId>spring-asm</artifactId>
                      <version>${org.springframework.version}</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.springframework</groupId>
                      <artifactId>spring-orm</artifactId>
                      <version>${org.springframework.version}</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.springframework</groupId>
                      <artifactId>spring-web</artifactId>
                      <version>${org.springframework.version}</version>
                      </dependency>
                    
                    
                    <!-- <dependency>
                      <groupId>org.jvnet.jax-ws-commons.spring</groupId>
                      <artifactId>jaxws-spring</artifactId>
                      <version>1.9</version>
                      </dependency> -->
                    
                    
                      <dependency>
                      <groupId>org.springframework.ldap</groupId>
                      <artifactId>spring-ldap-core</artifactId>
                      <version>1.3.2.RELEASE</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>joda-time</groupId>
                      <artifactId>joda-time</artifactId>
                      <scope>provided</scope>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>br.com.caelum.stella</groupId>
                      <artifactId>caelum-stella-core</artifactId>
                      <version>1.2</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>org.bouncycastle</groupId>
                      <artifactId>bcprov-jdk15</artifactId>
                      <version>1.46</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>com.thoughtworks.xstream</groupId>
                      <artifactId>xstream</artifactId>
                      <version>1.4.5</version>
                      </dependency>
                    
                    
                      <dependency>
                      <groupId>net.vidageek</groupId>
                      <artifactId>mirror</artifactId>
                      <version>1.6.1</version>
                      </dependency>
                    
                    
                      <!-- CXF -->
                    
                    
                      <dependency>
                      <groupId>org.apache.cxf</groupId>
                      <artifactId>cxf-rt-frontend-jaxws</artifactId>
                      <scope>provided</scope>
                      </dependency>
                    
                      <dependency>
                      <groupId>org.jboss.ws.cxf</groupId>
                      <artifactId>jbossws-cxf-client</artifactId>
                      <scope>provided</scope>
                      </dependency>
                    
                    
                    
                      </dependencies>
                    
                    
                      <build>
                      <finalName>Teste</finalName>
                      </build>
                    
                    
                    </project>
                    

                     

                    Thanks in advance.

                    • 7. Re: Why aren´t CXF dependencies being imported into my project?
                      Alessio Soldano Master

                      An application as shown above is not ready to be deployed on JBoss AS / WildFly. You need to make the application more "portable" (removing the cxf, spring and other un-required dependencies from the deployment) and change few things in the descriptors (first thing the web.xml). Please have a look at the documentation (Apache CXF integration - JBoss Web Services - Project Documentation Editor is a possible starting point).

                      If you don't want to change your app, which is meant for being deployed on a Servlet container, not on a full JavaEE container, you can evaluate disabling the webservices subsystem of JBoss AS / WildFly (the approach discussed in Re: How to exclude CXF jars that JBOSS 7.1.1 loads by default? ), but despite being possibly a faster solution here, that comes with disadvantages too of course.

                      1 of 1 people found this helpful
                      • 8. Re: Why aren´t CXF dependencies being imported into my project?
                        Paulo Vivacqua Newbie

                        Alessio, thanks again. I will take a look at the documentation.  Just for the record. I added the cxf as 'provided' to be able to use cxf '@InInterceptors' at compile time, otherwise I would get the error that InInterceptors could not be resolved to a type. Adding just the 'jbossws-cxf-client' dependency as suggested didn´t work.

                        • 9. Re: Why aren´t CXF dependencies being imported into my project?
                          Alessio Soldano Master

                          mmh... that's strange, jbossws-cxf-client should transitively pull cxf dependencies. Any chance you can paste me the output of "mvn dependency:tree" command against your project?

                          • 10. Re: Re: Why aren´t CXF dependencies being imported into my project?
                            Paulo Vivacqua Newbie

                            Alessio thanks very much for the response. Your help has been very important.

                             

                            I believe I finally figure it out, I had some conflicts in my pom and configured the web.xml incorrectly (I was point to an applicationContext.xml file instead of using the jbossws-cxf.xml) After removing the the cxf, spring and other un-required dependencies from the deployment and following the documentation (Apache CXF integration - JBoss Web Services - Project Documentation Editor as you suggested, I was able to deploy it without problems, just the warning bellow.

                             

                            I still haven´t understood tough why JBoss needs CXF modules in two different places: jboss-as-7.1.1.Final\modules\org\jboss\ws\cxf and jboss-as-7.1.1.Final\modules\org\apache\cxf

                             

                            My pom

                            [INFO] +- org.springframework.ldap:spring-ldap-core:jar:1.3.2.RELEASE:compile
                            [INFO] |  +- commons-logging:commons-logging:jar:1.0.4:compile
                            [INFO] |  +- org.springframework:spring-beans:jar:3.0.6.RELEASE:compile
                            [INFO] |  +- commons-lang:commons-lang:jar:2.4:compile
                            [INFO] |  +- org.springframework:spring-core:jar:3.0.6.RELEASE:compile
                            [INFO] |  |  \- org.springframework:spring-asm:jar:3.0.6.RELEASE:compile
                            [INFO] |  \- org.springframework:spring-tx:jar:3.0.6.RELEASE:compile
                            [INFO] |     +- aopalliance:aopalliance:jar:1.0:compile
                            [INFO] |     +- org.springframework:spring-aop:jar:3.0.6.RELEASE:compile
                            [INFO] |     \- org.springframework:spring-context:jar:3.0.6.RELEASE:compile
                            [INFO] |        \- org.springframework:spring-expression:jar:3.0.6.RELEASE:compile
                            [INFO] +- br.com.caelum.stella:caelum-stella-core:jar:1.2:compile
                            [INFO] +- org.bouncycastle:bcprov-jdk15:jar:1.46:compile
                            [INFO] +- com.thoughtworks.xstream:xstream:jar:1.4.5:compile
                            [INFO] |  +- xmlpull:xmlpull:jar:1.1.3.1:compile
                            [INFO] |  \- xpp3:xpp3_min:jar:1.1.4c:compile
                            [INFO] +- net.vidageek:mirror:jar:1.6.1:compile
                            [INFO] \- org.jboss.ws.cxf:jbossws-cxf-client:jar:4.2.3.Final:compile
                            [INFO]    +- org.jboss.ws:jbossws-api:jar:1.0.2.Final:compile
                            [INFO]    +- org.jboss.ws:jbossws-common:jar:2.2.3.Final:compile
                            [INFO]    |  \- jboss.jaxbintros:jboss-jaxb-intros:jar:1.0.2.GA:compile
                            [INFO]    |     \- commons-beanutils:commons-beanutils:jar:1.8.0:compile
                            [INFO]    +- org.jboss.ws:jbossws-common-tools:jar:1.2.0.Final:compile
                            [INFO]    |  \- gnu.getopt:java-getopt:jar:1.0.13:compile
                            [INFO]    +- org.jboss.ws:jbossws-spi:jar:2.2.2.Final:compile
                            [INFO]    +- org.jboss.ws.cxf:jbossws-cxf-factories:jar:4.2.3.Final:compile
                            [INFO]    +- org.jboss.ws.cxf:jbossws-cxf-transports-httpserver:jar:4.2.3.Final:compile
                            [INFO]    |  +- org.jboss.ws.projects:jaxws-jboss-httpserver-httpspi:jar:1.0.1.GA:compile
                            [INFO]    |  \- org.jboss.com.sun.httpserver:httpserver:jar:1.0.0.Final:compile
                            [INFO]    +- org.jboss.ws.cxf:jbossws-cxf-transports-udp:jar:4.2.3.Final:compile
                            [INFO]    +- org.apache.cxf:cxf-rt-bindings-soap:jar:2.7.7:compile
                            [INFO]    |  +- org.apache.cxf:cxf-api:jar:2.7.7:compile
                            [INFO]    |  |  \- org.apache.ws.xmlschema:xmlschema-core:jar:2.0.3:compile
                            [INFO]    |  \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf:cxf-rt-bindings-object:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf:cxf-rt-bindings-coloc:jar:2.7.7:compile
                            [INFO]    |  \- org.apache.cxf:cxf-rt-core:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.7.7:compile
                            [INFO]    |  +- xml-resolver:xml-resolver:jar:1.2:compile
                            [INFO]    |  +- org.apache.cxf:cxf-rt-bindings-xml:jar:2.7.7:compile
                            [INFO]    |  +- org.apache.cxf:cxf-rt-frontend-simple:jar:2.7.7:compile
                            [INFO]    |  \- org.apache.cxf:cxf-rt-ws-addr:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf:cxf-rt-transports-http:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf:cxf-rt-transports-jms:jar:2.7.7:compile
                            [INFO]    |  +- org.apache.cxf:cxf-rt-management:jar:2.7.7:compile
                            [INFO]    |  +- com.sun.xml.bind:jaxb-impl:jar:2.2.6:compile
                            [INFO]    |  \- com.sun.xml.bind:jaxb-xjc:jar:2.2.6:compile
                            [INFO]    +- org.apache.cxf:cxf-rt-transports-local:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf:cxf-rt-ws-mex:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf:cxf-rt-ws-rm:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf:cxf-rt-ws-policy:jar:2.7.7:compile
                            [INFO]    |  \- org.apache.neethi:neethi:jar:3.0.2:compile
                            [INFO]    +- org.apache.cxf:cxf-rt-ws-security:jar:2.7.7:compile
                            [INFO]    |  +- net.sf.ehcache:ehcache-core:jar:2.5.1:compile
                            [INFO]    |  \- org.apache.ws.security:wss4j:jar:1.6.12:compile
                            [INFO]    |     \- org.opensaml:opensaml:jar:2.5.1-1:compile
                            [INFO]    |        \- org.opensaml:openws:jar:1.4.2-1:compile
                            [INFO]    |           \- org.opensaml:xmltooling:jar:1.3.2-1:compile
                            [INFO]    |              \- joda-time:joda-time:jar:1.6.2:compile
                            [INFO]    +- org.apache.cxf:cxf-tools-java2ws:jar:2.7.7:compile
                            [INFO]    |  +- org.apache.cxf:cxf-tools-common:jar:2.7.7:compile
                            [INFO]    |  +- wsdl4j:wsdl4j:jar:1.6.3:compile
                            [INFO]    |  \- org.apache.cxf:cxf-rt-databinding-aegis:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf:cxf-tools-wsdlto-core:jar:2.7.7:compile
                            [INFO]    |  \- org.apache.cxf:cxf-tools-validator:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf:cxf-tools-wsdlto-databinding-jaxb:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf:cxf-tools-wsdlto-frontend-jaxws:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf.services.ws-discovery:cxf-services-ws-discovery-api:jar:2.7.7:compile
                            [INFO]    +- org.apache.cxf.xjcplugins:cxf-xjc-boolean:jar:2.6.1:compile
                            [INFO]    +- org.apache.cxf.xjcplugins:cxf-xjc-dv:jar:2.6.1:compile
                            [INFO]    +- org.apache.cxf.xjcplugins:cxf-xjc-ts:jar:2.6.1:compile
                            [INFO]    +- org.apache.velocity:velocity:jar:1.7:compile
                            [INFO]    +- commons-collections:commons-collections:jar:3.2.1:compile
                            [INFO]    +- javax.xml.stream:stax-api:jar:1.0-2:compile
                            [INFO]    +- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.12:compile
                            [INFO]    +- org.apache.santuario:xmlsec:jar:1.5.5:compile
                            [INFO]    +- org.codehaus.woodstox:woodstox-core-asl:jar:4.2.0:compile
                            [INFO]    |  \- org.codehaus.woodstox:stax2-api:jar:3.1.1:compile
                            [INFO]    +- asm:asm:jar:3.3.1:compile
                            [INFO]    +- org.jboss.spec.javax.xml.rpc:jboss-jaxrpc-api_1.1_spec:jar:1.0.1.Final:compile
                            [INFO]    |  \- org.jboss.spec.javax.servlet:jboss-servlet-api_3.0_spec:jar:1.0.1.Final:compile
                            [INFO]    +- javax.jws:jsr181-api:jar:1.0-MR1:compile
                            [INFO]    +- org.jboss.spec.javax.xml.bind:jboss-jaxb-api_2.2_spec:jar:1.0.4.Final:compile
                            [INFO]    +- org.jboss.spec.javax.xml.ws:jboss-jaxws-api_2.2_spec:jar:2.0.2.Final:compile
                            [INFO]    +- org.jboss.spec.javax.xml.soap:jboss-saaj-api_1.3_spec:jar:1.0.3.Final:compile
                            [INFO]    +- log4j:log4j:jar:1.2.16:compile
                            [INFO]    \- org.jboss.logging:jboss-logging:jar:3.1.2.GA:compile
                            
                            

                             

                            Warning.

                            40:32,542 WARN  [org.jboss.as.ee] (MSC service thread 1-4) JBAS011006: Not installing optional component org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation due to exception: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.apache.cxf.transport.http.Servlet3ContinuationProvider$Servlet3Continuation
                              at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:606)
                              at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
                              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]
                            
                            
                            • 11. Re: Why aren´t CXF dependencies being imported into my project?
                              Paulo Vivacqua Newbie

                              Hi Alessio, thanks very much for you help.

                              We had a lot of progress in our integration, but still having some problems with spring. Could you please leave your feedback on this issue : How to autowire spring beans in JBoss 7.1.1 with CXF?

                               

                              Thanks in advance.