karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siano, Stephan" <stephan.si...@sap.com>
Subject Karaf 4.2.0 and endorsed libs
Date Thu, 01 Mar 2018 07:04:04 GMT
Hi,

Till Karaf 4.1.x the endorsed libs delivered with karaf contain some servicemix wrapped bundles
for standard javax APIs. An example for this is the Stax API (javax.xml.stream). These wrapped
API bundles replace the implementation lookup mechanism provided by the JDK with one also
working in an OSGi environment.

With Karaf 4.2.0 these endorsed libraries were removed (because Java 9 does not support endorsed
libraries anymore). What is the idea how it might still be possible to run Karaf 4.2.x with
the woodstox Stax implementation?

If you just install the woodstox-bundles as with karaf 4.1.x, you will get the following exception:
java.util.ServiceConfigurationError: javax.xml.stream.XMLInputFactory: Provider com.ctc.wstx.stax.WstxInputFactory
not found
                at java.util.ServiceLoader.fail(ServiceLoader.java:239)
                at java.util.ServiceLoader.access$300(ServiceLoader.java:185)
                at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:372)
                at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404)
                at java.util.ServiceLoader$1.next(ServiceLoader.java:480)
                at javax.xml.stream.FactoryFinder$1.run(FactoryFinder.java:353)
                at java.security.AccessController.doPrivileged(Native Method)
                at javax.xml.stream.FactoryFinder.findServiceProvider(FactoryFinder.java:341)
                at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:313)
                at javax.xml.stream.FactoryFinder.find(FactoryFinder.java:227)
                at javax.xml.stream.XMLInputFactory.newFactory(XMLInputFactory.java:205)

Is there any idea how this might work? I am aware that as long as I am using Java 8 I might
just re-introduce the stax-api bundle to lib/endorsed, but what are the ideas for this on
Java 9?

Best regards
Stephan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message