karaf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guillaume Nodet <gno...@apache.org>
Subject Re: Karaf 4.2.0 and endorsed libs
Date Thu, 22 Mar 2018 17:32:49 GMT
I see several options:
  - using aries spi-fly
  - deploy the smx specs as java modules
  - deploy the provider as a java module
  - instantiate the provider explicitely from the consumer

I'm going to investigate, but the easier might be to use spi-fly.  It would
require 2 fragments (or modifications), but this is not a generic solution:
each provider / consumer has to be extended in some way to opt-in.

Also, things like javamail might get a bit tricky...


2018-03-01 8:04 GMT+01:00 Siano, Stephan <stephan.siano@sap.com>:

> 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$LazyIt
> erator.nextService(ServiceLoader.java:372)
>                 at java.util.ServiceLoader$LazyIt
> erator.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.XMLInputFacto
> ry.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
>



-- 
------------------------
Guillaume Nodet

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