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 <[email protected]> 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 <[email protected] 
>> <mailto:[email protected]>> 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 <[email protected] 
>>> <mailto:[email protected]>> 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
>> 
> 

Reply via email to