apache karaf - Jersey Client (JAX-RS 2) not working in OSGI -



apache karaf - Jersey Client (JAX-RS 2) not working in OSGI -

i attempting install , utilize bailiwick of jersey 2 in karaf version 3. features.xml (provisioning) contains next dependencies:

class="lang-java prettyprint-override"><bundle>mvn:javax.ws.rs/javax.ws.rs-api/2.0.1</bundle> <bundle>mvn:org.glassfish.hk2/hk2-locator/2.3.0</bundle> <bundle>mvn:org.glassfish.hk2/osgi-resource-locator/1.0.1</bundle> <bundle>mvn:org.glassfish.jersey.core/jersey-common/2.12</bundle> <bundle>mvn:org.glassfish.jersey.bundles.repackaged/jersey-guava/2.12</bundle> <bundle>mvn:org.glassfish.hk2/hk2-utils/2.3.0</bundle> <bundle>mvn:org.glassfish.hk2/hk2-api/2.3.0-b10</bundle> <bundle>mvn:org.glassfish.hk2.external/javax.inject/2.3.0-b10</bundle> <bundle>mvn:org.glassfish.jersey.core/jersey-client/2.12</bundle>

my code outside of container posts requests on using within osgi container fails when attempting dynamically load required javax.ws.rs.* implementing classes, per edited stack trace below:

class="lang-java prettyprint-override">at java.lang.classloader.loadclass(classloader.java:358)[:1.7.0_51] @ java.lang.class.forname0(native method)[:1.7.0_51] @ java.lang.class.forname(class.java:270)[:1.7.0_51] @ javax.ws.rs.ext.factoryfinder.newinstance(factoryfinder.java:107) @ javax.ws.rs.ext.factoryfinder.find(factoryfinder.java:225)

the import-package of manifest using contains following:

class="lang-java prettyprint-override">com.google.common.base;version="[18.0,19)",com.google.common.collect;version="[18.0,19)",com.google.gson;version="[2.2,3)",javax.ws.rs;version="2.0,3)",javax.ws.rs.client;version="[2.0,3)",javax.ws.rs.core;version="[2.0,3)",javax.ws.rs.ext;version="[2.0,3)"

how bundle bailiwick of jersey client or service avoid problems caused, osgi, of class.forname used in factoryfinder.newinstance() method ?

jersey-2.0 apache-karaf osgi-bundle

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -