You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aries.apache.org by ma...@sdv-it.de on 2017/01/05 13:34:51 UTC

jax-rs-whiteboard with jersey

Hello everyone

I am currently giving the jax-rs-whiteboard a test. My goal is a 
REST-Service which uses Spring-Hateoas to create the necessary links.

The provided sample uses the enroute-jsonrpc as a provider as far as I 
could see and I am trying to get this running with CXF and Jersey. 
Unfortunately I am running in some classloading issues: jaxws.ws.rs-api 
uses a ServiceLocator and tries to load 
org.glassfish.jersey.internal.RuntimeDelegateImpl which cannot be found 
(see StackTrace and Bundles at the end).


I am not very familiar with the BundleWiring and what classes are visible 
when using the Classloader from this Class as done here
https://github.com/apache/aries-jax-rs-whiteboard/blob/master/jax-rs.whiteboard/src/main/java/org/apache/aries/jax/rs/whiteboard/activator/CXFJaxRsBundleActivator.java#L96-L108


So my question is: has anyone tried to use jax-rs-whiteboard with jersey 
yet and what dependencies are necessary?
Or is this a bug and the bundle must be fixed for example by using a 
dynamic-import header?



13:26:37.380 DEBUG [main] javax.ws.rs-api - BundleEvent STARTING - 
javax.ws.rs-api
13:26:37.380 DEBUG [main] javax.ws.rs-api - BundleEvent STARTED - 
javax.ws.rs-api
13:26:37.381 DEBUG [main] org.apache.aries.jax.rs.whiteboard - BundleEvent 
STARTING - org.apache.aries.jax.rs.whiteboard
13:26:37.384 INFO  [paxweb-config-1-thread-1] org.eclipse.jetty.util.log - 
Logging initialized @1781ms
13:26:37.385 DEBUG [main] javax.ws.rs.ext.FactoryFinder - Unable to load 
provider class org.glassfish.jersey.internal.RuntimeDelegateImpl using 
custom classloader 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5 trying 
again with current classloader.
java.lang.ClassNotFoundException: 
org.glassfish.jersey.internal.RuntimeDelegateImpl not found by 
org.apache.aries.jax.rs.whiteboard [29]
        at 
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)
        at 
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
        at 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:348)
        at 
javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:107)
        at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:225)
        at 
javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135)
        at 
javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
        at 
org.apache.aries.jax.rs.whiteboard.activator.CXFJaxRsBundleActivator.initRuntimeDelegate(CXFJaxRsBundleActivator.java:103)
        at 
org.apache.aries.jax.rs.whiteboard.activator.CXFJaxRsBundleActivator.start(CXFJaxRsBundleActivator.java:61)
        at 
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
        at 
org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
        at 
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
        at aQute.launcher.Launcher.update(Launcher.java:483)
        at aQute.launcher.Launcher.activate(Launcher.java:382)
        at aQute.launcher.Launcher.run(Launcher.java:276)
        at aQute.launcher.Launcher.main(Launcher.java:133)
13:26:37.396 DEBUG [paxweb-config-1-thread-1] 
o.e.j.u.component.ContainerLifeCycle - 
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper@775d53e4 added 
{qtp830199975{STOPPED,8<=0<=200,i=0,q=0},AUTO}
13:26:37.396 WARN  [main] org.jvnet.hk2.logger - Cannot find a default 
implementation of the HK2 ServiceLocatorGenerator
! Failed to start bundle 
org.apache.aries.jax.rs.whiteboard-0.0.1.201701041146, exception activator 
error java.lang.ClassNotFoundException: Provider 
org.glassfish.jersey.internal.RuntimeDelegateImpl could not be 
instantiated: java.lang.IllegalStateException: No generator was provided 
and there is no default generator registered from: 
javax.ws.rs.ext.RuntimeDelegate:findDelegate#152
13:26:37.396 DEBUG [main] org.apache.aries.jax.rs.whiteboard - BundleEvent 
STOPPING - org.apache.aries.jax.rs.whiteboard
13:26:37.396 DEBUG [main] org.apache.aries.jax.rs.whiteboard - BundleEvent 
STOPPED - org.apache.aries.jax.rs.whiteboard


START LEVEL 1
   ID|State      |Level|Name
    0|Active     |    0|System Bundle (5.6.1)|5.6.1
    1|Active     |    1|Java Servlet API (3.1.0)|3.1.0
    2|Active     |    1|Apache Felix Metatype Service (1.1.2)|1.1.2
    3|Active     |    1|Apache Felix Bundle Repository (2.0.8)|2.0.8
    4|Active     |    1|Apache Felix Configuration Admin Service 
(1.8.12)|1.8.12
    5|Active     |    1|Apache Felix EventAdmin (1.4.8)|1.4.8
    6|Active     |    1|Apache Felix File Install (3.5.6)|3.5.6
    7|Active     |    1|Apache Felix Gogo Command (1.0.0)|1.0.0
    8|Active     |    1|Apache Felix Gogo Runtime (1.0.0)|1.0.0
    9|Active     |    1|Apache Felix Gogo Shell (1.0.0)|1.0.0
   10|Active     |    1|Apache Felix Declarative Services (2.0.6)|2.0.6
   11|Active     |    1|Jetty :: Http Utility 
(9.3.14.v20161028)|9.3.14.v20161028
   12|Active     |    1|Jetty :: IO Utility 
(9.3.14.v20161028)|9.3.14.v20161028
   13|Active     |    1|Jetty :: Security 
(9.3.14.v20161028)|9.3.14.v20161028
   14|Active     |    1|Jetty :: Server Core 
(9.3.14.v20161028)|9.3.14.v20161028
   15|Active     |    1|Jetty :: Servlet Handling 
(9.3.14.v20161028)|9.3.14.v20161028
   16|Active     |    1|Jetty :: Utilities 
(9.3.14.v20161028)|9.3.14.v20161028
   17|Active     |    1|Jetty :: XML utilities 
(9.3.14.v20161028)|9.3.14.v20161028
   18|Active     |    1|OPS4J Pax Logging - API (1.9.1)|1.9.1
   19|Active     |    1|OPS4J Pax Logging - Logback Service (1.9.1)|1.9.1
   20|Active     |    1|Apache XBean OSGI Bundle Utilities 
(4.6.0.SNAPSHOT)|4.6.0.SNAPSHOT
   21|Active     |    1|Apache XBean :: Classpath Resource Finder 
(4.6.0.SNAPSHOT)|4.6.0.SNAPSHOT
   22|Active     |    1|OPS4J Pax Web - API 
(6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT
   23|Active     |    1|OPS4J Pax Web - Jetty 
(6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT
   24|Active     |    1|OPS4J Pax Web - Runtime 
(6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT
   25|Active     |    1|OPS4J Pax Web - Service SPI 
(6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT
   26|Active     |    1|ASM all classes with debug info 
(6.0.0.ALPHA)|6.0.0.ALPHA
   27|Active     |    1|osgi.poc.hateoas (0.0.0)|0.0.0
   28|Active     |    1|javax.ws.rs-api (2.0.1)|2.0.1
   29|Active     |    1|JSON in Java (20160810.0.0)|20160810.0.0
   30|Active     |    1|XmlSchema Core (2.2.1)|2.2.1
   31|Active     |    1|javax.annotation API (1.3.0)|1.3.0
   32|Active     |    1|HK2 API module (2.5.0.b31)|2.5.0.b31
   33|Active     |    1|ServiceLocator Default Implementation 
(2.5.0.b31)|2.5.0.b31
   34|Active     |    1|OSGi resource locator bundle - used by various API 
providers that rely on META-INF/services mechanism to locate providers. 
(1.0.1)|1.0.1
   35|Active     |    1|HK2 Implementation Utilities (2.5.0.b31)|2.5.0.b31
   36|Active     |    1|jersey-repackaged-guava (2.25.0)|2.25.0
   37|Active     |    1|jersey-core-common (2.25.0)|2.25.0
   38|Active     |    1|Javassist (3.21.0.GA)|3.21.0.GA
   39|Active     |    1|jersey-core-client (2.25.0)|2.25.0
   40|Active     |    1|Bean Validation API (1.1.0.Final)|1.1.0.Final
   41|Active     |    1|aopalliance version 1.0 repackaged as a module 
(2.5.0.b31)|2.5.0.b31
   42|Active     |    1|jersey-core-server (2.25.0)|2.25.0
   43|Active     |    1|jersey-container-servlet-core (2.25.0)|2.25.0
   44|Active     |    1|javax.inject:1 as OSGi bundle 
(2.5.0.b31)|2.5.0.b31
   45|Resolved   |    1|Apache Aries JAX-RS Whiteboard 
(0.0.1.201701041146)|0.0.1.201701041146



regards
Marc

Re: jax-rs-whiteboard with jersey

Posted by Carlos Sierra Andrés <ca...@liferay.com>.
Hey Marc,

the jax-rs-whiteboard uses Apache CXF as its JAX-RS implementation. It 
is directly using CXFNonSpringServlet and other CXF artifacts so I guess 
it is not possible to use it with Jersey.

Do you wanted to use Jersey for any specific reason?

Carlos.

El 5/1/17 a las 14:34, marc.schlegel@sdv-it.de escribi:
> Hello everyone
>
> I am currently giving the jax-rs-whiteboard a test. My goal is a 
> REST-Service which uses Spring-Hateoas to create the necessary links.
>
> The provided sample uses the enroute-jsonrpc as a provider as far as I 
> could see and I am trying to get this running with CXF and Jersey.
> Unfortunately I am running in some classloading issues: 
> jaxws.ws.rs-api uses a ServiceLocator and tries to load 
> org.glassfish.jersey.internal.RuntimeDelegateImplwhich cannot be found 
> (see StackTrace and Bundles at the end).
>
>
> I am not very familiar with the BundleWiring and what classes are 
> visible when using the Classloader from this Class as done here
> https://github.com/apache/aries-jax-rs-whiteboard/blob/master/jax-rs.whiteboard/src/main/java/org/apache/aries/jax/rs/whiteboard/activator/CXFJaxRsBundleActivator.java#L96-L108 
>
>
>
> So my question is: has anyone tried to use jax-rs-whiteboard with 
> jersey yet and what dependencies are necessary?
> Or is this a bug and the bundle must be fixed for example by using a 
> dynamic-import header?
>
>
>
> 13:26:37.380 DEBUG [main] javax.ws.rs-api - BundleEvent STARTING - 
> javax.ws.rs-api
> 13:26:37.380 DEBUG [main] javax.ws.rs-api - BundleEvent STARTED - 
> javax.ws.rs-api
> 13:26:37.381 DEBUG [main] org.apache.aries.jax.rs.whiteboard - 
> BundleEvent STARTING - org.apache.aries.jax.rs.whiteboard
> 13:26:37.384 INFO  [paxweb-config-1-thread-1] 
> org.eclipse.jetty.util.log - Logging initialized @1781ms
> 13:26:37.385 DEBUG [main] javax.ws.rs.ext.FactoryFinder - Unable to 
> load provider class org.glassfish.jersey.internal.RuntimeDelegateImpl 
> using custom classloader 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5 
> trying again with current classloader.
> java.lang.ClassNotFoundException: 
> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by 
> org.apache.aries.jax.rs.whiteboard [29]
> at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)
> at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:348)
> at javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:107)
> at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:225)
> at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135)
> at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
> at 
> org.apache.aries.jax.rs.whiteboard.activator.CXFJaxRsBundleActivator.initRuntimeDelegate(CXFJaxRsBundleActivator.java:103)
> at 
> org.apache.aries.jax.rs.whiteboard.activator.CXFJaxRsBundleActivator.start(CXFJaxRsBundleActivator.java:61)
> at 
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
> at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)
> at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
> at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
> at aQute.launcher.Launcher.update(Launcher.java:483)
> at aQute.launcher.Launcher.activate(Launcher.java:382)
> at aQute.launcher.Launcher.run(Launcher.java:276)
> at aQute.launcher.Launcher.main(Launcher.java:133)
> 13:26:37.396 DEBUG [paxweb-config-1-thread-1] 
> o.e.j.u.component.ContainerLifeCycle - 
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper@775d53e4 
> added {qtp830199975{STOPPED,8<=0<=200,i=0,q=0},AUTO}
> 13:26:37.396 WARN  [main] org.jvnet.hk2.logger - Cannot find a default 
> implementation of the HK2 ServiceLocatorGenerator
> ! Failed to start bundle 
> org.apache.aries.jax.rs.whiteboard-0.0.1.201701041146, exception 
> activator error java.lang.ClassNotFoundException: Provider 
> org.glassfish.jersey.internal.RuntimeDelegateImpl could not be 
> instantiated: java.lang.IllegalStateException: No generator was 
> provided and there is no default generator registered from: 
> javax.ws.rs.ext.RuntimeDelegate:findDelegate#152
> 13:26:37.396 DEBUG [main] org.apache.aries.jax.rs.whiteboard - 
> BundleEvent STOPPING - org.apache.aries.jax.rs.whiteboard
> 13:26:37.396 DEBUG [main] org.apache.aries.jax.rs.whiteboard - 
> BundleEvent STOPPED - org.apache.aries.jax.rs.whiteboard
>
>
> START LEVEL 1
>    ID|State      |Level|Name
>     0|Active     |    0|System Bundle (5.6.1)|5.6.1
>     1|Active     |    1|Java Servlet API (3.1.0)|3.1.0
>     2|Active     |    1|Apache Felix Metatype Service (1.1.2)|1.1.2
>     3|Active     |    1|Apache Felix Bundle Repository (2.0.8)|2.0.8
>     4|Active     |    1|Apache Felix Configuration Admin Service 
> (1.8.12)|1.8.12
>     5|Active     |    1|Apache Felix EventAdmin (1.4.8)|1.4.8
>     6|Active     |    1|Apache Felix File Install (3.5.6)|3.5.6
>     7|Active     |    1|Apache Felix Gogo Command (1.0.0)|1.0.0
>     8|Active     |    1|Apache Felix Gogo Runtime (1.0.0)|1.0.0
>     9|Active     |    1|Apache Felix Gogo Shell (1.0.0)|1.0.0
>    10|Active     |    1|Apache Felix Declarative Services (2.0.6)|2.0.6
>    11|Active     |    1|Jetty :: Http Utility 
> (9.3.14.v20161028)|9.3.14.v20161028
>    12|Active     |    1|Jetty :: IO Utility 
> (9.3.14.v20161028)|9.3.14.v20161028
>    13|Active     |    1|Jetty :: Security 
> (9.3.14.v20161028)|9.3.14.v20161028
>    14|Active     |    1|Jetty :: Server Core 
> (9.3.14.v20161028)|9.3.14.v20161028
>    15|Active     |    1|Jetty :: Servlet Handling 
> (9.3.14.v20161028)|9.3.14.v20161028
>    16|Active     |    1|Jetty :: Utilities 
> (9.3.14.v20161028)|9.3.14.v20161028
>    17|Active     |    1|Jetty :: XML utilities 
> (9.3.14.v20161028)|9.3.14.v20161028
>    18|Active     |    1|OPS4J Pax Logging - API (1.9.1)|1.9.1
>    19|Active     |    1|OPS4J Pax Logging - Logback Service (1.9.1)|1.9.1
>    20|Active     |    1|Apache XBean OSGI Bundle Utilities 
> (4.6.0.SNAPSHOT)|4.6.0.SNAPSHOT
>    21|Active     |    1|Apache XBean :: Classpath Resource Finder 
> (4.6.0.SNAPSHOT)|4.6.0.SNAPSHOT
>    22|Active     |    1|OPS4J Pax Web - API 
> (6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT
>    23|Active     |    1|OPS4J Pax Web - Jetty 
> (6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT
>    24|Active     |    1|OPS4J Pax Web - Runtime 
> (6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT
>    25|Active     |    1|OPS4J Pax Web - Service SPI 
> (6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT
>    26|Active     |    1|ASM all classes with debug info 
> (6.0.0.ALPHA)|6.0.0.ALPHA
>    27|Active     |    1|osgi.poc.hateoas (0.0.0)|0.0.0
>    28|Active     |    1|javax.ws.rs-api (2.0.1)|2.0.1
>    29|Active     |    1|JSON in Java (20160810.0.0)|20160810.0.0
>    30|Active     |    1|XmlSchema Core (2.2.1)|2.2.1
>    31|Active     |    1|javax.annotation API (1.3.0)|1.3.0
>    32|Active     |    1|HK2 API module (2.5.0.b31)|2.5.0.b31
>    33|Active     |    1|ServiceLocator Default Implementation 
> (2.5.0.b31)|2.5.0.b31
>    34|Active     |    1|OSGi resource locator bundle - used by various 
> API providers that rely on META-INF/services mechanism to locate 
> providers. (1.0.1)|1.0.1
>    35|Active     |    1|HK2 Implementation Utilities 
> (2.5.0.b31)|2.5.0.b31
>    36|Active     |    1|jersey-repackaged-guava (2.25.0)|2.25.0
>    37|Active     |    1|jersey-core-common (2.25.0)|2.25.0
>    38|Active     |    1|Javassist (3.21.0.GA)|3.21.0.GA
>    39|Active     |    1|jersey-core-client (2.25.0)|2.25.0
>    40|Active     |    1|Bean Validation API (1.1.0.Final)|1.1.0.Final
>    41|Active     |    1|aopalliance version 1.0 repackaged as a module 
> (2.5.0.b31)|2.5.0.b31
>    42|Active     |    1|jersey-core-server (2.25.0)|2.25.0
>    43|Active     |    1|jersey-container-servlet-core (2.25.0)|2.25.0
>    44|Active     |    1|javax.inject:1 as OSGi bundle 
> (2.5.0.b31)|2.5.0.b31
>    45|Resolved   |  1|Apache Aries JAX-RS Whiteboard 
> (0.0.1.201701041146)|0.0.1.201701041146
>
>
>
> regards
> Marc

Re: Antwort: Re: jax-rs-whiteboard with jersey

Posted by Carlos Sierra Andrés <ca...@liferay.com>.
Hi,

you can see examples of use here 
https://github.com/apache/aries-jax-rs-whiteboard/tree/master/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example

Also you might want to have a look at the integration tests module. That 
might be a guide on how to use it.

Bests.

Carlos.


El 9/1/17 a las 11:21, marc.schlegel@sdv-it.de escribi:
> Hi Carlos
>
> Thanks for the clarification. I must have missed something in the CXF 
> docu because I thought that CXF delegates to an implementation like 
> Jersey.
> I am going to remove all the Jersey stuff and see how I can leverage 
> CXF in the correct way.
>
> regards
> Marc
>
>
>
> Von: Carlos Sierra Andrs <ca...@liferay.com>
> An: user@aries.apache.org,
> Datum: 09.01.2017 08:30
> Betreff: Re: jax-rs-whiteboard with jersey
> ------------------------------------------------------------------------
>
>
>
> Hey Marc,
>
> the jax-rs-whiteboard uses Apache CXF as its JAX-RS implementation. It 
> is directly using CXFNonSpringServlet and other CXF artifacts so I 
> guess it is not possible to use it with Jersey.
>
> Do you wanted to use Jersey for any specific reason?
>
> Carlos.
>
> El 5/1/17 a las 14:34, _marc.schlegel@sdv-it.de_ 
> <ma...@sdv-it.de>escribi:
> Hello everyone
>
> I am currently giving the jax-rs-whiteboard a test. My goal is a 
> REST-Service which uses Spring-Hateoas to create the necessary links.
>
> The provided sample uses the enroute-jsonrpc as a provider as far as I 
> could see and I am trying to get this running with CXF and Jersey.
> Unfortunately I am running in some classloading issues: 
> jaxws.ws.rs-api uses a ServiceLocator and tries to load 
> org.glassfish.jersey.internal.RuntimeDelegateImplwhich cannot be found 
> (see StackTrace and Bundles at the end).
>
>
> I am not very familiar with the BundleWiring and what classes are 
> visible when using the Classloader from this Class as done here_
> __https://github.com/apache/aries-jax-rs-whiteboard/blob/master/jax-rs.whiteboard/src/main/java/org/apache/aries/jax/rs/whiteboard/activator/CXFJaxRsBundleActivator.java#L96-L108_
>
>
> So my question is: has anyone tried to use jax-rs-whiteboard with 
> jersey yet and what dependencies are necessary?
> Or is this a bug and the bundle must be fixed for example by using a 
> dynamic-import header?
>
>
>
> 13:26:37.380 DEBUG [main] javax.ws.rs-api - BundleEvent STARTING - 
> javax.ws.rs-api
> 13:26:37.380 DEBUG [main] javax.ws.rs-api - BundleEvent STARTED - 
> javax.ws.rs-api
> 13:26:37.381 DEBUG [main] org.apache.aries.jax.rs.whiteboard - 
> BundleEvent STARTING - org.apache.aries.jax.rs.whiteboard
> 13:26:37.384 INFO  [paxweb-config-1-thread-1] 
> org.eclipse.jetty.util.log - Logging initialized @1781ms
> 13:26:37.385 DEBUG [main] javax.ws.rs.ext.FactoryFinder - Unable to 
> load provider class org.glassfish.jersey.internal.RuntimeDelegateImpl 
> using custom classloader 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5 
> trying again with current classloader.
> java.lang.ClassNotFoundException: 
> org.glassfish.jersey.internal.RuntimeDelegateImpl not found by 
> org.apache.aries.jax.rs.whiteboard [29]
>         at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)
>         at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
>         at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:348)
>         at 
> javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:107)
>         at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:225)
>         at 
> javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135)
>         at 
> javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120)
>         at 
> org.apache.aries.jax.rs.whiteboard.activator.CXFJaxRsBundleActivator.initRuntimeDelegate(CXFJaxRsBundleActivator.java:103)
>         at 
> org.apache.aries.jax.rs.whiteboard.activator.CXFJaxRsBundleActivator.start(CXFJaxRsBundleActivator.java:61)
>         at 
> org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
>         at 
> org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)
>         at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
>         at 
> org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
>         at aQute.launcher.Launcher.update(Launcher.java:483)
>         at aQute.launcher.Launcher.activate(Launcher.java:382)
>         at aQute.launcher.Launcher.run(Launcher.java:276)
>         at aQute.launcher.Launcher.main(Launcher.java:133)
> 13:26:37.396 DEBUG [paxweb-config-1-thread-1] 
> o.e.j.u.component.ContainerLifeCycle - 
> org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper@775d53e4 
> added {qtp830199975{STOPPED,8<=0<=200,i=0,q=0},AUTO}
> 13:26:37.396 WARN  [main] org.jvnet.hk2.logger - Cannot find a default 
> implementation of the HK2 ServiceLocatorGenerator
> ! Failed to start bundle 
> org.apache.aries.jax.rs.whiteboard-0.0.1.201701041146, exception 
> activator error java.lang.ClassNotFoundException: Provider 
> org.glassfish.jersey.internal.RuntimeDelegateImpl could not be 
> instantiated: java.lang.IllegalStateException: No generator was 
> provided and there is no default generator registered from: 
> javax.ws.rs.ext.RuntimeDelegate:findDelegate#152
> 13:26:37.396 DEBUG [main] org.apache.aries.jax.rs.whiteboard - 
> BundleEvent STOPPING - org.apache.aries.jax.rs.whiteboard
> 13:26:37.396 DEBUG [main] org.apache.aries.jax.rs.whiteboard - 
> BundleEvent STOPPED - org.apache.aries.jax.rs.whiteboard
>
>
> START LEVEL 1
>    ID|State      |Level|Name
>     0|Active     |    0|System Bundle (5.6.1)|5.6.1
>     1|Active     |    1|Java Servlet API (3.1.0)|3.1.0
>     2|Active     |    1|Apache Felix Metatype Service (1.1.2)|1.1.2
>     3|Active     |    1|Apache Felix Bundle Repository (2.0.8)|2.0.8
>     4|Active     |    1|Apache Felix Configuration Admin Service 
> (1.8.12)|1.8.12
>     5|Active     |    1|Apache Felix EventAdmin (1.4.8)|1.4.8
>     6|Active     |    1|Apache Felix File Install (3.5.6)|3.5.6
>     7|Active     |    1|Apache Felix Gogo Command (1.0.0)|1.0.0
>     8|Active     |    1|Apache Felix Gogo Runtime (1.0.0)|1.0.0
>     9|Active     |    1|Apache Felix Gogo Shell (1.0.0)|1.0.0
>    10|Active     |    1|Apache Felix Declarative Services (2.0.6)|2.0.6
>    11|Active     |    1|Jetty :: Http Utility 
> (9.3.14.v20161028)|9.3.14.v20161028
>    12|Active     |    1|Jetty :: IO Utility 
> (9.3.14.v20161028)|9.3.14.v20161028
>    13|Active     |    1|Jetty :: Security 
> (9.3.14.v20161028)|9.3.14.v20161028
>    14|Active     |    1|Jetty :: Server Core 
> (9.3.14.v20161028)|9.3.14.v20161028
>    15|Active     |    1|Jetty :: Servlet Handling 
> (9.3.14.v20161028)|9.3.14.v20161028
>    16|Active     |    1|Jetty :: Utilities 
> (9.3.14.v20161028)|9.3.14.v20161028
>    17|Active     |    1|Jetty :: XML utilities 
> (9.3.14.v20161028)|9.3.14.v20161028
>    18|Active     |    1|OPS4J Pax Logging - API (1.9.1)|1.9.1
>    19|Active     |    1|OPS4J Pax Logging - Logback Service (1.9.1)|1.9.1
>    20|Active     |    1|Apache XBean OSGI Bundle Utilities 
> (4.6.0.SNAPSHOT)|4.6.0.SNAPSHOT
>    21|Active     |    1|Apache XBean :: Classpath Resource Finder 
> (4.6.0.SNAPSHOT)|4.6.0.SNAPSHOT
>    22|Active     |    1|OPS4J Pax Web - API 
> (6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT
>    23|Active     |    1|OPS4J Pax Web - Jetty 
> (6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT
>    24|Active     |    1|OPS4J Pax Web - Runtime 
> (6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT
>    25|Active     |    1|OPS4J Pax Web - Service SPI 
> (6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT
>    26|Active     |    1|ASM all classes with debug info 
> (6.0.0.ALPHA)|6.0.0.ALPHA
>    27|Active     |    1|osgi.poc.hateoas (0.0.0)|0.0.0
>    28|Active     |    1|javax.ws.rs-api (2.0.1)|2.0.1
>    29|Active     |    1|JSON in Java (20160810.0.0)|20160810.0.0
>    30|Active     |    1|XmlSchema Core (2.2.1)|2.2.1
>    31|Active     |    1|javax.annotation API (1.3.0)|1.3.0
>    32|Active     |    1|HK2 API module (2.5.0.b31)|2.5.0.b31
>    33|Active     |    1|ServiceLocator Default Implementation 
> (2.5.0.b31)|2.5.0.b31
>    34|Active     |    1|OSGi resource locator bundle - used by various 
> API providers that rely on META-INF/services mechanism to locate 
> providers. (1.0.1)|1.0.1
>    35|Active     |    1|HK2 Implementation Utilities (2.5.0.b31)|2.5.0.b31
>    36|Active     |    1|jersey-repackaged-guava (2.25.0)|2.25.0
>    37|Active     |    1|jersey-core-common (2.25.0)|2.25.0
>    38|Active     |    1|Javassist (3.21.0.GA)|3.21.0.GA
>    39|Active     |    1|jersey-core-client (2.25.0)|2.25.0
>    40|Active     |    1|Bean Validation API (1.1.0.Final)|1.1.0.Final
>    41|Active     |    1|aopalliance version 1.0 repackaged as a module 
> (2.5.0.b31)|2.5.0.b31
>    42|Active     |    1|jersey-core-server (2.25.0)|2.25.0
>    43|Active     |    1|jersey-container-servlet-core (2.25.0)|2.25.0
>    44|Active     |    1|javax.inject:1 as OSGi bundle 
> (2.5.0.b31)|2.5.0.b31
>    45|Resolved   |    1|Apache Aries JAX-RS Whiteboard 
> (0.0.1.201701041146)|0.0.1.201701041146
>
>
>
> regards
> Marc
>

Antwort: Re: Antwort: Re: jax-rs-whiteboard with jersey

Posted by ma...@sdv-it.de.
With Carlos help I was able to understand how the jax-rs-whiteboard works 
(like embedding the CXF dependencies).

Unfortunately the jax-rs-api (RuntimeDelegate) is not able to locate the 
service-locator provided by the embedded cxf-frontend-jaxrs in my setup 
with the lates Pax-Web snapshot.
In order to reproduce this behavior, I created a sample [1] as well as an 
itegration-test [2] for the Jetty container in a dedicated Pax-Web branch. 
I turned out that I was able to reproduce it

Though Pax-Web is currently not working on R7 features the 
jaxrs-whiteboard should also work with a R6 HttpService-Impl.
At the time I cannot say wether this is a bug in Pax-Web, the Aries 
jax-rs-whiteboard, or something else.


[1] 
https://github.com/ops4j/org.ops4j.pax.web/tree/r7-jaxrs/samples/whiteboard-ds-jaxrs
[2] 
https://github.com/ops4j/org.ops4j.pax.web/blob/r7-jaxrs/pax-web-itest/pax-web-itest-container/pax-web-itest-container-jetty/src/test/java/org/ops4j/pax/web/itest/jetty/WhiteboardR7JaxRsIntegrationTest.java


Note for Pax-Web integration testing: 
the jetty-integration test has to be started at least once via maven in 
order to generate some plugin-metadata. Once the actual test is started it 
can be interrupted (because it will execute all tests) and after that the 
WhiteboardR7JaxRsIntegrationTest can be started via IDE.

regards
Marc




Von:    Carlos Sierra Andrés <ca...@liferay.com>
An:     user@aries.apache.org, 
Datum:  09.01.2017 11:34
Betreff:        Re: Antwort: Re: jax-rs-whiteboard with jersey



Hi, 
you can see examples of use here 
https://github.com/apache/aries-jax-rs-whiteboard/tree/master/jax-rs.example/src/main/java/org/apache/aries/jax/rs/example
Also you might want to have a look at the integration tests module. That 
might be a guide on how to use it.
Bests. 
Carlos. 

El 9/1/17 a las 11:21, marc.schlegel@sdv-it.de escribió:
Hi Carlos 

Thanks for the clarification. I must have missed something in the CXF docu 
because I thought that CXF delegates to an implementation like Jersey. 
I am going to remove all the Jersey stuff and see how I can leverage CXF 
in the correct way. 

regards 
Marc 



Von:        Carlos Sierra Andrés <ca...@liferay.com> 
An:        user@aries.apache.org, 
Datum:        09.01.2017 08:30 
Betreff:        Re: jax-rs-whiteboard with jersey 



Hey Marc, 
the jax-rs-whiteboard uses Apache CXF as its JAX-RS implementation. It is 
directly using CXFNonSpringServlet and other CXF artifacts so I guess it 
is not possible to use it with Jersey. 
Do you wanted to use Jersey for any specific reason? 
Carlos. 
El 5/1/17 a las 14:34, marc.schlegel@sdv-it.de escribió: 
Hello everyone 

I am currently giving the jax-rs-whiteboard a test. My goal is a 
REST-Service which uses Spring-Hateoas to create the necessary links. 

The provided sample uses the enroute-jsonrpc as a provider as far as I 
could see and I am trying to get this running with CXF and Jersey. 
Unfortunately I am running in some classloading issues: jaxws.ws.rs-api 
uses a ServiceLocator and tries to load 
org.glassfish.jersey.internal.RuntimeDelegateImpl which cannot be found 
(see StackTrace and Bundles at the end). 


I am not very familiar with the BundleWiring and what classes are visible 
when using the Classloader from this Class as done here 
https://github.com/apache/aries-jax-rs-whiteboard/blob/master/jax-rs.whiteboard/src/main/java/org/apache/aries/jax/rs/whiteboard/activator/CXFJaxRsBundleActivator.java#L96-L108 



So my question is: has anyone tried to use jax-rs-whiteboard with jersey 
yet and what dependencies are necessary? 
Or is this a bug and the bundle must be fixed for example by using a 
dynamic-import header? 



13:26:37.380 DEBUG [main] javax.ws.rs-api - BundleEvent STARTING - 
javax.ws.rs-api 
13:26:37.380 DEBUG [main] javax.ws.rs-api - BundleEvent STARTED - 
javax.ws.rs-api 
13:26:37.381 DEBUG [main] org.apache.aries.jax.rs.whiteboard - BundleEvent 
STARTING - org.apache.aries.jax.rs.whiteboard 
13:26:37.384 INFO  [paxweb-config-1-thread-1] org.eclipse.jetty.util.log - 
Logging initialized @1781ms 
13:26:37.385 DEBUG [main] javax.ws.rs.ext.FactoryFinder - Unable to load 
provider class org.glassfish.jersey.internal.RuntimeDelegateImpl using 
custom classloader 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5 trying 
again with current classloader. 
java.lang.ClassNotFoundException: 
org.glassfish.jersey.internal.RuntimeDelegateImpl not found by 
org.apache.aries.jax.rs.whiteboard [29] 
        at 
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)
        at 
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
        at 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
        at java.lang.Class.forName0(Native Method) 
        at java.lang.Class.forName(Class.java:348) 
        at 
javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:107) 
        at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:225) 
        at 
javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135) 
        at 
javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120) 
        at 
org.apache.aries.jax.rs.whiteboard.activator.CXFJaxRsBundleActivator.initRuntimeDelegate(CXFJaxRsBundleActivator.java:103)
        at 
org.apache.aries.jax.rs.whiteboard.activator.CXFJaxRsBundleActivator.start(CXFJaxRsBundleActivator.java:61)
        at 
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
        at 
org.apache.felix.framework.Felix.activateBundle(Felix.java:2226) 
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2144) 
        at 
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) 
        at aQute.launcher.Launcher.update(Launcher.java:483) 
        at aQute.launcher.Launcher.activate(Launcher.java:382) 
        at aQute.launcher.Launcher.run(Launcher.java:276) 
        at aQute.launcher.Launcher.main(Launcher.java:133) 
13:26:37.396 DEBUG [paxweb-config-1-thread-1] 
o.e.j.u.component.ContainerLifeCycle - 
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper@775d53e4 added 
{qtp830199975{STOPPED,8<=0<=200,i=0,q=0},AUTO} 
13:26:37.396 WARN  [main] org.jvnet.hk2.logger - Cannot find a default 
implementation of the HK2 ServiceLocatorGenerator 
! Failed to start bundle 
org.apache.aries.jax.rs.whiteboard-0.0.1.201701041146, exception activator 
error java.lang.ClassNotFoundException: Provider 
org.glassfish.jersey.internal.RuntimeDelegateImpl could not be 
instantiated: java.lang.IllegalStateException: No generator was provided 
and there is no default generator registered from: 
javax.ws.rs.ext.RuntimeDelegate:findDelegate#152 
13:26:37.396 DEBUG [main] org.apache.aries.jax.rs.whiteboard - BundleEvent 
STOPPING - org.apache.aries.jax.rs.whiteboard 
13:26:37.396 DEBUG [main] org.apache.aries.jax.rs.whiteboard - BundleEvent 
STOPPED - org.apache.aries.jax.rs.whiteboard 


START LEVEL 1 
   ID|State      |Level|Name 
    0|Active     |    0|System Bundle (5.6.1)|5.6.1 
    1|Active     |    1|Java Servlet API (3.1.0)|3.1.0 
    2|Active     |    1|Apache Felix Metatype Service (1.1.2)|1.1.2 
    3|Active     |    1|Apache Felix Bundle Repository (2.0.8)|2.0.8 
    4|Active     |    1|Apache Felix Configuration Admin Service 
(1.8.12)|1.8.12 
    5|Active     |    1|Apache Felix EventAdmin (1.4.8)|1.4.8 
    6|Active     |    1|Apache Felix File Install (3.5.6)|3.5.6 
    7|Active     |    1|Apache Felix Gogo Command (1.0.0)|1.0.0 
    8|Active     |    1|Apache Felix Gogo Runtime (1.0.0)|1.0.0 
    9|Active     |    1|Apache Felix Gogo Shell (1.0.0)|1.0.0 
   10|Active     |    1|Apache Felix Declarative Services (2.0.6)|2.0.6 
   11|Active     |    1|Jetty :: Http Utility 
(9.3.14.v20161028)|9.3.14.v20161028 
   12|Active     |    1|Jetty :: IO Utility 
(9.3.14.v20161028)|9.3.14.v20161028 
   13|Active     |    1|Jetty :: Security 
(9.3.14.v20161028)|9.3.14.v20161028 
   14|Active     |    1|Jetty :: Server Core 
(9.3.14.v20161028)|9.3.14.v20161028 
   15|Active     |    1|Jetty :: Servlet Handling 
(9.3.14.v20161028)|9.3.14.v20161028 
   16|Active     |    1|Jetty :: Utilities 
(9.3.14.v20161028)|9.3.14.v20161028 
   17|Active     |    1|Jetty :: XML utilities 
(9.3.14.v20161028)|9.3.14.v20161028 
   18|Active     |    1|OPS4J Pax Logging - API (1.9.1)|1.9.1 
   19|Active     |    1|OPS4J Pax Logging - Logback Service (1.9.1)|1.9.1 
   20|Active     |    1|Apache XBean OSGI Bundle Utilities 
(4.6.0.SNAPSHOT)|4.6.0.SNAPSHOT 
   21|Active     |    1|Apache XBean :: Classpath Resource Finder 
(4.6.0.SNAPSHOT)|4.6.0.SNAPSHOT 
   22|Active     |    1|OPS4J Pax Web - API 
(6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT 
   23|Active     |    1|OPS4J Pax Web - Jetty 
(6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT 
   24|Active     |    1|OPS4J Pax Web - Runtime 
(6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT 
   25|Active     |    1|OPS4J Pax Web - Service SPI 
(6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT 
   26|Active     |    1|ASM all classes with debug info 
(6.0.0.ALPHA)|6.0.0.ALPHA 
   27|Active     |    1|osgi.poc.hateoas (0.0.0)|0.0.0 
   28|Active     |    1|javax.ws.rs-api (2.0.1)|2.0.1 
   29|Active     |    1|JSON in Java (20160810.0.0)|20160810.0.0 
   30|Active     |    1|XmlSchema Core (2.2.1)|2.2.1 
   31|Active     |    1|javax.annotation API (1.3.0)|1.3.0 
   32|Active     |    1|HK2 API module (2.5.0.b31)|2.5.0.b31 
   33|Active     |    1|ServiceLocator Default Implementation 
(2.5.0.b31)|2.5.0.b31 
   34|Active     |    1|OSGi resource locator bundle - used by various API 
providers that rely on META-INF/services mechanism to locate providers. 
(1.0.1)|1.0.1 
   35|Active     |    1|HK2 Implementation Utilities (2.5.0.b31)|2.5.0.b31 

   36|Active     |    1|jersey-repackaged-guava (2.25.0)|2.25.0 
   37|Active     |    1|jersey-core-common (2.25.0)|2.25.0 
   38|Active     |    1|Javassist (3.21.0.GA)|3.21.0.GA 
   39|Active     |    1|jersey-core-client (2.25.0)|2.25.0 
   40|Active     |    1|Bean Validation API (1.1.0.Final)|1.1.0.Final 
   41|Active     |    1|aopalliance version 1.0 repackaged as a module 
(2.5.0.b31)|2.5.0.b31 
   42|Active     |    1|jersey-core-server (2.25.0)|2.25.0 
   43|Active     |    1|jersey-container-servlet-core (2.25.0)|2.25.0 
   44|Active     |    1|javax.inject:1 as OSGi bundle 
(2.5.0.b31)|2.5.0.b31 
   45|Resolved   |    1|Apache Aries JAX-RS Whiteboard 
(0.0.1.201701041146)|0.0.1.201701041146 



regards 
Marc 

Antwort: Re: jax-rs-whiteboard with jersey

Posted by ma...@sdv-it.de.
Hi Carlos

Thanks for the clarification. I must have missed something in the CXF docu 
because I thought that CXF delegates to an implementation like Jersey. 
I am going to remove all the Jersey stuff and see how I can leverage CXF 
in the correct way.

regards
Marc



Von:    Carlos Sierra Andrés <ca...@liferay.com>
An:     user@aries.apache.org, 
Datum:  09.01.2017 08:30
Betreff:        Re: jax-rs-whiteboard with jersey



Hey Marc, 
the jax-rs-whiteboard uses Apache CXF as its JAX-RS implementation. It is 
directly using CXFNonSpringServlet and other CXF artifacts so I guess it 
is not possible to use it with Jersey.
Do you wanted to use Jersey for any specific reason?
Carlos.
El 5/1/17 a las 14:34, marc.schlegel@sdv-it.de escribió:
Hello everyone 

I am currently giving the jax-rs-whiteboard a test. My goal is a 
REST-Service which uses Spring-Hateoas to create the necessary links. 

The provided sample uses the enroute-jsonrpc as a provider as far as I 
could see and I am trying to get this running with CXF and Jersey. 
Unfortunately I am running in some classloading issues: jaxws.ws.rs-api 
uses a ServiceLocator and tries to load 
org.glassfish.jersey.internal.RuntimeDelegateImpl which cannot be found 
(see StackTrace and Bundles at the end). 


I am not very familiar with the BundleWiring and what classes are visible 
when using the Classloader from this Class as done here 
https://github.com/apache/aries-jax-rs-whiteboard/blob/master/jax-rs.whiteboard/src/main/java/org/apache/aries/jax/rs/whiteboard/activator/CXFJaxRsBundleActivator.java#L96-L108 



So my question is: has anyone tried to use jax-rs-whiteboard with jersey 
yet and what dependencies are necessary? 
Or is this a bug and the bundle must be fixed for example by using a 
dynamic-import header? 



13:26:37.380 DEBUG [main] javax.ws.rs-api - BundleEvent STARTING - 
javax.ws.rs-api 
13:26:37.380 DEBUG [main] javax.ws.rs-api - BundleEvent STARTED - 
javax.ws.rs-api 
13:26:37.381 DEBUG [main] org.apache.aries.jax.rs.whiteboard - BundleEvent 
STARTING - org.apache.aries.jax.rs.whiteboard 
13:26:37.384 INFO  [paxweb-config-1-thread-1] org.eclipse.jetty.util.log - 
Logging initialized @1781ms 
13:26:37.385 DEBUG [main] javax.ws.rs.ext.FactoryFinder - Unable to load 
provider class org.glassfish.jersey.internal.RuntimeDelegateImpl using 
custom classloader 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoaderJava5 trying 
again with current classloader. 
java.lang.ClassNotFoundException: 
org.glassfish.jersey.internal.RuntimeDelegateImpl not found by 
org.apache.aries.jax.rs.whiteboard [29] 
        at 
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1574)
        at 
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
        at 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) 
        at java.lang.Class.forName0(Native Method) 
        at java.lang.Class.forName(Class.java:348) 
        at 
javax.ws.rs.ext.FactoryFinder.newInstance(FactoryFinder.java:107) 
        at javax.ws.rs.ext.FactoryFinder.find(FactoryFinder.java:225) 
        at 
javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:135) 
        at 
javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:120) 
        at 
org.apache.aries.jax.rs.whiteboard.activator.CXFJaxRsBundleActivator.initRuntimeDelegate(CXFJaxRsBundleActivator.java:103)
        at 
org.apache.aries.jax.rs.whiteboard.activator.CXFJaxRsBundleActivator.start(CXFJaxRsBundleActivator.java:61)
        at 
org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
        at 
org.apache.felix.framework.Felix.activateBundle(Felix.java:2226) 
        at org.apache.felix.framework.Felix.startBundle(Felix.java:2144) 
        at 
org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998) 
        at aQute.launcher.Launcher.update(Launcher.java:483) 
        at aQute.launcher.Launcher.activate(Launcher.java:382) 
        at aQute.launcher.Launcher.run(Launcher.java:276) 
        at aQute.launcher.Launcher.main(Launcher.java:133) 
13:26:37.396 DEBUG [paxweb-config-1-thread-1] 
o.e.j.u.component.ContainerLifeCycle - 
org.ops4j.pax.web.service.jetty.internal.JettyServerWrapper@775d53e4 added 
{qtp830199975{STOPPED,8<=0<=200,i=0,q=0},AUTO} 
13:26:37.396 WARN  [main] org.jvnet.hk2.logger - Cannot find a default 
implementation of the HK2 ServiceLocatorGenerator 
! Failed to start bundle 
org.apache.aries.jax.rs.whiteboard-0.0.1.201701041146, exception activator 
error java.lang.ClassNotFoundException: Provider 
org.glassfish.jersey.internal.RuntimeDelegateImpl could not be 
instantiated: java.lang.IllegalStateException: No generator was provided 
and there is no default generator registered from: 
javax.ws.rs.ext.RuntimeDelegate:findDelegate#152 
13:26:37.396 DEBUG [main] org.apache.aries.jax.rs.whiteboard - BundleEvent 
STOPPING - org.apache.aries.jax.rs.whiteboard 
13:26:37.396 DEBUG [main] org.apache.aries.jax.rs.whiteboard - BundleEvent 
STOPPED - org.apache.aries.jax.rs.whiteboard 


START LEVEL 1 
   ID|State      |Level|Name 
    0|Active     |    0|System Bundle (5.6.1)|5.6.1 
    1|Active     |    1|Java Servlet API (3.1.0)|3.1.0 
    2|Active     |    1|Apache Felix Metatype Service (1.1.2)|1.1.2 
    3|Active     |    1|Apache Felix Bundle Repository (2.0.8)|2.0.8 
    4|Active     |    1|Apache Felix Configuration Admin Service 
(1.8.12)|1.8.12 
    5|Active     |    1|Apache Felix EventAdmin (1.4.8)|1.4.8 
    6|Active     |    1|Apache Felix File Install (3.5.6)|3.5.6 
    7|Active     |    1|Apache Felix Gogo Command (1.0.0)|1.0.0 
    8|Active     |    1|Apache Felix Gogo Runtime (1.0.0)|1.0.0 
    9|Active     |    1|Apache Felix Gogo Shell (1.0.0)|1.0.0 
   10|Active     |    1|Apache Felix Declarative Services (2.0.6)|2.0.6 
   11|Active     |    1|Jetty :: Http Utility 
(9.3.14.v20161028)|9.3.14.v20161028 
   12|Active     |    1|Jetty :: IO Utility 
(9.3.14.v20161028)|9.3.14.v20161028 
   13|Active     |    1|Jetty :: Security 
(9.3.14.v20161028)|9.3.14.v20161028 
   14|Active     |    1|Jetty :: Server Core 
(9.3.14.v20161028)|9.3.14.v20161028 
   15|Active     |    1|Jetty :: Servlet Handling 
(9.3.14.v20161028)|9.3.14.v20161028 
   16|Active     |    1|Jetty :: Utilities 
(9.3.14.v20161028)|9.3.14.v20161028 
   17|Active     |    1|Jetty :: XML utilities 
(9.3.14.v20161028)|9.3.14.v20161028 
   18|Active     |    1|OPS4J Pax Logging - API (1.9.1)|1.9.1 
   19|Active     |    1|OPS4J Pax Logging - Logback Service (1.9.1)|1.9.1 
   20|Active     |    1|Apache XBean OSGI Bundle Utilities 
(4.6.0.SNAPSHOT)|4.6.0.SNAPSHOT 
   21|Active     |    1|Apache XBean :: Classpath Resource Finder 
(4.6.0.SNAPSHOT)|4.6.0.SNAPSHOT 
   22|Active     |    1|OPS4J Pax Web - API 
(6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT 
   23|Active     |    1|OPS4J Pax Web - Jetty 
(6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT 
   24|Active     |    1|OPS4J Pax Web - Runtime 
(6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT 
   25|Active     |    1|OPS4J Pax Web - Service SPI 
(6.0.1.SNAPSHOT)|6.0.1.SNAPSHOT 
   26|Active     |    1|ASM all classes with debug info 
(6.0.0.ALPHA)|6.0.0.ALPHA 
   27|Active     |    1|osgi.poc.hateoas (0.0.0)|0.0.0 
   28|Active     |    1|javax.ws.rs-api (2.0.1)|2.0.1 
   29|Active     |    1|JSON in Java (20160810.0.0)|20160810.0.0 
   30|Active     |    1|XmlSchema Core (2.2.1)|2.2.1 
   31|Active     |    1|javax.annotation API (1.3.0)|1.3.0 
   32|Active     |    1|HK2 API module (2.5.0.b31)|2.5.0.b31 
   33|Active     |    1|ServiceLocator Default Implementation 
(2.5.0.b31)|2.5.0.b31 
   34|Active     |    1|OSGi resource locator bundle - used by various API 
providers that rely on META-INF/services mechanism to locate providers. 
(1.0.1)|1.0.1 
   35|Active     |    1|HK2 Implementation Utilities (2.5.0.b31)|2.5.0.b31 

   36|Active     |    1|jersey-repackaged-guava (2.25.0)|2.25.0 
   37|Active     |    1|jersey-core-common (2.25.0)|2.25.0 
   38|Active     |    1|Javassist (3.21.0.GA)|3.21.0.GA 
   39|Active     |    1|jersey-core-client (2.25.0)|2.25.0 
   40|Active     |    1|Bean Validation API (1.1.0.Final)|1.1.0.Final 
   41|Active     |    1|aopalliance version 1.0 repackaged as a module 
(2.5.0.b31)|2.5.0.b31 
   42|Active     |    1|jersey-core-server (2.25.0)|2.25.0 
   43|Active     |    1|jersey-container-servlet-core (2.25.0)|2.25.0 
   44|Active     |    1|javax.inject:1 as OSGi bundle 
(2.5.0.b31)|2.5.0.b31 
   45|Resolved   |    1|Apache Aries JAX-RS Whiteboard 
(0.0.1.201701041146)|0.0.1.201701041146 



regards 
Marc