3 Replies Latest reply on Jun 5, 2013 3:48 PM by dkakunsi

    Jboss 7.1: Spring based CXF WebService bean injection failed.

    hhiep Newbie

      Hi,

       

      My webservice (using cxf 2.4.6, spring 3.0.6) can deploy and run OK on Jboss 7.0.2 Final. But on JBoss 7.1 (I test with 7.1.1 Final, and 7.1.0 Beta1b) this service can deployed with no error, but when client call method of service there is nullPointerException, caused by subservice that is a bean injected to the webservice is null at runtime.

      I based on this link http://middlewaremagic.com/jboss/?p=1106 to create my test service.

       

      Is there anything changed about bean injection on Jboss 7.1?

       

      Thank you,

      Hiep

       

      This is my configs file and error log:

      web.xml

       

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.5"
               xmlns="http://java.sun.com/xml/ns/javaee"
               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
      
      
           <context-param>
              <param-name>contextConfigLocation</param-name>
              <param-value>/WEB-INF/appContext.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>/*</url-pattern>
          </servlet-mapping>   
      </web-app>
      
      

       

       

      appContext.xml

       

      <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.xsd
                                  http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
      
              <!--
                <import resource="classpath:META-INF/cxf/cxf.xml" />
                <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
              -->
      
                <bean id="subServiceBean" class="SubServiceImpl"></bean>
      
                <bean id="springCxfServiceBean" class="Spring_CXF_Service">
                          <property name="subService" ref="subServiceBean"/>
                </bean>
      
                  <jaxws:endpoint
                  id="cxfSpringServiceHelloWorld"
                  implementor="#springCxfServiceBean"
                  address="/Spring_CXF_Service" />
      </beans>
      
      

       

       

      Implement service:

      Interface Spring_CXF_Service_Intf .java

       

      import javax.jws.WebService; 
      
      @WebService
      public interface Spring_CXF_Service_Intf 
      {
        public String sayHello(String name);
      
                public String sayHi(String name);
      }
      
      

       

      implementation:

       

      import javax.jws.WebService;
      
      
      @WebService(endpointInterface = "Spring_CXF_Service_Intf")
      public class Spring_CXF_Service implements Spring_CXF_Service_Intf {
      
                private SubService subService;
      
                public void setSubService(SubService subService) {
                               this.subService = subService;
                }
      
                public String sayHello(String name) {
                          System.out.println("[Spring_CXF_Service] sayHello(" + name
                                              + ") invoked.");
                               return "Hello World !!! Mr. " + name;
                }
      
                public String sayHi(String name) {
      
              return subService.sayHi(name);
                }
      }
      

       

       

      SubService.java

       

      public interface SubService { 
      
                public String sayHi(String name);
      }
      

       

      SubServiceImpl .java

       

      public class SubServiceImpl implements SubService {
                public String sayHi(String name) {
                          return "Hi all!";
                }
      }
      

       

      ====== Exception:

       

       

      18:43:06,352 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-6) Creating Service {http://unknown.namespace/}Spring_
      CXF_ServiceService from class Spring_CXF_Service_Intf
      18:43:06,614 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-6) Setting the server's publish address to be /Spring_CXF_Service
      18:43:06,624 INFO  [org.springframework.web.context.ContextLoader] (MSC service thread 1-6) Root WebApplicationContext: initialization completed in 734 ms
      18:43:06,702 INFO  [org.jboss.web] (MSC service thread 1-6) registering web context: /bean
      18:43:06,752 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "bean.war"
      18:43:20,864 INFO  [stdout] (http-user-PC-192.168.1.102-8080-1) [Spring_CXF_Service] sayHello(Middleware Magic) invoked.
      18:43:20,988 ERROR [org.jboss.ws.common.invocation.InvocationHandlerJAXWS] (http-user-PC-192.168.1.102-8080-1) Method invocation failed with exception: null:
      java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_30]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_30]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_30]
              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_30]
              at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111)
              at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:169)
              at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:117)
              at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) [cxf-rt-core-2.4.6.jar:]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_30]
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_30]
              at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_30]
              at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) [cxf-rt-core-2.4.6.jar:]
              at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) [cxf-rt-core-2.4.6.jar:]
              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) [cxf-api-2.4.6.jar:]
              at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-rt-core-2.4.6.jar:]
              at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:206) [cxf-rt-transports-http-2.4.6.jar:]
              at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)
              at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:174)
              at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184) [cxf-rt-transports-http-2.4.6.jar:]
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107) [cxf-rt-transports-http-2.4.6.jar:]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:]
              at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
              at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.0.0.CR1.jar:]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:]
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.3.Final.jar:]
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.3.Final.jar:]
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.3.Final.jar:]
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.3.Final.jar:]
              at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
              at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151) [jboss-as-web-7.1.0.Beta1b.jar:]
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.3.Final.jar:]
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.3.Final.jar:]
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.3.Final.jar:]
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.3.Final.jar:]
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.3.Final.jar:]
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.3.Final.jar:]
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.3.Final.jar:]
              at java.lang.Thread.run(Thread.java:662) [:1.6.0_30]
      Caused by: java.lang.NullPointerException
              at Spring_CXF_Service.sayHi(Spring_CXF_Service.java:20) ... 40 more
      
      
      
      
      18:43:20,999 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (http-user-PC-192.168.1.102-8080-1) Application {http:///}Spring_CXF_ServiceService#{http:/
      /unknown.namespace/}sayHi has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault
              at org.jboss.wsf.stack.cxf.JBossWSInvoker.createFault(JBossWSInvoker.java:234)
              at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:189)
              at org.jboss.wsf.stack.cxf.JBossWSInvoker.invoke(JBossWSInvoker.java:117)
              at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) [cxf-rt-core-2.4.6.jar:]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [:1.6.0_30]
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_30]
              at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_30]
              at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) [cxf-rt-core-2.4.6.jar:]
              at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) [cxf-rt-core-2.4.6.jar:]
              at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) [cxf-api-2.4.6.jar:]
              at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121) [cxf-rt-core-2.4.6.jar:]
              at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:206) [cxf-rt-transports-http-2.4.6.jar:]
              at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)
              at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:174)
              at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184) [cxf-rt-transports-http-2.4.6.jar:]
              at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107) [cxf-rt-transports-http-2.4.6.jar:]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:]
              at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
              at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.0.0.CR1.jar:]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:]
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.3.Final.jar:]
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.3.Final.jar:]
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.3.Final.jar:]
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.3.Final.jar:]
              at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
              at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
              at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151) [jboss-as-web-7.1.0.Beta1b.jar:]
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.3.Final.jar:]
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.3.Final.jar:]
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.3.Final.jar:]
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.3.Final.jar:]
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.3.Final.jar:]
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.3.Final.jar:]
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.3.Final.jar:]
              at java.lang.Thread.run(Thread.java:662) [:1.6.0_30]
      Caused by: java.lang.NullPointerException
              at Spring_CXF_Service.sayHi(Spring_CXF_Service.java:20) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_30]
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_30]
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_30]
              at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_30]
              at org.jboss.ws.common.invocation.AbstractInvocationHandlerJSE.invoke(AbstractInvocationHandlerJSE.java:111)
              at org.jboss.wsf.stack.cxf.JBossWSInvoker._invokeInternal(JBossWSInvoker.java:169)
              ... 34 more
      
      
        • 1. Re: Jboss 7.1: Spring based CXF WebService bean injection failed.
          hhiep Newbie

          More information, when I change bean injected above to constructor-based dependency injection:

          + Jboss 7.0.2: Deploy and run service success

          + Jboss 7.1: deploy failed:

               

          16:48:49,831 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.deployment.unit."bean.war".INSTALL: org.jbos
          s.msc.service.StartException in service jboss.deployment.unit."bean.war".INSTALL: Failed to process phase INSTALL of deployment "bean.war"
                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.Beta1b.jar:]
                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:]
                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_30]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_30]
                  at java.lang.Thread.run(Thread.java:662) [:1.6.0_30]
          Caused by: java.lang.RuntimeException: java.lang.InstantiationException: Spring_CXF_Service
                  at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.newInstance(NonSpringBusHolder.java:174)
                  at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:96)
                  at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:109)
                  at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:132)
                  at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.Beta1b.jar:]
                  ... 5 more
          Caused by: java.lang.InstantiationException: Spring_CXF_Service
                  at java.lang.Class.newInstance0(Class.java:340) [:1.6.0_30]
                  at java.lang.Class.newInstance(Class.java:308) [:1.6.0_30]
                  at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.newInstance(NonSpringBusHolder.java:170)
                  ... 10 more
          
          

           

           

          Could anyone give me some suggestions?

           

          Thanks you.

           

           

          New Config files:

          appContext.xml

           

          <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.xsd
                                      http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> 
          
                  <!--
                    <import resource="classpath:META-INF/cxf/cxf.xml" />
                    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
                  -->
          
                    <bean id="subServiceBean" class="SubServiceImpl"></bean>
            
                    <bean id="springCxfServiceBean" class="Spring_CXF_Service">
                              <constructor-arg><ref bean="subServiceBean"/></constructor-arg>
                    </bean>
                      
                      <jaxws:endpoint
                      id="cxfSpringServiceHelloWorld"
                      implementor="#springCxfServiceBean"
                      address="/Spring_CXF_Service" /> 
          </beans>
          
          

           

          Spring_CXF_service.java

           

          import javax.jws.WebService; 
          
          @WebService(endpointInterface = "Spring_CXF_Service_Intf")
          public class Spring_CXF_Service implements Spring_CXF_Service_Intf {
            
                    private SubService subService;
            
                    public Spring_CXF_Service(){
                    }
            
                    public Spring_CXF_Service(SubService subService){
                              this.subService = subService;
                    }
            
                    public String sayHello(String name) {
                              System.out.println("[Spring_CXF_Service] sayHello(" + name
                                                  + ") invoked.");
                              return "Hello World !!! Mr. " + name;
                    }
          
          
                    public String sayHi(String name) { 
                              return subService.sayHi(name);
                    }
          }
          
          

           

          Service log:

           

          D:\Projects\ProjectA__4\Up_Jboss_7.1.1.Final\Run\jboss-as-7.1.0.Beta1b\bin>standalone.bat -c standalone-ha.xml -b 192.168.1.102 -u 230.0.0.4 -Djboss.server.
          base.dir=../standalone-node1 -Djboss.node.name=node1
          Calling "D:\Projects\ProjectA__4\Up_Jboss_7.1.1.Final\Run\jboss-as-7.1.0.Beta1b\bin\standalone.conf.bat"
          ===============================================================================
          
          
            JBoss Bootstrap Environment
          
          
            JBOSS_HOME: D:\Projects\ProjectA__4\Up_Jboss_7.1.1.Final\Run\jboss-as-7.1.0.Beta1b
          
          
            JAVA: C:\Program Files\Java\jdk1.6.0_30\bin\java
          
          
            JAVA_OPTS: -Dprogram.name=standalone.bat -Xms64M -Xmx512M -XX:MaxPermSize=256M -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600
          000 -Dorg.jboss.resolver.warning=true -Djboss.modules.system.pkgs=org.jboss.byteman -server
          
          
          ===============================================================================
          
          
          16:48:36,276 INFO  [org.jboss.modules] JBoss Modules version 1.1.0.CR4
          16:48:37,662 INFO  [org.jboss.msc] JBoss MSC version 1.0.1.GA
          16:48:37,902 INFO  [org.jboss.as] JBoss AS 7.1.0.Beta1b "Tesla" starting
          16:48:42,640 INFO  [org.xnio] XNIO Version 3.0.0.CR5
          16:48:42,699 INFO  [org.jboss.as] Creating http management service using  socket-binding (management-http)
          16:48:42,709 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.0.CR5
          16:48:42,798 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
          16:48:42,808 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 50) Activating Security Subsystem
          16:48:42,848 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 45) JBAS011910: Activating OSGi Subsystem
          16:48:42,881 INFO  [org.jboss.as.clustering] (ServerService Thread Pool -- 33) JBAS010300: Activating Infinispan subsystem.
          16:48:42,906 INFO  [org.jboss.as.security] (MSC service thread 1-3) Picketbox version=4.0.6.Beta1
          16:48:43,113 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 44) JBAS011800: Activating Naming Subsystem
          16:48:43,176 INFO  [org.jboss.as.clustering] (ServerService Thread Pool -- 38) JBAS010360: Activating JGroups subsystem.
          16:48:43,177 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 54) JBAS015537: Activating WebServices Extension
          16:48:43,504 INFO  [org.jboss.as.connector] (MSC service thread 1-4) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.5.Final)
          16:48:44,015 INFO  [org.apache.catalina.core.AprLifecycleListener] (MSC service thread 1-2) The Apache Tomcat Native library which allows optimal performance
           in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.6.0_30\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Wind
          ows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\DMIX;C:\Program Files\Microsof
          t SQL Server\90\Tools\binn\;C:\Program Files\Java\jdk1.6.0_30\bin;C:\Program Files\TortoiseSVN\bin;D:\Softwares\maven\bin;C:\Program Files\Quest Software\JPr
          obe 9.0.1\bin;D:\Softwares\apache-ant-1.8.4\bin;C:\Program Files\SSH Communications Security\SSH Secure Shell;D:\Projects\Memory leaks\jboss-profiler-1.0.CR4
          \jvmti\native\win32;.
          16:48:44,912 WARN  [org.jboss.as.messaging] (MSC service thread 1-4) JBAS011600: AIO wasn't located on this platform, it will fall back to using pure Java NI
          O. If your platform is Linux, install LibAIO to enable the AIO journal
          16:48:44,919 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 29) JBAS010403: Deploying JDBC-compliant driver class org.h2
          .Driver (version 1.3)
          16:48:45,404 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service
          16:48:45,945 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-5) null null
          16:48:46,055 INFO  [org.jboss.as.remoting] (MSC service thread 1-7) Listening on user-PC/192.168.1.102:4447
          16:48:46,063 INFO  [org.jboss.as.remoting] (MSC service thread 1-7) Listening on /127.0.0.1:9999
          16:48:46,117 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-5) JBAS015400: Bound mail session [java:jboss/mail/Default]
          16:48:46,120 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Starting Coyote HTTP/1.1 on http-user-PC-192.168.1.102-8080
          16:48:46,159 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) live server is starting with configuration HornetQ Configuration
           (clustered=false,backup=false,sharedStore=true,journalDirectory=D:\Projects\ProjectA__4\Up_Jboss_7.1.1.Final\Run\jboss-as-7.1.0.Beta1b\bin\..\standalone-no
          de1\data\messagingjournal,bindingsDirectory=D:\Projects\ProjectA__4\Up_Jboss_7.1.1.Final\Run\jboss-as-7.1.0.Beta1b\bin\..\standalone-node1\data\messagingbin
          dings,largeMessagesDirectory=D:\Projects\ProjectA__4\Up_Jboss_7.1.1.Final\Run\jboss-as-7.1.0.Beta1b\bin\..\standalone-node1\data\messaginglargemessages,pagi
          ngDirectory=D:\Projects\ProjectA__4\Up_Jboss_7.1.1.Final\Run\jboss-as-7.1.0.Beta1b\bin\..\standalone-node1\data\messagingpaging)
          16:48:46,637 WARNING [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) Security risk! It has been detected that the cluster admin use
          r and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this.
          16:48:46,822 WARN  [jacorb.codeset] (MSC service thread 1-3) Warning - unknown codeset (Cp1252) - defaulting to ISO-8859-1
          16:48:46,957 INFO  [org.jboss.as.modcluster] (MSC service thread 1-8) JBAS011704: Mod_cluster uses default load balancer provider
          16:48:46,963 INFO  [org.jboss.as.jacorb] (MSC service thread 1-3) CORBA ORB Service Started
          16:48:47,091 INFO  [org.jboss.modcluster.ModClusterService] (MSC service thread 1-8) Initializing mod_cluster 1.1.3.Final
          16:48:47,368 INFO  [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-1) Started Netty Acceptor version 3.2.3.Final-r${buildNumber} H
          iep-PC:5445 for CORE protocol
          16:48:47,369 INFO  [org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (MSC service thread 1-8) Listening to proxy advertisements on 224.0.1.105:2336
          4
          16:48:47,372 INFO  [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-1) Started Netty Acceptor version 3.2.3.Final-r${buildNumber} H
          iep-PC:5455 for CORE protocol
          16:48:47,374 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) Server is now live
          16:48:47,374 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) HornetQ Server version 2.2.7.Final (HQ_2_2_7_FINAL_AS7, 121) [60
          03cb00-d712-11e1-b89f-3860777bc2a7] started
          16:48:47,379 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-5) trying to deploy queue jms.topic.testTopic
          16:48:47,509 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-7) JBAS015012: Started FileSystemDeploymentService for directory D:\Project
          s\ProjectA__4\Up_Jboss_7.1.1.Final\Run\jboss-as-7.1.0.Beta1b\bin\..\standalone-node1\deployments
          16:48:47,598 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
          16:48:47,602 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-2) JBAS010406: Registered connection factory java:/JmsXA
          16:48:47,608 INFO  [org.hornetq.ra.HornetQResourceAdapter] (MSC service thread 1-2) HornetQ resource adaptor started
          16:48:47,608 INFO  [org.jboss.as.connector.services.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-2) IJ020002: Deployed: fi
          le://RaActivatorhornetq-ra
          16:48:47,611 INFO  [org.jboss.as.deployment.connector] (MSC service thread 1-2) JBAS010401: Bound JCA ConnectionFactory [java:/JmsXA]
          16:48:47,660 INFO  [org.jboss.as.jacorb] (MSC service thread 1-3) CORBA Naming Service Started
          16:48:47,821 INFO  [org.jboss.as.messaging] (MSC service thread 1-5) JBAS011601: Bound messaging object to jndi name java:/topic/test
          16:48:47,839 INFO  [org.jboss.as.messaging] (MSC service thread 1-8) JBAS011601: Bound messaging object to jndi name java:/RemoteConnectionFactory
          16:48:47,841 INFO  [org.jboss.as.messaging] (MSC service thread 1-1) JBAS011601: Bound messaging object to jndi name java:/ConnectionFactory
          16:48:47,842 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-4) trying to deploy queue jms.queue.testQueue
          16:48:47,863 INFO  [org.jboss.as.messaging] (MSC service thread 1-4) JBAS011601: Bound messaging object to jndi name java:/queue/test
          16:48:47,890 INFO  [org.jboss.as] (Controller Boot Thread) JBoss AS 7.1.0.Beta1b "Tesla" started in 12327ms - Started 151 of 235 services (83 services are pa
          ssive or on-demand)
          16:48:47,910 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "bean.war"
          16:48:48,717 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) Class Path entry jaxb-api.jar in "/D:/Projects/ProjectA__4/Up_Jboss_7.1.1.Final
          /Run/jboss-as-7.1.0.Beta1b/bin/content/bean.war/WEB-INF/lib/jaxb-impl-2.1.13.jar"  does not point to a valid jar for a Class-Path reference.
          16:48:48,718 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) Class Path entry activation.jar in "/D:/Projects/ProjectA__4/Up_Jboss_7.1.1.Fin
          al/Run/jboss-as-7.1.0.Beta1b/bin/content/bean.war/WEB-INF/lib/jaxb-impl-2.1.13.jar"  does not point to a valid jar for a Class-Path reference.
          16:48:48,718 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) Class Path entry jsr173_1.0_api.jar in "/D:/Projects/ProjectA__4/Up_Jboss_7.1.1
          .Final/Run/jboss-as-7.1.0.Beta1b/bin/content/bean.war/WEB-INF/lib/jaxb-impl-2.1.13.jar"  does not point to a valid jar for a Class-Path reference.
          16:48:48,720 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-6) Class Path entry jaxb1-impl.jar in "/D:/Projects/ProjectA__4/Up_Jboss_7.1.1.Fin
          al/Run/jboss-as-7.1.0.Beta1b/bin/content/bean.war/WEB-INF/lib/jaxb-impl-2.1.13.jar"  does not point to a valid jar for a Class-Path reference.
          16:48:48,814 WARN  [org.jboss.as.server.deployment.service-loader] (MSC service thread 1-6) Encountered invalid class name "org.springframework.context.Appli
          cationContext,org.springframework.beans.BeansException" for service type "org.apache.cxf.bus.factory"
          16:48:49,288 INFO  [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-6) Add Service
           id=Spring_CXF_Service
           address=http://192.168.1.102:8080/bean/Spring_CXF_Service
           implementor=Spring_CXF_Service
           invoker=org.jboss.wsf.stack.cxf.JBossWSInvoker
           serviceName={http:///}Spring_CXF_ServiceService
           portName={http:///}Spring_CXF_ServicePort
           wsdlLocation=null
           mtomEnabled=false
          16:48:49,290 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-6) register: jboss.ws:context=bean,endpoint=Spring_CXF_Serv
          ice
          16:48:49,830 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-6) remove: jboss.ws:context=bean,endpoint=Spring_CXF_Servic
          e
          16:48:49,831 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001: Failed to start service jboss.deployment.unit."bean.war".INSTALL: org.jbos
          s.msc.service.StartException in service jboss.deployment.unit."bean.war".INSTALL: Failed to process phase INSTALL of deployment "bean.war"
                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.1.0.Beta1b.jar:]
                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:]
                  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_30]
                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_30]
                  at java.lang.Thread.run(Thread.java:662) [:1.6.0_30]
          Caused by: java.lang.RuntimeException: java.lang.InstantiationException: Spring_CXF_Service
                  at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.newInstance(NonSpringBusHolder.java:174)
                  at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:96)
                  at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:109)
                  at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:132)
                  at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)
                  at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.1.0.Beta1b.jar:]
                  ... 5 more
          Caused by: java.lang.InstantiationException: Spring_CXF_Service
                  at java.lang.Class.newInstance0(Class.java:340) [:1.6.0_30]
                  at java.lang.Class.newInstance(Class.java:308) [:1.6.0_30]
                  at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.newInstance(NonSpringBusHolder.java:170)
                  ... 10 more
          
          
          16:48:49,836 INFO  [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployment of "bean.war" was rolled back with failure message {"JBAS01467
          1: Failed services" => {"jboss.deployment.unit.\"bean.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"bean.war\".I
          NSTALL: Failed to process phase INSTALL of deployment \"bean.war\""}}
          16:48:49,900 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Stopped deployment bean.war in 63ms
          16:48:49,900 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
          JBAS014777:   Services which failed to start:      service jboss.deployment.unit."bean.war".INSTALL: org.jboss.msc.service.StartException in service jboss.de
          ployment.unit."bean.war".INSTALL: Failed to process phase INSTALL of deployment "bean.war"
          
          
          16:48:49,901 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Ste
          ps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"bean.war\".INSTALL" => "org.jboss.msc.service.StartExc
          eption in service jboss.deployment.unit.\"bean.war\".INSTALL: Failed to process phase INSTALL of deployment \"bean.war\""}}}}
          
          
          • 2. Re: Jboss 7.1: Spring based CXF WebService bean injection failed.
            Richard Opalka Master

            Your approach is wrong.

            Please follow instructions here:

            https://community.jboss.org/wiki/JBossWS

            Don't provide/define appContext.xml at all

            • 3. Re: Jboss 7.1: Spring based CXF WebService bean injection failed.
              dkakunsi Newbie

              I have the same problem.. have you solved it?