1 2 Previous Next 18 Replies Latest reply: Sep 4, 2012 11:46 AM by David Bosschaert RSS

    Deploying CXF-DOSGi to JBoss AS7

    David Bosschaert Expert

      As a number of people have asked about deploying CXF-DOSGi in AS7 I decided to do a little write-up of how to do this.

       

      In this decription I'm configuring OSGi in AS7 to run the CXF-DOSGi 1.2 multi-bundle distribution. Note that I used the latest master from AS7 for this...

       

      The CXF-DOSGi distribution contains a number of bundelized jars that weren't originally written as OSGi bundles. Therefore the order in which certain bundles are started is significant. The JAXB-api and JAXB-impl combination is such an example where the jaxb-impl bundle needs to be started before the API bundle.

       

      To achieve this in OSGi you can use start levels. Currently start levels can only be specified with deployments that are made as capabilities (through standalone.xml) so what I've done here is modify standalone.xml so that it loads the CXF-DOSGi distribution bundles in the right order.

       

      Here's the osgi subsystem definition that works for me:

      <subsystem xmlns="urn:jboss:domain:osgi:1.1" activation="eager">
          <configuration pid="org.apache.felix.webconsole.internal.servlet.OsgiManager">
              <property name="manager.root" value="jboss-osgi"/>
          </configuration>
          <properties>
              <!-- Specifies the beginning start level of the framework -->
              <property name="org.osgi.framework.startlevel.beginning">85</property>
          </properties>
      
          <capabilities>
              <!-- modules registered with the OSGi layer on startup -->
              <capability name="javax.api"/>
              <!-- <capability name="javax.servlet.api"/> -->
              <capability name="javax.transaction.api"/>
              <!-- bundles installed on startup -->
              <capability name="org.apache.aries.util"/>
              <capability name="org.jboss.osgi.webconsole"/>
              <capability name="org.osgi.compendium"/>
              <!-- bundles started in startlevel 1 -->
              <capability name="org.apache.felix.log" startlevel="1"/>
              <capability name="org.jboss.osgi.logging" startlevel="1"/>
              <capability name="org.apache.felix.configadmin" startlevel="1"/>
              <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>
      
              <!-- CXF-DOSGI bundles start at 50 -->
              <capability name="org.apache.cxfdosgi.annotation-spec" startlevel="50"/>
              <capability name="org.apache.cxfdosgi.activation-spec" startlevel="51"/>
              <capability name="org.apache.cxfdosgi.javamail-spec" startlevel="52"/>
              <capability name="org.apache.cxfdosgi.ws-metadata-spec" startlevel="53"/>
              <!-- <capability name="org.apache.cxfdosgi.commons-logging" startlevel="54"/> -->
              <capability name="org.apache.cxfdosgi.jdom" startlevel="55"/>
              <capability name="org.apache.cxfdosgi.spring-core" startlevel="56"/>
              <capability name="org.apache.cxfdosgi.spring-beans" startlevel="57"/>
              <capability name="org.apache.cxfdosgi.spring-context" startlevel="58"/>
              <capability name="org.apache.cxfdosgi.spring-aopalliance" startlevel="59"/>
              <capability name="org.apache.cxfdosgi.spring-slf4j-api" startlevel="60"/>
              <capability name="org.apache.cxfdosgi.spring-slf4j-jcl" />
              <capability name="org.apache.cxfdosgi.spring-aop" startlevel="62"/>
              <capability name="org.apache.cxfdosgi.spring-osgi-io" startlevel="63"/>
              <capability name="org.apache.cxfdosgi.spring-osgi-core" startlevel="64"/>
              <capability name="org.apache.cxfdosgi.spring-osgi-extender" startlevel="65"/>
              <capability name="org.apache.cxfdosgi.pax-web-service" startlevel="66"/>
              <capability name="org.apache.cxfdosgi.jaxb-impl" startlevel="67"/>
              <capability name="org.apache.cxfdosgi.wsdl4j" startlevel="68"/>
              <capability name="org.apache.cxfdosgi.xmlsec" startlevel="69"/>
              <capability name="org.apache.cxfdosgi.xmlschema" startlevel="70"/>
              <capability name="org.apache.cxfdosgi.asm" startlevel="71"/>
              <capability name="org.apache.cxfdosgi.xmlresolver" startlevel="72"/>
              <capability name="org.apache.cxfdosgi.neethi" startlevel="73"/>
              <capability name="org.apache.cxfdosgi.woodstox" startlevel="74"/>
              <capability name="org.apache.cxfdosgi.commons-pool" startlevel="75"/>
              <capability name="org.apache.cxfdosgi.saaj-api" startlevel="76"/>
              <capability name="org.apache.cxfdosgi.stax-api" startlevel="77"/>
              <capability name="org.apache.cxfdosgi.jaxb-api" startlevel="78"/>
              <capability name="org.apache.cxfdosgi.jaxws-api" startlevel="79"/>
              <capability name="org.apache.cxfdosgi.jsr311-api" startlevel="80"/>
              <capability name="org.apache.cxfdosgi.cxf-bundle-minimal" startlevel="81"/>
              <capability name="org.apache.cxfdosgi.cxfdosgi-discovery-local" startlevel="82"/>
              <capability name="org.apache.cxfdosgi.cxfdosgi-dsw" startlevel="83"/>
              <capability name="org.apache.cxfdosgi.cxfdosgi-topology-manager" startlevel="84"/>
          </capabilities>
      </subsystem>

       

       

      Couple of notes:

      • I have set the activation mode to eager. This isn't really needed but setting it as such will activate the OSGi subsystem when you start up AS7. (Otherwise it will activate upon first deployment).
      • I set the org.osgi.framework.startlevel.beginning property to 85, which means that the framework will progress to start level 85 when activated.
      • I have disabled the "javax.servlet.api" capability as the pax-web-service bundle also provides this.
      • I have also removed the commons-logging bundle from the list as OSGi in AS7 provides this functionality already.
      • Lastly note that the spring-slf4j-jcl bundle has no startlevel specified, this is because it is a fragment which can not be started.

      To get all this to work you need to copy the CXF-DOSGi bundles to the bundles subdirectory of the AS7 installation. This is how the capability declarations in the standalone.xml find the actual associated bundles. My directory structure there looks like this:

       

      … some bundles ...
      bundles/org/apache/cxfdosgi/activation-spec/main/geronimo-activation_1.1_spec-1.0.2.jar
      bundles/org/apache/cxfdosgi/annotation-spec/main/geronimo-annotation_1.0_spec-1.1.1.jar
      bundles/org/apache/cxfdosgi/asm/main/org.apache.servicemix.bundles.asm-2.2.3_1.jar
      bundles/org/apache/cxfdosgi/commons-pool/main/org.apache.servicemix.bundles.commons-pool-1.5.4_1.jar
      bundles/org/apache/cxfdosgi/cxf-bundle-minimal/main/cxf-bundle-minimal-2.2.9.jar
      bundles/org/apache/cxfdosgi/cxfdosgi-discovery-local/main/cxf-dosgi-ri-discovery-local-1.2.jar
      bundles/org/apache/cxfdosgi/cxfdosgi-dsw/main/cxf-dosgi-ri-dsw-cxf-1.2.jar
      bundles/org/apache/cxfdosgi/cxfdosgi-topology-manager/main/cxf-dosgi-ri-topology-manager-1.2.jar
      bundles/org/apache/cxfdosgi/javamail-spec/main/geronimo-javamail_1.4_spec-1.2.jar
      bundles/org/apache/cxfdosgi/jaxb-api/main/org.apache.servicemix.specs.jaxb-api-2.1-1.3.0.jar
      bundles/org/apache/cxfdosgi/jaxb-impl/main/org.apache.servicemix.bundles.jaxb-impl-2.1.6_1.jar
      bundles/org/apache/cxfdosgi/jaxws-api/main/org.apache.servicemix.specs.jaxws-api-2.1-1.3.0.jar
      bundles/org/apache/cxfdosgi/jdom/main/com.springsource.org.jdom-1.0.0.jar
      bundles/org/apache/cxfdosgi/jsr311-api/main/org.apache.servicemix.specs.jsr311-api-1.0-1.3.0.jar
      bundles/org/apache/cxfdosgi/neethi/main/org.apache.servicemix.bundles.neethi-2.0.4_1.jar
      bundles/org/apache/cxfdosgi/pax-web-service/main/pax-web-service-0.5.1.jar
      bundles/org/apache/cxfdosgi/saaj-api/main/org.apache.servicemix.specs.saaj-api-1.3-1.3.0.jar
      bundles/org/apache/cxfdosgi/spring-aop/main/spring-aop-2.5.6.jar
      bundles/org/apache/cxfdosgi/spring-aopalliance/main/com.springsource.org.aopalliance-1.0.0.jar
      bundles/org/apache/cxfdosgi/spring-beans/main/spring-beans-2.5.6.jar
      bundles/org/apache/cxfdosgi/spring-context/main/spring-context-2.5.6.jar
      bundles/org/apache/cxfdosgi/spring-core/main/spring-core-2.5.6.jar
      bundles/org/apache/cxfdosgi/spring-osgi-core/main/spring-osgi-core-1.2.0.jar
      bundles/org/apache/cxfdosgi/spring-osgi-extender/main/spring-osgi-extender-1.2.0.jar
      bundles/org/apache/cxfdosgi/spring-osgi-io/main/spring-osgi-io-1.2.0.jar
      bundles/org/apache/cxfdosgi/spring-slf4j-api/main/com.springsource.slf4j.api-1.5.10.jar
      bundles/org/apache/cxfdosgi/spring-slf4j-jcl/main/com.springsource.slf4j.jcl-1.5.10.jar
      bundles/org/apache/cxfdosgi/stax-api/main/org.apache.servicemix.specs.stax-api-1.0-1.3.0.jar
      bundles/org/apache/cxfdosgi/woodstox/main/org.apache.servicemix.bundles.woodstox-3.2.7_1.jar
      bundles/org/apache/cxfdosgi/ws-metadata-spec/main/geronimo-ws-metadata_2.0_spec-1.1.2.jar
      bundles/org/apache/cxfdosgi/wsdl4j/main/org.apache.servicemix.bundles.wsdl4j-1.6.1_1.jar
      bundles/org/apache/cxfdosgi/xmlresolver/main/org.apache.servicemix.bundles.xmlresolver-1.2_1.jar
      bundles/org/apache/cxfdosgi/xmlschema/main/org.apache.servicemix.bundles.xmlschema-1.4.3_1.jar
      bundles/org/apache/cxfdosgi/xmlsec/main/org.apache.servicemix.bundles.xmlsec-1.3.0_1.jar
      … more bundles

       

       

      When you start up AS7, you'll see that the system starts the OSGi subsystem and moves to start level 85. You'll see something like this at the end of the log:

       

      12:17:38,619 INFO  [org.springframework.osgi.context.support.OsgiBundleXmlApplicationContext] (SpringOsgiExtenderThread-2) Publishing application context as OSGi service with properties {org.springframework.context.service.name=cxf-dosgi-ri-dsw-cxf, Bundle-SymbolicName=cxf-dosgi-ri-dsw-cxf, Bundle-Version=1.2.0}
      12:17:38,628 INFO  [org.springframework.osgi.extender.internal.activator.ContextLoaderListener] (SpringOsgiExtenderThread-2) Application context successfully refreshed (OsgiBundleXmlApplicationContext(bundle=cxf-dosgi-ri-dsw-cxf, config=osgibundle:/META-INF/spring/*.xml))

       

       

      Now, to show that it all works you can now deploy a CXF-DOSGi demo, for instance the greeter demo server side into AS7. There are various ways to do this, you can add them to the capability list in the standalone.xml as above, or use any of the other deployment mechanisms offered by AS7.

      Deploy the interface bundle and the implementation bundle.

      You'll see various messages appear on the console, towards the end you'll see:

       

      *** EndpointDescription: **** 
      endpoint.framework.uuid  => cac778b3-d996-4c3d-a6e1-ec3f5c1774ca
      endpoint.id  => http://localhost:9090/greeter
      endpoint.package.version.org.apache.cxf.dosgi.samples.greeter  => 0.0.0
      endpoint.service.id  => 30
      objectClass  => [Ljava.lang.String;@1fd05f97
      org.apache.cxf.ws.address  => http://localhost:9090/greeter
      service.imported  => true
      service.imported.configs  => [Ljava.lang.String;@2933c2d2
      service.intents  => [Ljava.lang.String;@53b7e20

       

       

      This means that your endpoint is successfully deployed. You can check that by running the client side of the demo in another OSGi Framework instance (e.g another AS7 instance) or by loading up the WSDL from http://localhost:9090/greeter?wsdl

       

      Screen Shot 2011-10-27 at 12.40.16.png    

        • 1. Re: Deploying CXF-DOSGi to JBoss AS7
          Sunil Pandit Newbie

          David

           

          Thanks for putting these steps together . After following these steps , I am getting an error

           

          22:28:15,456 ERROR [stderr] Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[198,9]

          22:28:15,456 ERROR [stderr] Message: Unexpected element '{urn:jboss:domain:osgi:1.1}subsystem'

           

          I am not sure what I am missing . Any insights ?

           

          I am running 7.0.2 version of Jboss.

           

          Thanks

          Sunil

          • 2. Re: Deploying CXF-DOSGi to JBoss AS7
            David Bosschaert Expert

            Hi Sunil,

             

            This is because the configuration file format has changed slightly between AS 7.0 and AS 7.1. As I noted at the top of my post, I used the latest AS7 master which is what will be released soon as AS7.1. So you have 2 options:

            • Use the latest master, just get git://github.com/jbossas/jboss-as.git and build it (you'll find the release in build/target). The description above applies to that.
            • Alternatively you can rewrite the configuration to work on AS7.0.2. If you have any issues with that and absolutely need it, let us know.

             

            Best regards,

             

            David

            • 3. Re: Deploying CXF-DOSGi to JBoss AS7
              Sunil Pandit Newbie

              David ,

               

              Thanks again for the tip . That resolved the issue . I can see the log messages you have mentioned in the original post and also the greeter sample is working .

               

              However I am running into another issue related to CXF . I am trying to deploy rest services using  org.apache.cxf.rs.httpservice.context instead of

              org.apache.cxf.rs.address .

               

              The log suggests that  the endpoints are registered . However when I try to access this service , I get 404 .

               

              This same service works fine when I use CXF DOSGI singlebundle .

               

              I am not sure what I am missing . Could you please shed some light on this ?

               

              Thanks

              Sunil

               

              Here is the log

               

              *** EndpointDescription: ****

              endpoint.framework.uuid  => f79bcc71-0ae8-4bb9-afa4-995184df67a6

              endpoint.id  => http://192.168.0.101:8090/eappRep/rep/repcall

              endpoint.package.version.com.csc.eapp.rep.intf  => 0.0.0

              endpoint.service.id  => 61

              objectClass  => [Ljava.lang.String;@4582c6dc

              org.apache.cxf.rs.address  => http://192.168.0.101:8090/eappRep/rep/repcall

              org.apache.cxf.rs.databinding  => aegis

              org.apache.cxf.rs.httpservice.context  => /eappRep/rep/repcall

              service.imported  => true

              service.imported.configs  => [Ljava.lang.String;@ccdb92b

              service.intents  => [Ljava.lang.String;@1637bc9e

              • 4. Re: Deploying CXF-DOSGi to JBoss AS7
                David Bosschaert Expert

                Hi Sunil,

                 

                I've never tried that in the context of REST - I'll give it a go in the near future and will let you know how if I find anything helpful...

                 

                Cheers,

                 

                David

                • 5. Re: Deploying CXF-DOSGi to JBoss AS7
                  David Bosschaert Expert

                  Hi Sunil,

                   

                  It worked for me. First, I got the greeter-rest demo (http://svn.apache.org/repos/asf/cxf/dosgi/trunk/samples/greeter_rest) working as-is: I deployed the cxf-dosgi-ri-samples-greeter-rest-interface and cxf-dosgi-ri-samples-greeter-rest-impl bundles (see also note at the end) and was able to access the OSGi greeter service via it's rest interface; e.g. point a web browser localhost:9090/greeter/greeter/greeting/as7 and you'll get an XML response from the service:

                  Screen Shot 2011-11-01 at 21.45.25.png

                  However, you mentioned you wanted to use the OSGi HTTP Service (instead of Jetty directly) by setting the org.apache.cxf.rs.httpservice.context property instead of org.apache.cxf.rs.address. So I modified the greeter_rest impl bundle Activator as follows:

                  public void start(BundleContext bc) throws Exception {
                    Dictionary props = getProperties();
                    registration = bc.registerService(GreeterService.class.getName(),
                      new GreeterServiceImpl(), props);
                  }
                  
                  private Dictionary getProperties() {
                    Dictionary props = new Hashtable();
                    props.put("service.exported.interfaces", "*");
                    props.put("service.exported.configs", "org.apache.cxf.rs");
                    props.put("service.exported.intents", "HTTP");
                    props.put("org.apache.cxf.rs.httpservice.context", "/greeter/gr2");
                    props.put("org.apache.cxf.rs.databinding", "aegis");
                    return props;
                  }

                   

                   

                  So now CXF uses the OSGi HTTP Service to expose the service. When I start the bundle I see:

                  *** EndpointDescription: **** 
                  endpoint.framework.uuid  => 7f8fc2dd-15c5-4162-be3e-06b39ce85867
                  endpoint.id  => http://10.0.0.205:8090/greeter/gr2
                  endpoint.package.version.org.apache.cxf.dosgi.samples.greeter.rest  => 0.0.0
                  endpoint.service.id  => 27
                  objectClass  => [Ljava.lang.String;@fda5bfa
                  org.apache.cxf.rs.address  => http://10.0.0.205:8090/greeter/gr2
                  org.apache.cxf.rs.databinding  => aegis
                  org.apache.cxf.rs.httpservice.context  => /greeter/gr2
                  service.imported  => true
                  service.imported.configs  => [Ljava.lang.String;@48cc8237
                  service.intents  => [Ljava.lang.String;@6a790e37

                   

                   

                  Now I can access the same service through the REST API as follows:

                  Screen Shot 2011-11-01 at 21.41.27.png

                  So you might want to try these steps too to try it out.

                   

                  Note: one thing that I noticed is that if I deployed the greeter impl by dropping it in the deployments/ folder an exception occurred (https://issues.jboss.org/browse/AS7-2456).

                  However, deploying my CXF-DOSGi REST bundles using capabilities defined in standalone.xml, just like was done with the other CXF-DOSGi bundles works fine:

                  <properties>
                      <property name="org.osgi.framework.startlevel.beginning">86</property>
                  </properties>
                  
                  <capabilities>
                          <!-- ... capabilities as above ... -->
                          <capability name="org.apache.cxfdosgi.demo.intf" startlevel="85"/>
                          <capability name="org.apache.cxfdosgi.demo.impl" startlevel="86"/>
                  

                   

                   

                  Hope this helps,

                   

                  David

                  • 6. Re: Deploying CXF-DOSGi to JBoss AS7
                    Sunil Pandit Newbie

                    Hi David ,

                     

                    Thanks for the quick response. I should have mentioned earlier that the Greeter rest sample worked for me . However I have not yet tried it through osgi http service.

                     

                    Dropping the bundle in deployment folder has been working for me . I do get following exception

                     

                    Caused by: java.lang.NoClassDefFoundError: org/apache/ws/security/handler/WSHandler

                        at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]

                        at java.lang.ClassLoader.defineClassCond(Unknown Source) [:1.6.0_26]

                        at java.lang.ClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                        at java.security.SecureClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                        at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]

                     

                    Is this what you are getting too ?

                     

                    When I drop greeter in deployment folder , I drop the intereface bundle and once that is deployed I drop Impl bundle. And I am able to access the REST service.

                     

                    I will change it to use the OSGI Http service instead of the Jetty and will update you.

                     

                    Regards

                    Sunil

                    • 7. Re: Deploying CXF-DOSGi to JBoss AS7
                      Sunil Pandit Newbie

                      Hi David ,

                       

                      I followed the steps as you have performed . But I am still not able to access the Greeter rest service . I get following exception . Notice at the bottom the greeter service is registered successfully . I am not sure what I am missing.

                      <code>

                      22:15:29,519 WARN  [org.jboss.modules] (pool-9-thread-2) Failed to define class org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor in Module "deployment.org.apache.cxf.bundle-minimal:2.2.9" from Service Module Loader: java.lang.LinkageError: Failed to link org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor (Module "deployment.org.apache.cxf.bundle-minimal:2.2.9" from Service Module Loader)

                          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.FilteredLocalLoader.loadClassLocal(FilteredLocalLoader.java:46) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                          at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]

                          at java.lang.ClassLoader.defineClassCond(Unknown Source) [:1.6.0_26]

                          at java.lang.ClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                          at java.security.SecureClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.FilteredLocalLoader.loadClassLocal(FilteredLocalLoader.java:46) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                          at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]

                          at java.lang.ClassLoader.defineClassCond(Unknown Source) [:1.6.0_26]

                          at java.lang.ClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                          at java.security.SecureClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.FilteredLocalLoader.loadClassLocal(FilteredLocalLoader.java:46) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                          at org.apache.cxf.ws.security.policy.interceptors.WSSecurityInterceptorProvider.<init>(WSSecurityInterceptorProvider.java:49) [WSSecurityInterceptorProvider.class:]

                          at org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader.registerProviders(WSSecurityPolicyLoader.java:163) [WSSecurityPolicyLoader.class:]

                          at org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader.register(WSSecurityPolicyLoader.java:84) [WSSecurityPolicyLoader.class:]

                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]

                          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_26]

                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_26]

                          at java.lang.reflect.Method.invoke(Unknown Source) [:1.6.0_26]

                          at org.apache.cxf.common.injection.ResourceInjector.invokePostConstruct(ResourceInjector.java:303) [ResourceInjector.class:]

                          at org.apache.cxf.common.injection.ResourceInjector.construct(ResourceInjector.java:87) [ResourceInjector.class:]

                          at org.apache.cxf.bus.spring.Jsr250BeanPostProcessor.postProcessAfterInitialization(Jsr250BeanPostProcessor.java:71) [Jsr250BeanPostProcessor.class:]

                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:361) [AbstractAutowireCapableBeanFactory.class:]

                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1344) [AbstractAutowireCapableBeanFactory.class:]

                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) [AbstractAutowireCapableBeanFactory.class:]

                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [AbstractAutowireCapableBeanFactory$1.class:]

                          at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_26]

                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [AbstractAutowireCapableBeanFactory.class:]

                          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [AbstractBeanFactory$1.class:]

                          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [DefaultSingletonBeanRegistry.class:]

                          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [AbstractBeanFactory.class:]

                          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [AbstractBeanFactory.class:]

                          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [AbstractBeanFactory.class:]

                          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) [DefaultListableBeanFactory.class:]

                          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) [AbstractApplicationContext.class:]

                          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) [AbstractApplicationContext.class:]

                          at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91) [BusApplicationContext.class:]

                          at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102) [SpringBusFactory.class:]

                          at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93) [SpringBusFactory.class:]

                          at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86) [SpringBusFactory.class:]

                          at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64) [SpringBusFactory.class:]

                          at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53) [SpringBusFactory.class:]

                          at org.apache.cxf.transport.servlet.CXFNonSpringServlet.loadBusNoConfig(CXFNonSpringServlet.java:45) [CXFNonSpringServlet.class:]

                          at org.apache.cxf.transport.servlet.CXFNonSpringServlet.loadBus(CXFNonSpringServlet.java:38) [CXFNonSpringServlet.class:]

                          at org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:78) [AbstractCXFServlet.class:]

                          at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433) [ServletHolder.class:]

                          at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256) [ServletHolder.class:]

                          at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) [AbstractLifeCycle.class:]

                          at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:616) [ServletHandler.class:]

                          at org.mortbay.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:984) [ServletHandler.class:]

                          at org.mortbay.jetty.servlet.ServletHandler.setServletMappings(ServletHandler.java:1041) [ServletHandler.class:]

                          at org.mortbay.jetty.servlet.ServletHandler.addServletMapping(ServletHandler.java:740) [ServletHandler.class:]

                          at org.ops4j.pax.web.service.internal.JettyServerImpl$1.call(JettyServerImpl.java:129) [JettyServerImpl$1.class:]

                          at org.ops4j.pax.web.service.internal.JettyServerImpl$1.call(JettyServerImpl.java:126) [JettyServerImpl$1.class:]

                          at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60) [ContextClassLoaderUtils.class:]

                          at org.ops4j.pax.web.service.internal.JettyServerImpl.addServlet(JettyServerImpl.java:121) [JettyServerImpl.class:]

                          at org.ops4j.pax.web.service.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:214) [ServerControllerImpl$Started.class:]

                          at org.ops4j.pax.web.service.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:90) [ServerControllerImpl.class:]

                          at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:144) [HttpServiceStarted.class:]

                          at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:53) [HttpServiceProxy.class:]

                          at org.apache.cxf.dosgi.dsw.handlers.JaxRSHttpServiceConfigurationTypeHandler.createServer(JaxRSHttpServiceConfigurationTypeHandler.java:69) [JaxRSHttpServiceConfigurationTypeHandler.class:]

                          at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.exportService(RemoteServiceAdminCore.java:244) [RemoteServiceAdminCore.class:]

                          at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:78) [RemoteServiceAdminInstance$1.class:]

                          at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:71) [RemoteServiceAdminInstance$1.class:]

                          at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_26]

                          at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:71) [RemoteServiceAdminInstance.class:]

                          at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:40) [RemoteServiceAdminInstance.class:]

                          at org.apache.cxf.dosgi.topologymanager.TopologyManager$2.run(TopologyManager.java:254) [TopologyManager$2.class:]

                          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [:1.6.0_26]

                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_26]

                          at java.lang.Thread.run(Unknown Source) [:1.6.0_26]

                      Caused by: java.lang.NoClassDefFoundError: org/apache/ws/security/handler/WSHandler

                          at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]

                          at java.lang.ClassLoader.defineClassCond(Unknown Source) [:1.6.0_26]

                          at java.lang.ClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                          at java.security.SecureClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]

                          ... 98 more

                      Caused by: java.lang.ClassNotFoundException: org.apache.ws.security.handler.WSHandler from [Module "deployment.org.apache.cxf.bundle-minimal:2.2.9" from Service Module Loader]

                          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                          ... 103 more

                       

                      22:15:29,523 WARN  [org.jboss.modules] (pool-9-thread-2) Failed to define class org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JInInterceptor in Module "deployment.org.apache.cxf.bundle-minimal:2.2.9" from Service Module Loader: java.lang.LinkageError: Failed to link org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor (Module "deployment.org.apache.cxf.bundle-minimal:2.2.9" from Service Module Loader)

                          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.FilteredLocalLoader.loadClassLocal(FilteredLocalLoader.java:46) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                          at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]

                          at java.lang.ClassLoader.defineClassCond(Unknown Source) [:1.6.0_26]

                          at java.lang.ClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                          at java.security.SecureClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.FilteredLocalLoader.loadClassLocal(FilteredLocalLoader.java:46) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                          at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]

                          at java.lang.ClassLoader.defineClassCond(Unknown Source) [:1.6.0_26]

                          at java.lang.ClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                          at java.security.SecureClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:261) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:76) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.FilteredLocalLoader.loadClassLocal(FilteredLocalLoader.java:46) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.Module.loadModuleClass(Module.java:590) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                          at org.apache.cxf.ws.security.policy.interceptors.WSSecurityInterceptorProvider.<init>(WSSecurityInterceptorProvider.java:49) [WSSecurityInterceptorProvider.class:]

                          at org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader.registerProviders(WSSecurityPolicyLoader.java:163) [WSSecurityPolicyLoader.class:]

                          at org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader.register(WSSecurityPolicyLoader.java:84) [WSSecurityPolicyLoader.class:]

                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_26]

                          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_26]

                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) [:1.6.0_26]

                          at java.lang.reflect.Method.invoke(Unknown Source) [:1.6.0_26]

                          at org.apache.cxf.common.injection.ResourceInjector.invokePostConstruct(ResourceInjector.java:303) [ResourceInjector.class:]

                          at org.apache.cxf.common.injection.ResourceInjector.construct(ResourceInjector.java:87) [ResourceInjector.class:]

                          at org.apache.cxf.bus.spring.Jsr250BeanPostProcessor.postProcessAfterInitialization(Jsr250BeanPostProcessor.java:71) [Jsr250BeanPostProcessor.class:]

                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:361) [AbstractAutowireCapableBeanFactory.class:]

                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1344) [AbstractAutowireCapableBeanFactory.class:]

                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473) [AbstractAutowireCapableBeanFactory.class:]

                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409) [AbstractAutowireCapableBeanFactory$1.class:]

                          at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_26]

                          at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380) [AbstractAutowireCapableBeanFactory.class:]

                          at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264) [AbstractBeanFactory$1.class:]

                          at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [DefaultSingletonBeanRegistry.class:]

                          at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) [AbstractBeanFactory.class:]

                          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185) [AbstractBeanFactory.class:]

                          at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164) [AbstractBeanFactory.class:]

                          at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429) [DefaultListableBeanFactory.class:]

                          at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728) [AbstractApplicationContext.class:]

                          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380) [AbstractApplicationContext.class:]

                          at org.apache.cxf.bus.spring.BusApplicationContext.<init>(BusApplicationContext.java:91) [BusApplicationContext.class:]

                          at org.apache.cxf.bus.spring.SpringBusFactory.createApplicationContext(SpringBusFactory.java:102) [SpringBusFactory.class:]

                          at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:93) [SpringBusFactory.class:]

                          at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:86) [SpringBusFactory.class:]

                          at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:64) [SpringBusFactory.class:]

                          at org.apache.cxf.bus.spring.SpringBusFactory.createBus(SpringBusFactory.java:53) [SpringBusFactory.class:]

                          at org.apache.cxf.transport.servlet.CXFNonSpringServlet.loadBusNoConfig(CXFNonSpringServlet.java:45) [CXFNonSpringServlet.class:]

                          at org.apache.cxf.transport.servlet.CXFNonSpringServlet.loadBus(CXFNonSpringServlet.java:38) [CXFNonSpringServlet.class:]

                          at org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:78) [AbstractCXFServlet.class:]

                          at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:433) [ServletHolder.class:]

                          at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:256) [ServletHolder.class:]

                          at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39) [AbstractLifeCycle.class:]

                          at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:616) [ServletHandler.class:]

                          at org.mortbay.jetty.servlet.ServletHandler.updateMappings(ServletHandler.java:984) [ServletHandler.class:]

                          at org.mortbay.jetty.servlet.ServletHandler.setServletMappings(ServletHandler.java:1041) [ServletHandler.class:]

                          at org.mortbay.jetty.servlet.ServletHandler.addServletMapping(ServletHandler.java:740) [ServletHandler.class:]

                          at org.ops4j.pax.web.service.internal.JettyServerImpl$1.call(JettyServerImpl.java:129) [JettyServerImpl$1.class:]

                          at org.ops4j.pax.web.service.internal.JettyServerImpl$1.call(JettyServerImpl.java:126) [JettyServerImpl$1.class:]

                          at org.ops4j.pax.swissbox.core.ContextClassLoaderUtils.doWithClassLoader(ContextClassLoaderUtils.java:60) [ContextClassLoaderUtils.class:]

                          at org.ops4j.pax.web.service.internal.JettyServerImpl.addServlet(JettyServerImpl.java:121) [JettyServerImpl.class:]

                          at org.ops4j.pax.web.service.internal.ServerControllerImpl$Started.addServlet(ServerControllerImpl.java:214) [ServerControllerImpl$Started.class:]

                          at org.ops4j.pax.web.service.internal.ServerControllerImpl.addServlet(ServerControllerImpl.java:90) [ServerControllerImpl.class:]

                          at org.ops4j.pax.web.service.internal.HttpServiceStarted.registerServlet(HttpServiceStarted.java:144) [HttpServiceStarted.class:]

                          at org.ops4j.pax.web.service.internal.HttpServiceProxy.registerServlet(HttpServiceProxy.java:53) [HttpServiceProxy.class:]

                          at org.apache.cxf.dosgi.dsw.handlers.JaxRSHttpServiceConfigurationTypeHandler.createServer(JaxRSHttpServiceConfigurationTypeHandler.java:69) [JaxRSHttpServiceConfigurationTypeHandler.class:]

                          at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore.exportService(RemoteServiceAdminCore.java:244) [RemoteServiceAdminCore.class:]

                          at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:78) [RemoteServiceAdminInstance$1.class:]

                          at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance$1.run(RemoteServiceAdminInstance.java:71) [RemoteServiceAdminInstance$1.class:]

                          at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_26]

                          at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:71) [RemoteServiceAdminInstance.class:]

                          at org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminInstance.exportService(RemoteServiceAdminInstance.java:40) [RemoteServiceAdminInstance.class:]

                          at org.apache.cxf.dosgi.topologymanager.TopologyManager$2.run(TopologyManager.java:254) [TopologyManager$2.class:]

                          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [:1.6.0_26]

                          at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [:1.6.0_26]

                          at java.lang.Thread.run(Unknown Source) [:1.6.0_26]

                      Caused by: java.lang.NoClassDefFoundError: org/apache/ws/security/handler/WSHandler

                          at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26]

                          at java.lang.ClassLoader.defineClassCond(Unknown Source) [:1.6.0_26]

                          at java.lang.ClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                          at java.security.SecureClassLoader.defineClass(Unknown Source) [:1.6.0_26]

                          at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397) [jboss-modules.jar:1.0.2.GA]

                          ... 98 more

                      Caused by: java.lang.ClassNotFoundException: org.apache.ws.security.handler.WSHandler from [Module "deployment.org.apache.cxf.bundle-minimal:2.2.9" from Service Module Loader]

                          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

                          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

                          ... 103 more

                       

                      22:15:29,564 INFO  [org.apache.cxf.transport.servlet.AbstractCXFServlet] (pool-9-thread-2) Replaced the http destination factory with servlet transport factory

                      22:15:29,567 INFO  [org.apache.cxf.dosgi.dsw.handlers.JaxRSHttpServiceConfigurationTypeHandler] (pool-9-thread-2) Successfully registered CXF DOSGi servlet at /greeter/gr2

                      22:15:29,675 INFO  [org.apache.cxf.endpoint.ServerImpl] (pool-9-thread-2) Setting the server's publish address to be /

                      22:15:29,735 INFO  [org.apache.cxf.dosgi.dsw.service.RemoteServiceAdminCore] (pool-9-thread-2) created server for interface org.apache.cxf.dosgi.samples.greeter.rest.GreeterService

                      22:15:29,736 INFO  [org.apache.cxf.dosgi.topologymanager.ListenerHookImpl] (pool-9-thread-2) *** Filter: (service.id=54)

                      22:15:29,737 INFO  [org.apache.cxf.dosgi.topologymanager.ListenerHookImpl] (pool-9-thread-2) ListenerHookImpl: skipping import request for excluded classs [null]

                      22:15:29,741 INFO  [org.apache.cxf.dosgi.topologymanager.RemoteServiceAdminListenerImpl] (pool-9-thread-2) Unhandled event type received: 2

                      22:15:29,745 INFO  [org.apache.cxf.dosgi.topologymanager.TopologyManager] (pool-9-thread-2) TopologyManager: export sucessful Endpoints:[Endpoint Desctiption for ServiceReference ServiceState{service.exported.configs=org.apache.cxf.rs, org.apache.cxf.rs.databinding=aegis, service.exported.interfaces=*, service.id=54, service.exported.intents=HTTP, objectClass=[org.apache.cxf.dosgi.samples.greeter.rest.GreeterService], org.apache.cxf.rs.httpservice.context=/greeter/gr2}

                      *** EndpointDescription: ****

                      endpoint.framework.uuid  => c61c0d4f-d386-45fc-96d5-c9e5612b8c39

                      endpoint.id  => http://192.168.0.101:8090/greeter/gr2

                      endpoint.package.version.org.apache.cxf.dosgi.samples.greeter.rest  => 0.0.0

                      endpoint.service.id  => 54

                      objectClass  => [Ljava.lang.String;@27c453c8

                      org.apache.cxf.rs.address  => http://192.168.0.101:8090/greeter/gr2

                      org.apache.cxf.rs.databinding  => aegis

                      org.apache.cxf.rs.httpservice.context  => /greeter/gr2

                      service.imported  => true

                      service.imported.configs  => [Ljava.lang.String;@4a5883dd

                      service.intents  => [Ljava.lang.String;@7939484c

                       

                      *** Exception: null ****

                      *** isClosed : false ****

                      </code>

                      • 8. Re: Deploying CXF-DOSGi to JBoss AS7
                        Sunil Pandit Newbie

                        David

                         

                        I noticed the exception I am getting is an issue

                         

                        And as you mentioned there it is harmless. So I am not sure why I am getting 404 for greeter rest service .

                         

                        Is it working for you because you are running master version of the server ? Is there any defect in 7.0.2 that was fixed ?

                         

                        Also could you please share your standalone.xml ?

                         

                        Thanks

                        Sunil

                        • 9. Re: Deploying CXF-DOSGi to JBoss AS7
                          David Bosschaert Expert

                          Hi Sunil,

                          Sunil Pandit wrote:

                           

                          I noticed the exception I am getting is an issue

                           

                          And as you mentioned there it is harmless. So I am not sure why I am getting 404 for greeter rest service .

                           

                           

                          This exception that I'm getting that I think is 'harmless', at least for this use-case is this one:

                          22:15:29,519 WARN  [org.jboss.modules] (pool-9-thread-2) Failed to define class
                          org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor in Module "deployment.org.apache.cxf.bundle-minimal:2.2.9" from 
                          Service Module Loader: java.lang.LinkageError: Failed to link org/apache/cxf/ws/security/wss4j/AbstractWSS4JInterceptor

                           

                          I think this is an issue with the way the CXF-DOSGi bundles are packaged. There is an optional import to one of the security packages and I believe the CXF system at that point attempts to initialize WS security, but it can continue without security if that doesn't succeed. If you need security for CXF enabled it might be best to ask that on the cxf-user mailing list.

                           

                          The exception from AS7-2456 is not harmless, as it will cause the deployment to fail. However it can be avoided by deploying your bundles as capabilities as I've described above (the ones with startlevel 85 and 86).

                           

                          Also could you please share your standalone.xml ?

                          For your convenience I've created a zip of all the CXF-DOSGi bundles, plus the greeter-rest demo interface and impl bundles: cxfdosgi_bundles.zip. You can drop that in your as7/bundles/org/apache directory.

                          I've also attached the standalone.xml file that I've used. With this I have no problem accessing the OSGi service exposed over REST via the URL reported in the EndpointDescription, in my case that is http://10.22.129.128:8090/greeter/gr2/greeter/greeting/as7-user

                           

                          So I would suggest that you try to get the greeter demo working as well, as described. It should work for you just as it works for me. Then you can apply this setup to your own service and things should work likewise.

                           

                          BTW, Again, I have only tried this with the latest AS7.1 master. AS7.1 will be released quite soon so it might be best to simply focus on that. It should be possible to get things to work with 7.0.2 but the configuration will be different.

                          • 10. Re: Deploying CXF-DOSGi to JBoss AS7
                            Sunil Pandit Newbie

                            Hi David ,

                             

                            I could get this configuration running on 7.0.2 . However i had to add following properties to the above subsystem

                             

                            <property name="org.osgi.framework.system.packages.extra">

                                                org.apache.commons.logging;version=1.1.1,

                                        org.apache.log4j;version=1.2,

                                              org.jboss.as.osgi.service;version=7.0,

                                              org.jboss.osgi.deployment.interceptor;version=1.0,

                                              org.jboss.osgi.spi.capability;version=1.0,

                                              org.jboss.osgi.spi.util;version=1.0,

                                              org.jboss.osgi.testing;version=1.0,

                                              org.jboss.osgi.vfs;version=1.0,

                                              org.slf4j;version=1.5.10,

                                              javax.xml.bind.JAXBContext,

                                              javax.xml.bind.JAXBException,

                                              javax.activation,

                                            </property>

                            <property name="org.jboss.osgi.system.modules">org.apache.commons.logging,

                                                   org.apache.log4j,

                                                   org.jboss.as.osgi,

                                                   org.slf4j,

                            </property>

                             

                            I still get an exception for wshandler class not found exception . It is consistent on both 7.0.2 as well as 7.1 .

                             

                            Thanks

                            Sunil

                            • 11. Re: Deploying CXF-DOSGi to JBoss AS7
                              David Bosschaert Expert

                              Hi Sunil,

                              Sunil Pandit wrote:

                               

                              I still get an exception for wshandler class not found exception . It is consistent on both 7.0.2 as well as 7.1 .

                               

                              Is this exception causing an issue for you or is it harmless?

                              Also I'd like to understand whether you get this exception only with your component or also with the demo as I posted it.

                               

                              Thanks,

                               

                              David

                              • 12. Re: Deploying CXF-DOSGi to JBoss AS7
                                Sunil Pandit Newbie

                                Sorry , took some time to respond to you questions .

                                 

                                This exception is harmless and it does occur everytime the bundle registers service . I see these exeptions even for the greeter sample .

                                 

                                Sunil

                                • 13. Re: Deploying CXF-DOSGi to JBoss AS7
                                  David Bosschaert Expert

                                  Yeah, it's an issue for the CXF-DOSGi project.

                                   

                                  So can I assume that it's working for you now?

                                  • 14. Re: Deploying CXF-DOSGi to JBoss AS7
                                    Sunil Pandit Newbie

                                    David

                                     

                                    Have you noticed that when we add CXF single bundle or multi bundler then it breaks the felix web console ? I think it causes some conflicts to the underlying OSGI http service.

                                     

                                    Sunil

                                    1 2 Previous Next