From
: "Grinenko, Ivan" <
ivan.grinenko@xxxxxxxxxx
>
Date
: Thu, 1 Apr 2021 08:49:29 +0000
Accept-language
: en-001, ru-RU, en-US
Delivered-to
:
jaxb-impl-dev@xxxxxxxxxxx
List-archive
: <
https://www.eclipse.org/mailman/private/jaxb-impl-dev/
>
List-help
: <
mailto:[email protected]?subject=help
>
List-subscribe
: <
https://www.eclipse.org/mailman/listinfo/jaxb-impl-dev
>, <
mailto:[email protected]?subject=subscribe
>
List-unsubscribe
: <
https://www.eclipse.org/mailman/options/jaxb-impl-dev
>, <
mailto:[email protected]?subject=unsubscribe
>
Thread-index
: Adcmz7vNhUBH3fMuQwSfT9uCV2mFgQ==
Thread-topic
: Implementation of JAXB-API has not been found by my Eclipse plugin
Hi All,
In my Eclipse plugin I need to unmarshall some XML. It was all good while I was on Java-8. Since I moved to Java-11 I faced the necessity of adding an external implementation of JAXB-API. This is the point where I'm stuck.
When I try to create a JAXB context I get an exception " java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory ".
javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:232)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:375)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:691)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:632)
at my.code
The Internet tells me I have to add some maven dependencies but it won't work for me because I'm using Tycho. So, I tried to add com.sun.xml.bind to the Require-Bundle section of my plugin's MANIFEST.MF
Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.14.0",
jakarta.xml.bind;bundle-version="2.3.3",
com.sun.xml.bind;bundle-version="2.3.3"
and to the target definition.
<unit id="com.sun.xml.bind" version="2.3.3.v20201118-1818"/>
<repository location="https://download.eclipse.org/tools/orbit/downloads/drops/R20201130205003/repository/"/>
This did not change the result despite the fact that com.sun.xml.bind artifact resides in my RCP's plugins folder.
What I did wrong or what I should do to be able to use JAXB with my plugin?
I do this on win7 and win10.
openjdk version "11.0.10" 2021-01-19
The RCP-application is Trace Compass.
Thanks!
P.S. A link to my StackOverflow question with details: https://stackoverflow.com/questions/66894011
Best regards,
Ivan Grinenko
Software Engineer
Auriga
[jaxb-impl-dev] Build failed in Jenkins: Fast Infoset EE4J_8 build #56
Previous by thread:
[jaxb-impl-dev] Build failed in Jenkins: Fast Infoset EE4J_8 build #55
Next by thread:
[jaxb-impl-dev] Build failed in Jenkins: Fast Infoset EE4J_8 build #56
Index(es):
Thread