mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Bug 536316 - ClassNotFoundException: javax.xml.bind.JAXBException
This class is gone in Java 11. Instead use the one from Orbit. Also, this used com.sun.xml.internal.bind.v2.ContextFactory which is also gone so we have to directly use com.sun.xml.bind.v2.ContextFactory also from Orbit. Change-Id: I808ebe5a6ade19e86d4c31f2f2789063dc3bf3b4 Signed-off-by: Marc-Andre Laperle <malaperle@gmail.com>
This commit is contained in:
parent
0499fb37f4
commit
5baff6e9b6
3 changed files with 10 additions and 2 deletions
|
@ -7,8 +7,11 @@ Bundle-Activator: org.eclipse.tools.templates.freemarker.internal.Activator
|
|||
Require-Bundle: org.eclipse.core.runtime,
|
||||
org.eclipse.core.resources,
|
||||
org.freemarker;visibility:=reexport,
|
||||
org.eclipse.tools.templates.core;bundle-version="1.0.0";visibility:=reexport
|
||||
org.eclipse.tools.templates.core;bundle-version="1.0.0";visibility:=reexport,
|
||||
com.sun.xml.bind;bundle-version="2.2.0"
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: org.eclipse.tools.templates.freemarker
|
||||
Bundle-Vendor: %providerName
|
||||
Import-Package: javax.xml.bind;version="2.2.0",
|
||||
javax.xml.bind.annotation;version="2.2.0"
|
||||
|
|
|
@ -47,6 +47,8 @@ import org.eclipse.tools.templates.freemarker.internal.Activator;
|
|||
import org.eclipse.tools.templates.freemarker.internal.Messages;
|
||||
import org.osgi.framework.Bundle;
|
||||
|
||||
import com.sun.xml.bind.v2.ContextFactory;
|
||||
|
||||
import freemarker.cache.TemplateLoader;
|
||||
import freemarker.template.Configuration;
|
||||
import freemarker.template.Template;
|
||||
|
@ -98,7 +100,7 @@ public abstract class FMGenerator implements IGenerator, TemplateLoader {
|
|||
try {
|
||||
StringWriter writer = new StringWriter();
|
||||
loadFile(manifestPath, model, writer); // $NON-NLS-1$
|
||||
JAXBContext xmlContext = JAXBContext.newInstance(getManifestClass());
|
||||
JAXBContext xmlContext = ContextFactory.createContext(new Class[] { getManifestClass() }, null);
|
||||
Unmarshaller unmarshaller = xmlContext.createUnmarshaller();
|
||||
manifest = (TemplateManifest) unmarshaller.unmarshal(new StringReader(writer.toString()));
|
||||
} catch (JAXBException e) {
|
||||
|
|
|
@ -18,5 +18,8 @@
|
|||
<bundle id="org.eclipse.tools.templates.ui.source" version="0.0.0">
|
||||
<category name="main"/>
|
||||
</bundle>
|
||||
<bundle id="com.sun.xml.bind" version="0.0.0"/>
|
||||
<bundle id="javax.xml.bind" version="0.0.0"/>
|
||||
<bundle id="javax.xml.stream" version="0.0.0"/>
|
||||
<category-def name="main" label="Template Engine"/>
|
||||
</site>
|
||||
|
|
Loading…
Add table
Reference in a new issue