Karaf 4.2.1 JDK 10 - provide jax-ws

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Karaf 4.2.1 JDK 10 - provide jax-ws

lechlukasz

Hello,

 

After starting my app in Karaf 4.2.1  with Java 10 I’m getting errors:

 

java.lang.ClassNotFoundException: javax.xml.ws.Service

         at java.net.URLClassLoader.findClass(URLClassLoader.java:466) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:566) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]

         at org.apache.felix.framework.ExtensionManager$ExtensionManagerWiring.getClassByDelegation(ExtensionManager.java:940) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1660) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1590) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]

I’ve checked what imports the bundle that have triggered this error, and it imports javax.xml.ws from System bundle (0):

 

javax.xml,version=0.0.0 from org.apache.felix.framework (0) -- Overwritten by Boot Delegation
javax.xml.bind,version=2.2.1 from 
org.apache.felix.framework (0)
javax.xml.namespace,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.parsers,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.stream,version=1.2.0 from 
org.apache.felix.framework (0)
javax.xml.stream.events,version=1.2.0 from 
org.apache.felix.framework (0)
javax.xml.transform,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.transform.stream,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.validation,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.ws,version=2.2.0 from 
org.apache.felix.framework (0)

 

What do I need to do to use JAX-WS in Karaf 4.2.1 with JDK 10? Is the import of javax.xml.ws. packages from system bundle OK?

I suppose it might be tricky to get the same set of features working with JDK 8 and 10, but in case of JAX-WS I haven’t even found the boundles with JAX-WS that I can install. Jaxws-rt bundles from Maven Repository that I’ve found are not OSGi bundles…

 

Best regards,

Lukasz Lech

 

 

 

Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

jbonofre
Hi,

in etc/jre.properties, jre-10/11 are the same as jre-9.

The javax.xml.ws* packages are coming for the JRE/JDK (it's what system
bundle means).

What's the exact Java version you are using ?

Regards
JB

On 14/09/2018 15:17, Lukasz Lech wrote:

> Hello,
>
>  
>
> After starting my app in Karaf 4.2.1  with Java 10 I’m getting errors:
>
>  
>
> java.lang.ClassNotFoundException: javax.xml.ws.Service
>
>          at java.net.URLClassLoader.findClass(URLClassLoader.java:466)
> ~[?:?]
>
>          at java.lang.ClassLoader.loadClass(ClassLoader.java:566) ~[?:?]
>
>          at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]
>
>          at
> org.apache.felix.framework.ExtensionManager$ExtensionManagerWiring.getClassByDelegation(ExtensionManager.java:940)
> ~[?:?]
>
>          at
> org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1660)
> ~[?:?]
>
>          at
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1590)
> ~[?:?]
>
>          at
> org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
> ~[?:?]
>
>          at
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
> ~[?:?]
>
>          at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]
>
> I’ve checked what imports the bundle that have triggered this error, and
> it imports javax.xml.ws from System bundle (0):
>
>  
>
> javax.xml,version=0.0.0 from org.apache.felix.framework (0)
> <http://lx-entw3:8192/system/console/bundles/0> -- Overwritten by Boot
> Delegation
> javax.xml.bind,version=2.2.1 from org.apache.felix.framework (0)
> <http://lx-entw3:8192/system/console/bundles/0>
> javax.xml.namespace,version=0.0.0 from org.apache.felix.framework (0)
> <http://lx-entw3:8192/system/console/bundles/0>
> javax.xml.parsers,version=0.0.0 from org.apache.felix.framework (0)
> <http://lx-entw3:8192/system/console/bundles/0>
> javax.xml.stream,version=1.2.0 from org.apache.felix.framework (0)
> <http://lx-entw3:8192/system/console/bundles/0>
> javax.xml.stream.events,version=1.2.0 from org.apache.felix.framework
> (0) <http://lx-entw3:8192/system/console/bundles/0>
> javax.xml.transform,version=0.0.0 from org.apache.felix.framework (0)
> <http://lx-entw3:8192/system/console/bundles/0>
> javax.xml.transform.stream,version=0.0.0 from org.apache.felix.framework
> (0) <http://lx-entw3:8192/system/console/bundles/0>
> javax.xml.validation,version=0.0.0 from org.apache.felix.framework (0)
> <http://lx-entw3:8192/system/console/bundles/0>
> javax.xml.ws,version=2.2.0 from org.apache.felix.framework (0)
> <http://lx-entw3:8192/system/console/bundles/0>
>
>  
>
> What do I need to do to use JAX-WS in Karaf 4.2.1 with JDK 10? Is the
> import of javax.xml.ws. packages from system bundle OK?
>
> I suppose it might be tricky to get the same set of features working
> with JDK 8 and 10, but in case of JAX-WS I haven’t even found the
> boundles with JAX-WS that I can install. Jaxws-rt bundles from Maven
> Repository that I’ve found are not OSGi bundles…
>
>  
>
> Best regards,
>
> Lukasz Lech
>
>  
>
>  
>
>  
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

Freeman-2
In reply to this post by lechlukasz
Hi,

For Java 9,10,11, we handle those versions in same way. Since several EE related jigsaw modules including javax.xml.ws will be removed from Java11 eventually, override it and let system bundle 0 expose those packages makes less sense IMO,  you need install jax-ws api bundle by yourself.

You can use servicemix wrapped one, just like we do for a long time in CXF

install -s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0



-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



On Sep 14, 2018, at 9:17 PM, Lukasz Lech <[hidden email]> wrote:

Hello,
 
After starting my app in Karaf 4.2.1  with Java 10 I’m getting errors:
 

java.lang.ClassNotFoundException: javax.xml.ws.Service

         at java.net.URLClassLoader.findClass(URLClassLoader.java:466) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:566) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]

         at org.apache.felix.framework.ExtensionManager$ExtensionManagerWiring.getClassByDelegation(ExtensionManager.java:940) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1660) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1590) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]

I’ve checked what imports the bundle that have triggered this error, and it imports javax.xml.ws from System bundle (0):
 
javax.xml,version=0.0.0 from org.apache.felix.framework (0) -- Overwritten by Boot Delegation
javax.xml.bind,version=2.2.1 from 
org.apache.felix.framework (0)
javax.xml.namespace,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.parsers,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.stream,version=1.2.0 from 
org.apache.felix.framework (0)
javax.xml.stream.events,version=1.2.0 from 
org.apache.felix.framework (0)
javax.xml.transform,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.transform.stream,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.validation,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.ws,version=2.2.0 from 
org.apache.felix.framework (0)
 
What do I need to do to use JAX-WS in Karaf 4.2.1 with JDK 10? Is the import of javax.xml.ws. packages from system bundle OK?
I suppose it might be tricky to get the same set of features working with JDK 8 and 10, but in case of JAX-WS I haven’t even found the boundles with JAX-WS that I can install. Jaxws-rt bundles from Maven Repository that I’ve found are not OSGi bundles…
 
Best regards,
Lukasz Lech

Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

Tim Ward-2
Yes, you’re tripping over one of the packages that was removed from Java because it was technically a Java EE package and could not be upgraded without upgrading Java. You either need to launch with the relevant modules enabled, or, as in the email below, add the API into your framework. The latter solution is better.

Also, Karaf needs to fix its platform definition as it incorrectly states that the system bundle provides the package. This package should only be advertised if the relevant JPMS module is also deployed.

Tim

On 14 Sep 2018, at 14:51, Freeman Fang <[hidden email]> wrote:

Hi,

For Java 9,10,11, we handle those versions in same way. Since several EE related jigsaw modules including javax.xml.ws will be removed from Java11 eventually, override it and let system bundle 0 expose those packages makes less sense IMO,  you need install jax-ws api bundle by yourself.

You can use servicemix wrapped one, just like we do for a long time in CXF

install -s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0



-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



On Sep 14, 2018, at 9:17 PM, Lukasz Lech <[hidden email]> wrote:

Hello,
 
After starting my app in Karaf 4.2.1  with Java 10 I’m getting errors:
 

java.lang.ClassNotFoundException: javax.xml.ws.Service

         at java.net.URLClassLoader.findClass(URLClassLoader.java:466) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:566) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]

         at org.apache.felix.framework.ExtensionManager$ExtensionManagerWiring.getClassByDelegation(ExtensionManager.java:940) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1660) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1590) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]

I’ve checked what imports the bundle that have triggered this error, and it imports javax.xml.ws from System bundle (0):
 
javax.xml,version=0.0.0 from org.apache.felix.framework (0) -- Overwritten by Boot Delegation
javax.xml.bind,version=2.2.1 from 
org.apache.felix.framework (0)
javax.xml.namespace,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.parsers,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.stream,version=1.2.0 from 
org.apache.felix.framework (0)
javax.xml.stream.events,version=1.2.0 from 
org.apache.felix.framework (0)
javax.xml.transform,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.transform.stream,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.validation,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.ws,version=2.2.0 from 
org.apache.felix.framework (0)
 
What do I need to do to use JAX-WS in Karaf 4.2.1 with JDK 10? Is the import of javax.xml.ws. packages from system bundle OK?
I suppose it might be tricky to get the same set of features working with JDK 8 and 10, but in case of JAX-WS I haven’t even found the boundles with JAX-WS that I can install. Jaxws-rt bundles from Maven Repository that I’ve found are not OSGi bundles…
 
Best regards,
Lukasz Lech


Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

jbonofre
In reply to this post by Freeman-2
Good point Freeman.

In that case, what do you think about removing these package from
jre.properties and let the user install the spec bundle ?
Maybe, we can also do it by default in the Karaf standard distribution.

Thoughts ?

Regards
JB

On 14/09/2018 15:51, Freeman Fang wrote:

> Hi,
>
> For Java 9,10,11, we handle those versions in same way. Since several EE
> related jigsaw modules including javax.xml.ws will be removed from
> Java11 eventually, override it and let system bundle 0 expose those
> packages makes less sense IMO,  you need install jax-ws api bundle by
> yourself.
>
> You can use servicemix wrapped one, just like we do for a long time in CXF
>
> install
> -s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0
>
>
>
> -------------
> Freeman(Yue) Fang
>
> Red Hat, Inc. 
> FuseSource is now part of Red Hat
>
>
>
>> On Sep 14, 2018, at 9:17 PM, Lukasz Lech <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Hello,
>>  
>> After starting my app in Karaf 4.2.1  with Java 10 I’m getting errors:
>>  
>>
>> java.lang.ClassNotFoundException: javax.xml.ws.Service
>>
>>          at java.net.URLClassLoader.findClass(URLClassLoader.java:466)
>> ~[?:?]
>>
>>          at java.lang.ClassLoader.loadClass(ClassLoader.java:566) ~[?:?]
>>
>>          at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]
>>
>>          at
>> org.apache.felix.framework.ExtensionManager$ExtensionManagerWiring.getClassByDelegation(ExtensionManager.java:940)
>> ~[?:?]
>>
>>          at
>> org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1660)
>> ~[?:?]
>>
>>          at
>> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1590)
>> ~[?:?]
>>
>>          at
>> org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
>> ~[?:?]
>>
>>          at
>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
>> ~[?:?]
>>
>>          at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]
>>
>> I’ve checked what imports the bundle that have triggered this error,
>> and it imports javax.xml.ws from System bundle (0):
>>  
>> javax.xml,version=0.0.0 from org.apache.felix.framework (0)
>> <http://lx-entw3:8192/system/console/bundles/0> -- Overwritten by Boot
>> Delegation
>> javax.xml.bind,version=2.2.1 from org.apache.felix.framework (0)
>> <http://lx-entw3:8192/system/console/bundles/0>
>> javax.xml.namespace,version=0.0.0 from org.apache.felix.framework (0)
>> <http://lx-entw3:8192/system/console/bundles/0>
>> javax.xml.parsers,version=0.0.0 from org.apache.felix.framework (0)
>> <http://lx-entw3:8192/system/console/bundles/0>
>> javax.xml.stream,version=1.2.0 from org.apache.felix.framework (0)
>> <http://lx-entw3:8192/system/console/bundles/0>
>> javax.xml.stream.events,version=1.2.0 from org.apache.felix.framework
>> (0) <http://lx-entw3:8192/system/console/bundles/0>
>> javax.xml.transform,version=0.0.0 from org.apache.felix.framework (0)
>> <http://lx-entw3:8192/system/console/bundles/0>
>> javax.xml.transform.stream,version=0.0.0
>> from org.apache.felix.framework (0)
>> <http://lx-entw3:8192/system/console/bundles/0>
>> javax.xml.validation,version=0.0.0 from org.apache.felix.framework (0)
>> <http://lx-entw3:8192/system/console/bundles/0>
>> javax.xml.ws,version=2.2.0 from org.apache.felix.framework (0)
>> <http://lx-entw3:8192/system/console/bundles/0>
>>  
>> What do I need to do to use JAX-WS in Karaf 4.2.1 with JDK 10? Is the
>> import of javax.xml.ws. packages from system bundle OK?
>> I suppose it might be tricky to get the same set of features working
>> with JDK 8 and 10, but in case of JAX-WS I haven’t even found the
>> boundles with JAX-WS that I can install. Jaxws-rt bundles from Maven
>> Repository that I’ve found are not OSGi bundles…
>>  
>> Best regards,
>> Lukasz Lech
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

Freeman-2
In reply to this post by Tim Ward-2
FWIW, in karaf 4.2.1, the system bundle won’t export javax.xml.ws package anymore when using jdk 9,10,11.

And since jdk11, there is no such JPMS module  for javax.xml.ws anymore from JDK.

Several modules are removed since JDK11, they are
 * java.corba — CORBA
 * java.transaction — The subset of the Java Transaction API defined by Java SE to support CORBA Object Transaction Services
 * java.activation — JavaBeans Activation Framework
 * java.xml.bind — Java Architecture for XML Binding (JAXB)
 * java.xml.ws — Java API for XML Web Services (JAX-WS), Web Services Metadata for the Java Platform, and SOAP with Attachments for Java (SAAJ)
 * java.xml.ws.annotation — The subset of the JSR-250 Common Annotations defined by Java SE to support web services

-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



On Sep 14, 2018, at 9:55 PM, Tim Ward <[hidden email]> wrote:

Yes, you’re tripping over one of the packages that was removed from Java because it was technically a Java EE package and could not be upgraded without upgrading Java. You either need to launch with the relevant modules enabled, or, as in the email below, add the API into your framework. The latter solution is better.

Also, Karaf needs to fix its platform definition as it incorrectly states that the system bundle provides the package. This package should only be advertised if the relevant JPMS module is also deployed.

Tim

On 14 Sep 2018, at 14:51, Freeman Fang <[hidden email]> wrote:

Hi,

For Java 9,10,11, we handle those versions in same way. Since several EE related jigsaw modules including javax.xml.ws will be removed from Java11 eventually, override it and let system bundle 0 expose those packages makes less sense IMO,  you need install jax-ws api bundle by yourself.

You can use servicemix wrapped one, just like we do for a long time in CXF

install -s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0



-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



On Sep 14, 2018, at 9:17 PM, Lukasz Lech <[hidden email]> wrote:

Hello,
 
After starting my app in Karaf 4.2.1  with Java 10 I’m getting errors:
 

java.lang.ClassNotFoundException: javax.xml.ws.Service

         at java.net.URLClassLoader.findClass(URLClassLoader.java:466) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:566) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]

         at org.apache.felix.framework.ExtensionManager$ExtensionManagerWiring.getClassByDelegation(ExtensionManager.java:940) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1660) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1590) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) ~[?:?]

         at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]

I’ve checked what imports the bundle that have triggered this error, and it imports javax.xml.ws from System bundle (0):
 
javax.xml,version=0.0.0 from org.apache.felix.framework (0) -- Overwritten by Boot Delegation
javax.xml.bind,version=2.2.1 from 
org.apache.felix.framework (0)
javax.xml.namespace,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.parsers,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.stream,version=1.2.0 from 
org.apache.felix.framework (0)
javax.xml.stream.events,version=1.2.0 from 
org.apache.felix.framework (0)
javax.xml.transform,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.transform.stream,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.validation,version=0.0.0 from 
org.apache.felix.framework (0)
javax.xml.ws,version=2.2.0 from 
org.apache.felix.framework (0)
 
What do I need to do to use JAX-WS in Karaf 4.2.1 with JDK 10? Is the import of javax.xml.ws. packages from system bundle OK?
I suppose it might be tricky to get the same set of features working with JDK 8 and 10, but in case of JAX-WS I haven’t even found the boundles with JAX-WS that I can install. Jaxws-rt bundles from Maven Repository that I’ve found are not OSGi bundles…
 
Best regards,
Lukasz Lech



Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

Freeman-2
In reply to this post by jbonofre
Hi JB,

Those packages are already removed from Karaf 4.2.1(etc/jre.properties) when using JDK9,10,11.

Not sure if we should install those spec bundles in Karaf by default, IMO, Karaf should be a small core, the smaller, the better. Customer can build customised kit with our powerful karaf-maven-plugin anyway.

Cheers
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



On Sep 14, 2018, at 9:58 PM, Jean-Baptiste Onofré <[hidden email]> wrote:

Good point Freeman.

In that case, what do you think about removing these package from
jre.properties and let the user install the spec bundle ?
Maybe, we can also do it by default in the Karaf standard distribution.

Thoughts ?

Regards
JB

On 14/09/2018 15:51, Freeman Fang wrote:
Hi,

For Java 9,10,11, we handle those versions in same way. Since several EE
related jigsaw modules including javax.xml.ws will be removed from
Java11 eventually, override it and let system bundle 0 expose those
packages makes less sense IMO,  you need install jax-ws api bundle by
yourself.

You can use servicemix wrapped one, just like we do for a long time in CXF

install
-s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0



-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



On Sep 14, 2018, at 9:17 PM, Lukasz Lech <[hidden email]
<[hidden email]>> wrote:

Hello,
 
After starting my app in Karaf 4.2.1  with Java 10 I’m getting errors:
 

java.lang.ClassNotFoundException: javax.xml.ws.Service

         at java.net.URLClassLoader.findClass(URLClassLoader.java:466)
~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:566) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]

         at
org.apache.felix.framework.ExtensionManager$ExtensionManagerWiring.getClassByDelegation(ExtensionManager.java:940)
~[?:?]

         at
org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1660)
~[?:?]

         at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1590)
~[?:?]

         at
org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
~[?:?]

         at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]

I’ve checked what imports the bundle that have triggered this error,
and it imports javax.xml.ws from System bundle (0):
 
javax.xml,version=0.0.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0> -- Overwritten by Boot
Delegation
javax.xml.bind,version=2.2.1 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.namespace,version=0.0.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.parsers,version=0.0.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.stream,version=1.2.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.stream.events,version=1.2.0 from org.apache.felix.framework
(0) <http://lx-entw3:8192/system/console/bundles/0>
javax.xml.transform,version=0.0.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.transform.stream,version=0.0.0
from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.validation,version=0.0.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.ws,version=2.2.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
 
What do I need to do to use JAX-WS in Karaf 4.2.1 with JDK 10? Is the
import of javax.xml.ws. packages from system bundle OK?
I suppose it might be tricky to get the same set of features working
with JDK 8 and 10, but in case of JAX-WS I haven’t even found the
boundles with JAX-WS that I can install. Jaxws-rt bundles from Maven
Repository that I’ve found are not OSGi bundles…
 
Best regards,
Lukasz Lech


--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

jbonofre
You are right, I was in the jre-8 section of etc/jre.properties (misread).

If you don't mind, I will add a note in the documentation, as some users
might be "lost".

Regards
JB

On 14/09/2018 16:06, Freeman Fang wrote:

> Hi JB,
>
> Those packages are already removed from Karaf 4.2.1(etc/jre.properties)
> when using JDK9,10,11.
>
> Not sure if we should install those spec bundles in Karaf by default,
> IMO, Karaf should be a small core, the smaller, the better. Customer can
> build customised kit with our powerful karaf-maven-plugin anyway.
>
> Cheers
> -------------
> Freeman(Yue) Fang
>
> Red Hat, Inc. 
> FuseSource is now part of Red Hat
>
>
>
>> On Sep 14, 2018, at 9:58 PM, Jean-Baptiste Onofré <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Good point Freeman.
>>
>> In that case, what do you think about removing these package from
>> jre.properties and let the user install the spec bundle ?
>> Maybe, we can also do it by default in the Karaf standard distribution.
>>
>> Thoughts ?
>>
>> Regards
>> JB
>>
>> On 14/09/2018 15:51, Freeman Fang wrote:
>>> Hi,
>>>
>>> For Java 9,10,11, we handle those versions in same way. Since several EE
>>> related jigsaw modules including javax.xml.ws will be removed from
>>> Java11 eventually, override it and let system bundle 0 expose those
>>> packages makes less sense IMO,  you need install jax-ws api bundle by
>>> yourself.
>>>
>>> You can use servicemix wrapped one, just like we do for a long time
>>> in CXF
>>>
>>> install
>>> -s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0
>>>
>>>
>>>
>>> -------------
>>> Freeman(Yue) Fang
>>>
>>> Red Hat, Inc. 
>>> FuseSource is now part of Red Hat
>>>
>>>
>>>
>>>> On Sep 14, 2018, at 9:17 PM, Lukasz Lech <[hidden email]
>>>> <mailto:[hidden email]>
>>>> <mailto:[hidden email]>> wrote:
>>>>
>>>> Hello,
>>>>  
>>>> After starting my app in Karaf 4.2.1  with Java 10 I’m getting errors:
>>>>  
>>>>
>>>> java.lang.ClassNotFoundException: javax.xml.ws.Service
>>>>
>>>>          at java.net.URLClassLoader.findClass(URLClassLoader.java:466)
>>>> ~[?:?]
>>>>
>>>>          at java.lang.ClassLoader.loadClass(ClassLoader.java:566) ~[?:?]
>>>>
>>>>          at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]
>>>>
>>>>          at
>>>> org.apache.felix.framework.ExtensionManager$ExtensionManagerWiring.getClassByDelegation(ExtensionManager.java:940)
>>>> ~[?:?]
>>>>
>>>>          at
>>>> org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1660)
>>>> ~[?:?]
>>>>
>>>>          at
>>>> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1590)
>>>> ~[?:?]
>>>>
>>>>          at
>>>> org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
>>>> ~[?:?]
>>>>
>>>>          at
>>>> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
>>>> ~[?:?]
>>>>
>>>>          at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]
>>>>
>>>> I’ve checked what imports the bundle that have triggered this error,
>>>> and it imports javax.xml.ws from System bundle (0):
>>>>  
>>>> javax.xml,version=0.0.0 from org.apache.felix.framework (0)
>>>> <http://lx-entw3:8192/system/console/bundles/0> -- Overwritten by Boot
>>>> Delegation
>>>> javax.xml.bind,version=2.2.1 from org.apache.felix.framework (0)
>>>> <http://lx-entw3:8192/system/console/bundles/0>
>>>> javax.xml.namespace,version=0.0.0 from org.apache.felix.framework (0)
>>>> <http://lx-entw3:8192/system/console/bundles/0>
>>>> javax.xml.parsers,version=0.0.0 from org.apache.felix.framework (0)
>>>> <http://lx-entw3:8192/system/console/bundles/0>
>>>> javax.xml.stream,version=1.2.0 from org.apache.felix.framework (0)
>>>> <http://lx-entw3:8192/system/console/bundles/0>
>>>> javax.xml.stream.events,version=1.2.0 from org.apache.felix.framework
>>>> (0) <http://lx-entw3:8192/system/console/bundles/0>
>>>> javax.xml.transform,version=0.0.0 from org.apache.felix.framework (0)
>>>> <http://lx-entw3:8192/system/console/bundles/0>
>>>> javax.xml.transform.stream,version=0.0.0
>>>> from org.apache.felix.framework (0)
>>>> <http://lx-entw3:8192/system/console/bundles/0>
>>>> javax.xml.validation,version=0.0.0 from org.apache.felix.framework (0)
>>>> <http://lx-entw3:8192/system/console/bundles/0>
>>>> javax.xml.ws,version=2.2.0 from org.apache.felix.framework (0)
>>>> <http://lx-entw3:8192/system/console/bundles/0>
>>>>  
>>>> What do I need to do to use JAX-WS in Karaf 4.2.1 with JDK 10? Is the
>>>> import of javax.xml.ws. packages from system bundle OK?
>>>> I suppose it might be tricky to get the same set of features working
>>>> with JDK 8 and 10, but in case of JAX-WS I haven’t even found the
>>>> boundles with JAX-WS that I can install. Jaxws-rt bundles from Maven
>>>> Repository that I’ve found are not OSGi bundles…
>>>>  
>>>> Best regards,
>>>> Lukasz Lech
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> [hidden email] <mailto:[hidden email]>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

Freeman-2
Sure, we definitely need better documentation.

Thanks JB!
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



On Sep 14, 2018, at 10:08 PM, Jean-Baptiste Onofré <[hidden email]> wrote:

You are right, I was in the jre-8 section of etc/jre.properties (misread).

If you don't mind, I will add a note in the documentation, as some users
might be "lost".

Regards
JB

On 14/09/2018 16:06, Freeman Fang wrote:
Hi JB,

Those packages are already removed from Karaf 4.2.1(etc/jre.properties)
when using JDK9,10,11.

Not sure if we should install those spec bundles in Karaf by default,
IMO, Karaf should be a small core, the smaller, the better. Customer can
build customised kit with our powerful karaf-maven-plugin anyway.

Cheers
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



On Sep 14, 2018, at 9:58 PM, Jean-Baptiste Onofré <[hidden email]
<[hidden email]>> wrote:

Good point Freeman.

In that case, what do you think about removing these package from
jre.properties and let the user install the spec bundle ?
Maybe, we can also do it by default in the Karaf standard distribution.

Thoughts ?

Regards
JB

On 14/09/2018 15:51, Freeman Fang wrote:
Hi,

For Java 9,10,11, we handle those versions in same way. Since several EE
related jigsaw modules including javax.xml.ws will be removed from
Java11 eventually, override it and let system bundle 0 expose those
packages makes less sense IMO,  you need install jax-ws api bundle by
yourself.

You can use servicemix wrapped one, just like we do for a long time
in CXF

install
-s mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0



-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



On Sep 14, 2018, at 9:17 PM, Lukasz Lech <[hidden email]
<[hidden email]>
<[hidden email]>> wrote:

Hello,
 
After starting my app in Karaf 4.2.1  with Java 10 I’m getting errors:
 

java.lang.ClassNotFoundException: javax.xml.ws.Service

         at java.net.URLClassLoader.findClass(URLClassLoader.java:466)
~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:566) ~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]

         at
org.apache.felix.framework.ExtensionManager$ExtensionManagerWiring.getClassByDelegation(ExtensionManager.java:940)
~[?:?]

         at
org.apache.felix.framework.BundleWiringImpl.searchImports(BundleWiringImpl.java:1660)
~[?:?]

         at
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1590)
~[?:?]

         at
org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
~[?:?]

         at
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
~[?:?]

         at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]

I’ve checked what imports the bundle that have triggered this error,
and it imports javax.xml.ws from System bundle (0):
 
javax.xml,version=0.0.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0> -- Overwritten by Boot
Delegation
javax.xml.bind,version=2.2.1 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.namespace,version=0.0.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.parsers,version=0.0.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.stream,version=1.2.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.stream.events,version=1.2.0 from org.apache.felix.framework
(0) <http://lx-entw3:8192/system/console/bundles/0>
javax.xml.transform,version=0.0.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.transform.stream,version=0.0.0
from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.validation,version=0.0.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
javax.xml.ws,version=2.2.0 from org.apache.felix.framework (0)
<http://lx-entw3:8192/system/console/bundles/0>
 
What do I need to do to use JAX-WS in Karaf 4.2.1 with JDK 10? Is the
import of javax.xml.ws. packages from system bundle OK?
I suppose it might be tricky to get the same set of features working
with JDK 8 and 10, but in case of JAX-WS I haven’t even found the
boundles with JAX-WS that I can install. Jaxws-rt bundles from Maven
Repository that I’ve found are not OSGi bundles…
 
Best regards,
Lukasz Lech


--
Jean-Baptiste Onofré
[hidden email] <[hidden email]>
http://blog.nanthrax.net
Talend - http://www.talend.com


--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com

Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

lechlukasz
In reply to this post by Freeman-2
Hello,

I'm using OpenJDK 10.0.2 from Ubuntu distribution.

After installing jaxws-api I've got another problem from the part of the
code that prepares XML to be sent via WS :

javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found
on module path or classpath.
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:278) ~[?:?]
        at javax.xml.bind.ContextFinder.find(ContextFinder.java:397) ~[?:?]
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721) ~[?:?]
        at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662) ~[?:?]
        at (...)
Caused by: java.lang.ClassNotFoundException:
com.sun.xml.internal.bind.v2.ContextFactory
        at
jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
~[?:?]
        at
jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]
        at
javax.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:122)
~[?:?]
        at
javax.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:155)
~[?:?]
        at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:276) ~[?:?]

so adding jax-ws api has broken JAXB and I'm not getting to point where
JAX-WS is invoked..

I have installed CXF feature 3.2.6.

I'm also using osgi-jax-rs-connector with slightly modified libraries :

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"
name="jersey-karaf-feature">
    <feature name="jersey-karaf-feature" description="Jersey karaf feature"
version="${project.version}">
                <feature>http</feature>
                <bundle
start-level="36">mvn:org.glassfish.jersey.containers/jersey-container-servlet/${jersey.version}</bundle>
                <bundle
start-level="36">mvn:org.glassfish.jersey.media/jersey-media-sse/${jersey.version}</bundle>
                <bundle
start-level="36">mvn:org.glassfish.jersey.media/jersey-media-multipart-ie-fix/${jersey.version}</bundle>
                <bundle start-level="36"
dependency="true">mvn:org.glassfish.jersey.containers/jersey-container-servlet-core/${jersey.version}</bundle>
                <bundle start-level="36"
dependency="true">mvn:org.glassfish.jersey.core/jersey-common/${jersey.version}</bundle>
                <bundle start-level="36"
dependency="true">mvn:org.glassfish.jersey.bundles.repackaged/jersey-guava/${jersey.version}</bundle>
                <bundle start-level="36"
dependency="true">mvn:org.glassfish.jersey.core/jersey-server/${jersey.version}</bundle>
                <bundle start-level="36"
dependency="true">mvn:org.glassfish.jersey.core/jersey-client/${jersey.version}</bundle>
                <bundle start-level="36"
dependency="true">mvn:org.glassfish.jersey.media/jersey-media-jaxb/${jersey.version}</bundle>
                <bundle start-level="33"
dependency="true">mvn:org.glassfish.hk2/hk2-api/2.4.0-b34</bundle>
                <bundle start-level="33"
dependency="true">mvn:org.glassfish.hk2/hk2-locator/2.4.0-b34</bundle>
                <bundle start-level="33"
dependency="true">mvn:org.glassfish.hk2/hk2-utils/2.4.0-b34</bundle>
                <bundle start-level="33"
dependency="true">mvn:org.glassfish.hk2/osgi-resource-locator/1.0.1</bundle>
                <bundle start-level="33"
dependency="true">mvn:org.glassfish.hk2.external/javax.inject/2.4.0-b34</bundle>
                <bundle start-level="33"
dependency="true">mvn:org.glassfish.hk2.external/aopalliance-repackaged/2.4.0-b34</bundle>
                <bundle
dependency="true">mvn:javax.annotation/javax.annotation-api/1.2</bundle>
                <bundle
dependency="true">mvn:javax.validation/validation-api/1.1.0.Final</bundle>
                <bundle dependency="true">mvn:javax.ws.rs/javax.ws.rs-api/2.0.1</bundle>
                <bundle dependency="true">mvn:org.javassist/javassist/3.18.1-GA</bundle>
                <bundle dependency="true">mvn:org.jvnet.mimepull/mimepull/1.9.6</bundle>
        <bundle
start-level="55">mvn:com.eclipsesource.jaxrs/pax-web-jaxrs-publisher/5.4.0-SNAPSHOT</bundle>
        <bundle
start-level="55">mvn:com.eclipsesource.jaxrs/provider-multipart/2.2</bundle>
        <bundle start-level="50">mvn:javax.ws.rs/jsr311-api/1.1.1</bundle>
        <bundle
start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.moxy/2.6.4</bundle>
        <bundle
start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.core/2.6.4</bundle>
        <bundle
start-level="50">mvn:javax.validation/validation-api/1.1.0.Final</bundle>
        <bundle start-level="50">mvn:org.glassfish/javax.json/1.0.4</bundle>
        <bundle
start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.jpa/2.6.4</bundle>
        <bundle dependency="true"
start-level="50">mvn:org.eclipse.persistence/javax.persistence/2.1.1</bundle>
        <bundle
start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.asm/2.6.4</bundle>
        <bundle
start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.jpa.jpql/2.6.4</bundle>
        <bundle
start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.antlr/2.6.4</bundle>
    </feature>
</features>

taken somewhere from this project:
https://github.com/hstaudacher/osgi-jax-rs-connector/tree/master/build

Maybe anything from those have caused conflicts?




Freeman-2 wrote

> Hi,
>
> For Java 9,10,11, we handle those versions in same way. Since several EE
> related jigsaw modules including javax.xml.ws will be removed from Java11
> eventually, override it and let system bundle 0 expose those packages
> makes less sense IMO,  you need install jax-ws api bundle by yourself.
>
> You can use servicemix wrapped one, just like we do for a long time in CXF
>
> install -s
> mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0





--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

jbonofre
Hi,

Did you install JAXB bundle (from ServiceMix) ?

Regards
JB

On 14/09/2018 16:21, lechlukasz wrote:

> Hello,
>
> I'm using OpenJDK 10.0.2 from Ubuntu distribution.
>
> After installing jaxws-api I've got another problem from the part of the
> code that prepares XML to be sent via WS :
>
> javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found
> on module path or classpath.
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:278) ~[?:?]
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:397) ~[?:?]
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721) ~[?:?]
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662) ~[?:?]
> at (...)
> Caused by: java.lang.ClassNotFoundException:
> com.sun.xml.internal.bind.v2.ContextFactory
> at
> jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
> ~[?:?]
> at
> jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
> ~[?:?]
> at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]
> at
> javax.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:122)
> ~[?:?]
> at
> javax.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:155)
> ~[?:?]
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:276) ~[?:?]
>
> so adding jax-ws api has broken JAXB and I'm not getting to point where
> JAX-WS is invoked..
>
> I have installed CXF feature 3.2.6.
>
> I'm also using osgi-jax-rs-connector with slightly modified libraries :
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"
> name="jersey-karaf-feature">
>     <feature name="jersey-karaf-feature" description="Jersey karaf feature"
> version="${project.version}">
> <feature>http</feature>
> <bundle
> start-level="36">mvn:org.glassfish.jersey.containers/jersey-container-servlet/${jersey.version}</bundle>
> <bundle
> start-level="36">mvn:org.glassfish.jersey.media/jersey-media-sse/${jersey.version}</bundle>
> <bundle
> start-level="36">mvn:org.glassfish.jersey.media/jersey-media-multipart-ie-fix/${jersey.version}</bundle>
> <bundle start-level="36"
> dependency="true">mvn:org.glassfish.jersey.containers/jersey-container-servlet-core/${jersey.version}</bundle>
> <bundle start-level="36"
> dependency="true">mvn:org.glassfish.jersey.core/jersey-common/${jersey.version}</bundle>
> <bundle start-level="36"
> dependency="true">mvn:org.glassfish.jersey.bundles.repackaged/jersey-guava/${jersey.version}</bundle>
> <bundle start-level="36"
> dependency="true">mvn:org.glassfish.jersey.core/jersey-server/${jersey.version}</bundle>
> <bundle start-level="36"
> dependency="true">mvn:org.glassfish.jersey.core/jersey-client/${jersey.version}</bundle>
> <bundle start-level="36"
> dependency="true">mvn:org.glassfish.jersey.media/jersey-media-jaxb/${jersey.version}</bundle>
> <bundle start-level="33"
> dependency="true">mvn:org.glassfish.hk2/hk2-api/2.4.0-b34</bundle>
> <bundle start-level="33"
> dependency="true">mvn:org.glassfish.hk2/hk2-locator/2.4.0-b34</bundle>
> <bundle start-level="33"
> dependency="true">mvn:org.glassfish.hk2/hk2-utils/2.4.0-b34</bundle>
> <bundle start-level="33"
> dependency="true">mvn:org.glassfish.hk2/osgi-resource-locator/1.0.1</bundle>
> <bundle start-level="33"
> dependency="true">mvn:org.glassfish.hk2.external/javax.inject/2.4.0-b34</bundle>
> <bundle start-level="33"
> dependency="true">mvn:org.glassfish.hk2.external/aopalliance-repackaged/2.4.0-b34</bundle>
> <bundle
> dependency="true">mvn:javax.annotation/javax.annotation-api/1.2</bundle>
> <bundle
> dependency="true">mvn:javax.validation/validation-api/1.1.0.Final</bundle>
> <bundle dependency="true">mvn:javax.ws.rs/javax.ws.rs-api/2.0.1</bundle>
> <bundle dependency="true">mvn:org.javassist/javassist/3.18.1-GA</bundle>
> <bundle dependency="true">mvn:org.jvnet.mimepull/mimepull/1.9.6</bundle>
>         <bundle
> start-level="55">mvn:com.eclipsesource.jaxrs/pax-web-jaxrs-publisher/5.4.0-SNAPSHOT</bundle>
>         <bundle
> start-level="55">mvn:com.eclipsesource.jaxrs/provider-multipart/2.2</bundle>
>         <bundle start-level="50">mvn:javax.ws.rs/jsr311-api/1.1.1</bundle>
>         <bundle
> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.moxy/2.6.4</bundle>
>         <bundle
> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.core/2.6.4</bundle>
>         <bundle
> start-level="50">mvn:javax.validation/validation-api/1.1.0.Final</bundle>
>         <bundle start-level="50">mvn:org.glassfish/javax.json/1.0.4</bundle>
>         <bundle
> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.jpa/2.6.4</bundle>
>         <bundle dependency="true"
> start-level="50">mvn:org.eclipse.persistence/javax.persistence/2.1.1</bundle>
>         <bundle
> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.asm/2.6.4</bundle>
>         <bundle
> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.jpa.jpql/2.6.4</bundle>
>         <bundle
> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.antlr/2.6.4</bundle>
>     </feature>
> </features>
>
> taken somewhere from this project:
> https://github.com/hstaudacher/osgi-jax-rs-connector/tree/master/build
>
> Maybe anything from those have caused conflicts?
>
>
>
>
> Freeman-2 wrote
>> Hi,
>>
>> For Java 9,10,11, we handle those versions in same way. Since several EE
>> related jigsaw modules including javax.xml.ws will be removed from Java11
>> eventually, override it and let system bundle 0 expose those packages
>> makes less sense IMO,  you need install jax-ws api bundle by yourself.
>>
>> You can use servicemix wrapped one, just like we do for a long time in CXF
>>
>> install -s
>> mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0
>
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

jbonofre
In reply to this post by lechlukasz
By the way, if you are not familiar with jigsaw module, maybe it's
better to stay with Java 8 ?

With Java 9/10/11, as Freeman said, EE packages are not in separated
modules. So you have to either install the packages in the JDK (and
update jre.properties) or install the required bundles.

Regards
JB

On 14/09/2018 16:21, lechlukasz wrote:

> Hello,
>
> I'm using OpenJDK 10.0.2 from Ubuntu distribution.
>
> After installing jaxws-api I've got another problem from the part of the
> code that prepares XML to be sent via WS :
>
> javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found
> on module path or classpath.
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:278) ~[?:?]
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:397) ~[?:?]
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721) ~[?:?]
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662) ~[?:?]
> at (...)
> Caused by: java.lang.ClassNotFoundException:
> com.sun.xml.internal.bind.v2.ContextFactory
> at
> jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
> ~[?:?]
> at
> jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
> ~[?:?]
> at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]
> at
> javax.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:122)
> ~[?:?]
> at
> javax.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:155)
> ~[?:?]
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:276) ~[?:?]
>
> so adding jax-ws api has broken JAXB and I'm not getting to point where
> JAX-WS is invoked..
>
> I have installed CXF feature 3.2.6.
>
> I'm also using osgi-jax-rs-connector with slightly modified libraries :
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"
> name="jersey-karaf-feature">
>     <feature name="jersey-karaf-feature" description="Jersey karaf feature"
> version="${project.version}">
> <feature>http</feature>
> <bundle
> start-level="36">mvn:org.glassfish.jersey.containers/jersey-container-servlet/${jersey.version}</bundle>
> <bundle
> start-level="36">mvn:org.glassfish.jersey.media/jersey-media-sse/${jersey.version}</bundle>
> <bundle
> start-level="36">mvn:org.glassfish.jersey.media/jersey-media-multipart-ie-fix/${jersey.version}</bundle>
> <bundle start-level="36"
> dependency="true">mvn:org.glassfish.jersey.containers/jersey-container-servlet-core/${jersey.version}</bundle>
> <bundle start-level="36"
> dependency="true">mvn:org.glassfish.jersey.core/jersey-common/${jersey.version}</bundle>
> <bundle start-level="36"
> dependency="true">mvn:org.glassfish.jersey.bundles.repackaged/jersey-guava/${jersey.version}</bundle>
> <bundle start-level="36"
> dependency="true">mvn:org.glassfish.jersey.core/jersey-server/${jersey.version}</bundle>
> <bundle start-level="36"
> dependency="true">mvn:org.glassfish.jersey.core/jersey-client/${jersey.version}</bundle>
> <bundle start-level="36"
> dependency="true">mvn:org.glassfish.jersey.media/jersey-media-jaxb/${jersey.version}</bundle>
> <bundle start-level="33"
> dependency="true">mvn:org.glassfish.hk2/hk2-api/2.4.0-b34</bundle>
> <bundle start-level="33"
> dependency="true">mvn:org.glassfish.hk2/hk2-locator/2.4.0-b34</bundle>
> <bundle start-level="33"
> dependency="true">mvn:org.glassfish.hk2/hk2-utils/2.4.0-b34</bundle>
> <bundle start-level="33"
> dependency="true">mvn:org.glassfish.hk2/osgi-resource-locator/1.0.1</bundle>
> <bundle start-level="33"
> dependency="true">mvn:org.glassfish.hk2.external/javax.inject/2.4.0-b34</bundle>
> <bundle start-level="33"
> dependency="true">mvn:org.glassfish.hk2.external/aopalliance-repackaged/2.4.0-b34</bundle>
> <bundle
> dependency="true">mvn:javax.annotation/javax.annotation-api/1.2</bundle>
> <bundle
> dependency="true">mvn:javax.validation/validation-api/1.1.0.Final</bundle>
> <bundle dependency="true">mvn:javax.ws.rs/javax.ws.rs-api/2.0.1</bundle>
> <bundle dependency="true">mvn:org.javassist/javassist/3.18.1-GA</bundle>
> <bundle dependency="true">mvn:org.jvnet.mimepull/mimepull/1.9.6</bundle>
>         <bundle
> start-level="55">mvn:com.eclipsesource.jaxrs/pax-web-jaxrs-publisher/5.4.0-SNAPSHOT</bundle>
>         <bundle
> start-level="55">mvn:com.eclipsesource.jaxrs/provider-multipart/2.2</bundle>
>         <bundle start-level="50">mvn:javax.ws.rs/jsr311-api/1.1.1</bundle>
>         <bundle
> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.moxy/2.6.4</bundle>
>         <bundle
> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.core/2.6.4</bundle>
>         <bundle
> start-level="50">mvn:javax.validation/validation-api/1.1.0.Final</bundle>
>         <bundle start-level="50">mvn:org.glassfish/javax.json/1.0.4</bundle>
>         <bundle
> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.jpa/2.6.4</bundle>
>         <bundle dependency="true"
> start-level="50">mvn:org.eclipse.persistence/javax.persistence/2.1.1</bundle>
>         <bundle
> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.asm/2.6.4</bundle>
>         <bundle
> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.jpa.jpql/2.6.4</bundle>
>         <bundle
> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.antlr/2.6.4</bundle>
>     </feature>
> </features>
>
> taken somewhere from this project:
> https://github.com/hstaudacher/osgi-jax-rs-connector/tree/master/build
>
> Maybe anything from those have caused conflicts?
>
>
>
>
> Freeman-2 wrote
>> Hi,
>>
>> For Java 9,10,11, we handle those versions in same way. Since several EE
>> related jigsaw modules including javax.xml.ws will be removed from Java11
>> eventually, override it and let system bundle 0 expose those packages
>> makes less sense IMO,  you need install jax-ws api bundle by yourself.
>>
>> You can use servicemix wrapped one, just like we do for a long time in CXF
>>
>> install -s
>> mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0
>
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

lechlukasz
In reply to this post by jbonofre
No, from CXF.
I suppose I wasn't expect to because they collide?
There is no reason I'd need CXF, I simply need any JAXB+JAX-WS
implementation.


jbonofre wrote
> Hi,
>
> Did you install JAXB bundle (from ServiceMix) ?
>
> Regards
> JB





--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

Tim Ward-2
In reply to this post by jbonofre
Also, Java 8 is still officially supported, Java 9 is no longer being updated, and Java 10 will go end of life (stop receiving updates) at the same time as Java 8.

Tim

> On 14 Sep 2018, at 16:20, Jean-Baptiste Onofré <[hidden email]> wrote:
>
> By the way, if you are not familiar with jigsaw module, maybe it's
> better to stay with Java 8 ?
>
> With Java 9/10/11, as Freeman said, EE packages are not in separated
> modules. So you have to either install the packages in the JDK (and
> update jre.properties) or install the required bundles.
>
> Regards
> JB
>
> On 14/09/2018 16:21, lechlukasz wrote:
>> Hello,
>>
>> I'm using OpenJDK 10.0.2 from Ubuntu distribution.
>>
>> After installing jaxws-api I've got another problem from the part of the
>> code that prepares XML to be sent via WS :
>>
>> javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found
>> on module path or classpath.
>> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:278) ~[?:?]
>> at javax.xml.bind.ContextFinder.find(ContextFinder.java:397) ~[?:?]
>> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:721) ~[?:?]
>> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:662) ~[?:?]
>> at (...)
>> Caused by: java.lang.ClassNotFoundException:
>> com.sun.xml.internal.bind.v2.ContextFactory
>> at
>> jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
>> ~[?:?]
>> at
>> jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
>> ~[?:?]
>> at java.lang.ClassLoader.loadClass(ClassLoader.java:499) ~[?:?]
>> at
>> javax.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:122)
>> ~[?:?]
>> at
>> javax.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:155)
>> ~[?:?]
>> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:276) ~[?:?]
>>
>> so adding jax-ws api has broken JAXB and I'm not getting to point where
>> JAX-WS is invoked..
>>
>> I have installed CXF feature 3.2.6.
>>
>> I'm also using osgi-jax-rs-connector with slightly modified libraries :
>>
>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
>> <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0"
>> name="jersey-karaf-feature">
>>    <feature name="jersey-karaf-feature" description="Jersey karaf feature"
>> version="${project.version}">
>> <feature>http</feature>
>> <bundle
>> start-level="36">mvn:org.glassfish.jersey.containers/jersey-container-servlet/${jersey.version}</bundle>
>> <bundle
>> start-level="36">mvn:org.glassfish.jersey.media/jersey-media-sse/${jersey.version}</bundle>
>> <bundle
>> start-level="36">mvn:org.glassfish.jersey.media/jersey-media-multipart-ie-fix/${jersey.version}</bundle>
>> <bundle start-level="36"
>> dependency="true">mvn:org.glassfish.jersey.containers/jersey-container-servlet-core/${jersey.version}</bundle>
>> <bundle start-level="36"
>> dependency="true">mvn:org.glassfish.jersey.core/jersey-common/${jersey.version}</bundle>
>> <bundle start-level="36"
>> dependency="true">mvn:org.glassfish.jersey.bundles.repackaged/jersey-guava/${jersey.version}</bundle>
>> <bundle start-level="36"
>> dependency="true">mvn:org.glassfish.jersey.core/jersey-server/${jersey.version}</bundle>
>> <bundle start-level="36"
>> dependency="true">mvn:org.glassfish.jersey.core/jersey-client/${jersey.version}</bundle>
>> <bundle start-level="36"
>> dependency="true">mvn:org.glassfish.jersey.media/jersey-media-jaxb/${jersey.version}</bundle>
>> <bundle start-level="33"
>> dependency="true">mvn:org.glassfish.hk2/hk2-api/2.4.0-b34</bundle>
>> <bundle start-level="33"
>> dependency="true">mvn:org.glassfish.hk2/hk2-locator/2.4.0-b34</bundle>
>> <bundle start-level="33"
>> dependency="true">mvn:org.glassfish.hk2/hk2-utils/2.4.0-b34</bundle>
>> <bundle start-level="33"
>> dependency="true">mvn:org.glassfish.hk2/osgi-resource-locator/1.0.1</bundle>
>> <bundle start-level="33"
>> dependency="true">mvn:org.glassfish.hk2.external/javax.inject/2.4.0-b34</bundle>
>> <bundle start-level="33"
>> dependency="true">mvn:org.glassfish.hk2.external/aopalliance-repackaged/2.4.0-b34</bundle>
>> <bundle
>> dependency="true">mvn:javax.annotation/javax.annotation-api/1.2</bundle>
>> <bundle
>> dependency="true">mvn:javax.validation/validation-api/1.1.0.Final</bundle>
>> <bundle dependency="true">mvn:javax.ws.rs/javax.ws.rs-api/2.0.1</bundle>
>> <bundle dependency="true">mvn:org.javassist/javassist/3.18.1-GA</bundle>
>> <bundle dependency="true">mvn:org.jvnet.mimepull/mimepull/1.9.6</bundle>
>>        <bundle
>> start-level="55">mvn:com.eclipsesource.jaxrs/pax-web-jaxrs-publisher/5.4.0-SNAPSHOT</bundle>
>>        <bundle
>> start-level="55">mvn:com.eclipsesource.jaxrs/provider-multipart/2.2</bundle>
>>        <bundle start-level="50">mvn:javax.ws.rs/jsr311-api/1.1.1</bundle>
>>        <bundle
>> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.moxy/2.6.4</bundle>
>>        <bundle
>> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.core/2.6.4</bundle>
>>        <bundle
>> start-level="50">mvn:javax.validation/validation-api/1.1.0.Final</bundle>
>>        <bundle start-level="50">mvn:org.glassfish/javax.json/1.0.4</bundle>
>>        <bundle
>> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.jpa/2.6.4</bundle>
>>        <bundle dependency="true"
>> start-level="50">mvn:org.eclipse.persistence/javax.persistence/2.1.1</bundle>
>>        <bundle
>> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.asm/2.6.4</bundle>
>>        <bundle
>> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.jpa.jpql/2.6.4</bundle>
>>        <bundle
>> start-level="50">mvn:org.eclipse.persistence/org.eclipse.persistence.antlr/2.6.4</bundle>
>>    </feature>
>> </features>
>>
>> taken somewhere from this project:
>> https://github.com/hstaudacher/osgi-jax-rs-connector/tree/master/build
>>
>> Maybe anything from those have caused conflicts?
>>
>>
>>
>>
>> Freeman-2 wrote
>>> Hi,
>>>
>>> For Java 9,10,11, we handle those versions in same way. Since several EE
>>> related jigsaw modules including javax.xml.ws will be removed from Java11
>>> eventually, override it and let system bundle 0 expose those packages
>>> makes less sense IMO,  you need install jax-ws api bundle by yourself.
>>>
>>> You can use servicemix wrapped one, just like we do for a long time in CXF
>>>
>>> install -s
>>> mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.jaxws-api-2.2/2.9.0
>>
>>
>>
>>
>>
>> --
>> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>>
>
> --
> Jean-Baptiste Onofré
> [hidden email]
> http://blog.nanthrax.net
> Talend - http://www.talend.com

Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

lechlukasz
In reply to this post by jbonofre
This is exactly my problem, finding out the required bundles to install.

As for now, I've found that 'canonical' SO answer:
https://stackoverflow.com/questions/48204141/replacements-for-deprecated-jpms-modules-with-java-ee-apis/48204154#48204154

unfortunately, many of the listed artifacts are not OSGi-zed.

On the other way, I'm missing details, how are Java's 'services' working in
OSGi environment. For example, for JAXB, who will load the
javax.xml.bin.JAXBContext implementation, the bundle from which the package
javax.xml.bind is imported?

I suppose I'm not the only person with that problem and there's some
'proper' list of bundles to install to use JAXB, JAX-WS etc.

I suppose the solution for Java 10 will work in Java 11 too, so waiting for
Java 11 will not fix anything authomatically?





jbonofre wrote
> With Java 9/10/11, as Freeman said, EE packages are not in separated
> modules. So you have to either install the packages in the JDK (and
> update jre.properties) or install the required bundles.





--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

jbonofre
No, Java 11 has exactly the same approach.

As said, we provide the spec bundle at ServiceMix, so you can install it.

Regards
JB

On 17/09/2018 09:30, lechlukasz wrote:

> This is exactly my problem, finding out the required bundles to install.
>
> As for now, I've found that 'canonical' SO answer:
> https://stackoverflow.com/questions/48204141/replacements-for-deprecated-jpms-modules-with-java-ee-apis/48204154#48204154
>
> unfortunately, many of the listed artifacts are not OSGi-zed.
>
> On the other way, I'm missing details, how are Java's 'services' working in
> OSGi environment. For example, for JAXB, who will load the
> javax.xml.bin.JAXBContext implementation, the bundle from which the package
> javax.xml.bind is imported?
>
> I suppose I'm not the only person with that problem and there's some
> 'proper' list of bundles to install to use JAXB, JAX-WS etc.
>
> I suppose the solution for Java 10 will work in Java 11 too, so waiting for
> Java 11 will not fix anything authomatically?
>
>
>
>
>
> jbonofre wrote
>> With Java 9/10/11, as Freeman said, EE packages are not in separated
>> modules. So you have to either install the packages in the JDK (and
>> update jre.properties) or install the required bundles.
>
>
>
>
>
> --
> Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html
>

--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com
Reply | Threaded
Open this post in threaded view
|

Re: Karaf 4.2.1 JDK 10 - provide jax-ws

Freeman-2
Yes, as JB said, you should use spec bundles from Apache Servicemix which support OSGi locator which means can find spec impls in OSGi container.

As to which spec bundles you should have for your case, if it’s web service endpoint, you actually can draw on cxf-specs features shipped with Apache CXF[1].

[1]http://repo2.maven.org/maven2/org/apache/cxf/karaf/apache-cxf/3.2.6/apache-cxf-3.2.6-features.xml
-------------
Freeman(Yue) Fang

Red Hat, Inc. 
FuseSource is now part of Red Hat



On Sep 17, 2018, at 4:28 PM, Jean-Baptiste Onofré <[hidden email]> wrote:

No, Java 11 has exactly the same approach.

As said, we provide the spec bundle at ServiceMix, so you can install it.

Regards
JB

On 17/09/2018 09:30, lechlukasz wrote:
This is exactly my problem, finding out the required bundles to install.

As for now, I've found that 'canonical' SO answer:
https://stackoverflow.com/questions/48204141/replacements-for-deprecated-jpms-modules-with-java-ee-apis/48204154#48204154

unfortunately, many of the listed artifacts are not OSGi-zed.

On the other way, I'm missing details, how are Java's 'services' working in
OSGi environment. For example, for JAXB, who will load the
javax.xml.bin.JAXBContext implementation, the bundle from which the package
javax.xml.bind is imported?

I suppose I'm not the only person with that problem and there's some
'proper' list of bundles to install to use JAXB, JAX-WS etc.

I suppose the solution for Java 10 will work in Java 11 too, so waiting for
Java 11 will not fix anything authomatically?





jbonofre wrote
With Java 9/10/11, as Freeman said, EE packages are not in separated
modules. So you have to either install the packages in the JDK (and
update jre.properties) or install the required bundles.





--
Sent from: http://karaf.922171.n3.nabble.com/Karaf-User-f930749.html


--
Jean-Baptiste Onofré
[hidden email]
http://blog.nanthrax.net
Talend - http://www.talend.com