1 2 Previous Next 21 Replies Latest reply on Sep 27, 2013 3:55 PM by jesse.demarco

    Apache CXF 2.5.2 & JBOSS 7.1.1 Final

    larvender

      After I deploy this application.  The server throws these error.

       

      Evironment: apache cxf 2.5.2 and JBOSS 7.1.1 Final. 

       

      My lib.

      activemq-core-5.4.2.jar

      aopalliance-1.0.jar

      commons-collections-3.2.1.jar

      commons-lang-2.6.jar

      commons-logging-1.1.1.jar

      commons-pool-1.6.jar

      cxf-2.5.2.jar

      cxf-manifest.jar

      cxf-services-sts-core-2.5.2.jar

      cxf-services-wsn-api-2.5.2.jar

      cxf-services-wsn-core-2.5.2.jar

      cxf-xjc-boolean-2.4.0.jar

      cxf-xjc-bug671-2.4.0.jar

      cxf-xjc-dv-2.4.0.jar

      cxf-xjc-ts-2.4.0.jar

      FastInfoset-1.2.9.jar

      geronimo-activation_1.1_spec-1.1.jar

      geronimo-annotation_1.0_spec-1.1.1.jar

      geronimo-javamail_1.4_spec-1.7.1.jar

      geronimo-jaxws_2.2_spec-1.1.jar

      geronimo-jms_1.1_spec-1.1.1.jar

      geronimo-servlet_2.5_spec-1.1.2.jar

      geronimo-stax-api_1.0_spec-1.0.1.jar

      geronimo-ws-metadata_2.0_spec-1.1.3.jar

      gxserver5.2.5.jar

      jaxb-api-2.2.3.jar

      jaxb-impl-2.2.4-1.jar

      jettison-1.3.1.jar

      jetty-continuation-7.5.4.v20111024.jar

      jetty-http-7.5.4.v20111024.jar

      jetty-io-7.5.4.v20111024.jar

      jetty-server-7.5.4.v20111024.jar

      jetty-util-7.5.4.v20111024.jar

      jra-1.0-alpha-4.jar

      js-1.7R2.jar

      jsr311-api-1.1.1.jar

      log4j-1.2.13.jar

      neethi-3.0.1.jar

      saaj-api-1.3.4.jar

      saaj-impl-1.3.12.jar

      slf4j-api-1.6.2.jar

      slf4j-jdk14-1.6.2.jar

      spring-aop-3.0.6.RELEASE.jar

      spring-asm-3.0.6.RELEASE.jar

      spring-beans-3.0.6.RELEASE.jar

      spring-context-3.0.6.RELEASE.jar

      spring-core-3.0.6.RELEASE.jar

      spring-expression-3.0.6.RELEASE.jar

      spring-jms-3.0.6.RELEASE.jar

      spring-ldap-core-1.3.1.RELEASE.jar

      spring-tx-3.0.6.RELEASE.jar

      spring-web-3.0.6.RELEASE.jar

      stax2-api-3.1.1.jar

      velocity-1.7.jar

      woodstox-core-asl-4.1.1.jar

      wsdl4j-1.6.2.jar

      wss4j-1.6.4.jar

       

       

      These are the error.

      17:25:05,898 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."VPlusGateway.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."VPlusGateway.war".INSTALL: Failed to process phase INSTALL of deployment "VPlusGateway.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:886) [rt.jar:1.6.0_23]

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_23]

                at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_23]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component org.apache.cxf.wsn.client.Publisher

                at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)

                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: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.apache.cxf.wsn.client.Publisher

                at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:606)

                at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)

                ... 6 more

       

       

      17:25:05,914 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "VPlusGateway.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"VPlusGateway.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"VPlusGateway.war\".INSTALL: Failed to process phase INSTALL of deployment \"VPlusGateway.war\""}}

      17:25:08,164 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment VPlusGateway.war in 2230ms

      17:25:08,164 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

       

       

      These are my classes.

      Interface: IAccountInformation

      import javax.jws.WebMethod;
      import javax.jws.WebService;
      import javax.jws.soap.SOAPBinding;
      import javax.jws.soap.SOAPBinding.Style;
      import javax.jws.soap.SOAPBinding.Use;
      import javax.xml.ws.BindingType;
      
      
      @WebService
      @SOAPBinding(style=Style.DOCUMENT, use=Use.ENCODED)
      @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
      public interface IAccountInformation {
      
      
                @WebMethod
                long sum(long a, long b);
      }
      

       

       

      Class: AccountInformation

      @WebService(endpointInterface="com.xxxx.ws.interfaces.IAccountInformation", serviceName="accountInformation")
      public class AccountInformation implements IAccountInformation {
      
      
                @Override
                public long sum(long a, long b) {
                          return a+b;
                }
      
      
      }
      

       

       

      And my xml files.

      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>VPlusGateway</display-name>
                <welcome-file-list>
                          <welcome-file>index.html</welcome-file>
                          <welcome-file>index.htm</welcome-file>
                          <welcome-file>index.jsp</welcome-file>
                          <welcome-file>default.html</welcome-file>
                          <welcome-file>default.htm</welcome-file>
                          <welcome-file>default.jsp</welcome-file>
                </welcome-file-list>
      
      
                <context-param>
                          <param-name>contextConfigLocation</param-name>
                          <param-value>classpath:vPlusContext.xml</param-value>
                </context-param>
      
      
                <listener>
                          <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
                </listener>
      
      
                <servlet>
                          <servlet-name>CXFServlet</servlet-name>
                          <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
                </servlet>
                <servlet-mapping>
                          <servlet-name>CXFServlet</servlet-name>
                          <url-pattern>/services/*</url-pattern>
                </servlet-mapping>
      </web-app>
      
      

       

      vplusContext.xml

      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
                xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:soap="http://cxf.apache.org/bindings/soap"
                xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
                          http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
                          http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd
                          http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd">
      
      
                <import resource="classpath:META-INF/cxf/cxf.xml" />
                <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
                <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
      
      
                <!-- WSDL -->
                <jaxws:endpoint id="accountInfo"
                          implementor="com.xxxx.ws.implement.AccountInformation" address="/wsdl/account"/>
      
      
      
      
                <!-- REST -->
                <jaxrs:server id="myService" address="/rest/a">
                          <jaxrs:serviceBeans>
                                    <ref bean="accountRS" />
                          </jaxrs:serviceBeans>
                </jaxrs:server>
      
      
                <bean id="accountRS" class="com.xxxx.ws.implement.AccountRS" />
      
      
      </beans>
      
      

       

      cxf-extension-soap.xml

      <?xml version="1.0" encoding="UTF-8"?>
      
      
      <beans xmlns="http://www.springframework.org/schema/beans"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:foo="http://cxf.apache.org/configuration/foo"
                xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
      
      
                <bean id="org.apache.cxf.binding.soap.SoapBindingFactory" class="org.apache.cxf.bus.spring.OldSpringSupport"
                          lazy-init="true">
                          <constructor-arg ref="cxf" />
                          <constructor-arg value="org.apache.cxf.binding.soap.SoapBindingFactory" />
                          <constructor-arg value="cxf-extension-soap.xml" />
                </bean>
                <bean id="org.apache.cxf.binding.soap.SoapTransportFactory" class="org.apache.cxf.bus.spring.OldSpringSupport"
                          lazy-init="true">
                          <constructor-arg ref="cxf" />
                          <constructor-arg value="org.apache.cxf.binding.soap.SoapTransportFactory" />
                </bean>
      
      
      
      
                <bean id="org.apache.cxf.binding.soap.customEditorConfigurer"
                          class="org.springframework.beans.factory.config.CustomEditorConfigurer">
                          <property name="propertyEditorRegistrars">
                                    <list>
                                              <bean class="org.apache.cxf.binding.soap.spring.SoapVersionRegistrar" />
                                    </list>
                          </property>
                </bean>
      </beans>
      
      

       

      cxf-servlet.xml

      <?xml version="1.0" encoding="UTF-8"?>
      
      
      <beans xmlns="http://www.springframework.org/schema/beans"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws"
                xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                          http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
      
      
      
      
      </beans>
      

       

      cfx.xml

      <?xml version="1.0" encoding="UTF-8"?>
      
      
      <beans xmlns="http://www.springframework.org/schema/beans"
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
                xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
      
      
                <bean id="cxf" class="org.apache.cxf.bus.spring.SpringBus"
                          destroy-method="shutdown" />
      
      
      
      
                <bean id="org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor"
                          class="org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor" />
                <bean id="org.apache.cxf.bus.spring.Jsr250BeanPostProcessor"
                          class="org.apache.cxf.bus.spring.Jsr250BeanPostProcessor" />
                <bean id="org.apache.cxf.bus.spring.BusExtensionPostProcessor"
                          class="org.apache.cxf.bus.spring.BusExtensionPostProcessor" />
      
      
      </beans>
      
      

       

      Please help me solve this problem.

       

      Thansk you in advance.

      PS. This application can run on JBOSS 6.x Final

        • 1. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
          ropalka

          JBossAS comes with CXF so you shouldn't bundle cxf in you jars/ears.

          Please follow this documentation:

           

          https://docs.jboss.org/author/display/JBWS/JBoss+Web+Services+Documentation

          • 2. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
            larvender

            Thanks you for your answer.

            JBossAS comes with CXF so you shouldn't bundle cxf in you jars/ears.

            Please follow this documentation:

             

            https://docs.jboss.org/author/display/JBWS/JBoss+Web+Services+Documentation

             

            But I want to use Apache CXF, is it possible to use?

            • 3. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
              sfcoy

              Is this a new application, or something that you're migrating (from a servlet container perhaps)?

               

              The documentation referenced above describes how to to use Apache CXF if you need to do that.

               

              Note that at least 19 of the jars in your WEB-INF/lib above implement standard JEE APIs and should be removed, otherwise you will have all sorts of issues.

              • 4. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
                larvender

                Migration from jboss 6.x to jboss 7.1.1 final

                Is this a new application, or something that you're migrating (from a servlet container perhaps)?

                 

                The documentation referenced above describes how to to use Apache CXF if you need to do that.

                 

                Note that at least 19 of the jars in your WEB-INF/lib above implement standard JEE APIs and should be removed, otherwise you will have all sorts of issues.

                 

                I can't find reference "how to use Apache cxf" in https://docs.jboss.org/author/display/JBWS/JBoss+Web+Services+Documentation. (I hope, you don't mean this link"https://docs.jboss.org/author/display/JBWS/Apache+CXF+integration", that describe apache cxf.  Would you send the reference or the information about "how to use / config apache cxf in jboss 7" ? )

                • 5. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
                  sfcoy

                  Well, we did mean that link...

                   

                  In any event, JBoss AS 7.1 comes with Apache CXF 2.4.6, so I guess that is the point. You want to use 2.5.2.

                   

                  I think that you will need to follow a similar strategy to what is used when people want to use different versions of Hibernate.

                   

                  This means that you will need to read and understand Class Loading in AS7, in particular the section headed "JBoss Deployment Structure File".

                   

                  I'm curious to know what CXF features that you're using, and why the stock JAX-WS APIs are not useful for you.

                  • 6. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
                    larvender

                    I will try to do.

                    If you have any suggestion,  please tell me.

                    Thanks you very much.

                    • 7. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
                      manishkp84

                      hi Saroch,

                       

                      Did you find the solution for this..

                       

                      Thanks

                      Manish

                      • 8. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
                        ctomc

                        you can take latest nightly builds of as7 which come with cxf 2.6.1

                         

                         

                        --

                        tomaz

                        • 9. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
                          manishkp84

                          Tomaz my application is working fine in JBoss 7.0.2 .. but not in JBoss 7.1.1..

                           

                           

                          18:43:39,438 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed to start service jboss.deployment.unit."Final07112012.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."Final07112012.war".INSTALL: Failed to process phase INSTALL of deployment "Final07112012.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:886) [rt.jar:1.6.0_21]

                                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_21]

                                    at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_21]

                          Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component org.apache.cxf.wsn.client.Publisher

                                    at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)

                                    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: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.apache.cxf.wsn.client.Publisher

                                    at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:606)

                                    at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)

                                    ... 6 more

                           

                           

                          18:43:39,455 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "Final07112012.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"Final07112012.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"Final07112012.war\".INSTALL: Failed to process phase INSTALL of deployment \"Final07112012.war\""}}

                          18:43:40,305 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015877: Stopped deployment Final07112012.war in 849ms

                          18:43:40,307 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report

                          JBAS014777:   Services which failed to start:      service jboss.deployment.unit."Final07112012.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."Final07112012.war".INSTALL: Failed to process phase INSTALL of deployment "Final07112012.war"

                           

                           

                          18:43:40,310 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.\"Final07112012.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"Final07112012.war\".INSTALL: Failed to process phase INSTALL of deployment \"Final07112012.war\""}}}}

                           

                           

                          i am facing this issue can you please help me

                           

                          Thanks

                          Manish

                          • 10. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
                            larvender

                            Hi Manish

                            In this case, I use apache cxf 2.4.6 in jboss 7.1.1 final.  And that's work!, while 2.5.2 fail.

                            I think, It occure from lib that depent on jboss and apache cxf 2.5.2

                            • 11. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
                              manishkp84

                              Saroch Hengpaisand wrote:

                               

                              Hi Manish

                              In this case, I use apache cxf 2.4.6 in jboss 7.1.1 final.  And that's work!, while 2.5.2 fail.

                              I think, It occure from lib that depent on jboss and apache cxf 2.5.2

                              thanks it is working

                              • 12. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
                                steljboss

                                If it is isolation that you need in order for your application not to rely on the server supplied APIs then I have found the following resources helpful in implementing Rest Services on JBoss using Apache CXF JAX-RS APIs

                                 

                                http://fandry.blogspot.gr/2012/05/rest-api-with-cxf-and-spring.html

                                 

                                The steps I performed was to

                                a) exclude stock JAX-RS from the server configuration

                                b) create the org.apache.cxf and org.springframework.spring modules in the server

                                c) create the jboss-deployment-structure.xml based on the article information (plus springframework)

                                 

                                And that was all

                                • 13. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final

                                  Hello,

                                   

                                  I try to migrate our application which has Camel with Apache CXF. to JBoss 7.1

                                   

                                  During deployment I get following exception:  java.lang.ClassNotFoundException: org.apache.cxf.transport.servlet.CXFServlet

                                  I've looked into ear and I can find this class.

                                   

                                  I also tried to set the maven dependencies for CXF to provided, so that the libraries from JBoss should be used. But it still doesnt work.

                                   

                                  Does anybody have experience about this case??

                                   

                                   

                                  thank you

                                  • 14. Re: Apache CXF 2.5.2 & JBOSS 7.1.1 Final
                                    larvender

                                    Dear Vova Kurilow,

                                     

                                    Could you give the libraries that you use?

                                    1 2 Previous Next