Hi
Do you embed meta-in fin your bundle ? You can take a look on elasticsearch 7.x service mix bundle
Regards
JB
Le sam. 9 mai 2020 ? 19:30, Davi Baldin Tavares <[email protected]> a ?crit :
Hi Karaf users,My bundle is using Elasticsearch 7.x. jars and everything is almost working well, except for internal classes not being constructed well. Code is working no tests outside Karaf.While investigating, I?ve found this piece of codeXContentBuilder.class:117 (Elastic)// Load pluggable extensionsfor (XContentBuilderExtension service : ServiceLoader.load(XContentBuilderExtension.class)) {Map<Class<?>, Writer> addlWriters = service.getXContentWriters();Jar file has META-INF/services file for XContentBuilderExtension (the piece of code that is not being resolved while using Karaf). I?m using 4.2.7Unfortunately, Elasting isn?t OSGi ready either (no Bundle META):karaf@root()> bundle:install -s mvn:org.elasticsearch/elasticsearch/7.6.2 Bundle IDs:Error executing command: Error installing bundles:Unable to install bundle mvn:org.elasticsearch/elasticsearch/7.6.2: org.osgi.framework.BundleException: OSGi R3 bundle not supported karaf@root()> bundle:install -s mvn:org.elasticsearch.client/elasticsearch-rest-high-level-client/7.6.2 Bundle IDs:Error executing command: Error installing bundles:Unable to install bundle mvn:org.elasticsearch.client/elasticsearch-rest-high-level-client/7.6.2: org.osgi.framework.BundleException: OSGi R3 bundle not supported Is there a way to make sure ServiceLoader is able to work with JARs inside bundle?s class path?Thanks,Davi
