Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Implementation of JAXB » Can't get it to run in OSGI/Java11(Implementation of JAXB-API has not been found on module path or classpath. )
Can't get it to run in OSGI/Java11 [message #1799695] Wed, 12 December 2018 14:20 Go to next message
Marco Descher is currently offline Marco DescherFriend
Messages: 164
Registered: October 2010
Location: Austria
Senior Member
I'm currently trying to get Java 11 with my Equinox based application up and running. I think that I already got quite far - but I can't seem to get a proper JAXB Implementation to work.

I already filed https://github.com/eclipse-ee4j/jaxb-api/issues/78 for the problem I have with jaxb-api - but after manually patching the problem within my IDE I still face the same exception, but only with the correct name.

So I'm not sure about the following things:

* Is this package event meant for OSGI usage? If not
* Is there a tutorial on how to get the JAXB stuff for Java 11 running in your OSGI environment?

I found some packages like https://search.maven.org/artifact/com.sun.xml.bind/jaxb-osgi/2.4.0-b180830.0438/jar but I don't know what to do with them; how to integrate them. And I even can't find a documentation for this.
Re: Can't get it to run in OSGI/Java11 [message #1799795 is a reply to message #1799695] Thu, 13 December 2018 15:02 Go to previous messageGo to next message
Marco Descher is currently offline Marco DescherFriend
Messages: 164
Registered: October 2010
Location: Austria
Senior Member
Due to the fabulous help of the Lukas and Roman in https://github.com/eclipse-ee4j/jaxb-api/issues/78 it does not work. The steps necessary are:

1. Integrate the following plugins to your target

  • com.sun.xml.bind.jaxb-osgi (2.4.0-b180830.0359)
  • jaxb-api (2.4.0-b180830.0359) // Version is relevant!
  • jaxb-core

2. Add to your bundles manifest Import-Package: com.sun.xml.bind.v2
3. Switch to a JAXBContext.newInstance variant where you provide a classloader from within your bundle (this might require you to create a jaxb.index file)
Re: Can't get it to run in OSGI/Java11 [message #1801507 is a reply to message #1799795] Mon, 21 January 2019 11:52 Go to previous message
Marco Descher is currently offline Marco DescherFriend
Messages: 164
Registered: October 2010
Location: Austria
Senior Member
Just documented everything in a blog post -> http://www.descher.at/descher-vu/2019/01/java-11-jaxb-and-osgi/
Goto Forum:
  


Current Time: Mon Aug 19 22:59:00 GMT 2019

Powered by FUDForum. Page generated in 0.01311 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top