[JBoss JIRA] (FORGE-1199) Cannot use JAXB inside a plugin
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1199?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-1199.
----------------------------------
Assignee: George Gastaldi
Fix Version/s: 2.7.3.Final
(was: 2.x Future)
Resolution: Done
> Cannot use JAXB inside a plugin
> -------------------------------
>
> Key: FORGE-1199
> URL: https://issues.jboss.org/browse/FORGE-1199
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Furnace (Container)
> Affects Versions: 1.4.0.Final, 2.7.2.Final
> Reporter: Luca Masini
> Assignee: George Gastaldi
> Priority: Critical
> Fix For: 2.7.3.Final
>
>
> I need to unmarshal some XML using JAXB.
> If I try to add this dependency:
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-xjc</artifactId>
> <version>2.2.1</version>
> <scope>compile</scope>
> <exclusions>
> <exclusion>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> and then to create a JAXB Context:
> final JAXBContext context = JAXBContext.newInstance(Model.class);
> then I got an exception when launching the plugin:
> javax.xml.bind.JAXBException
> - with linked exception:
> [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.xxxxxxx.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]]
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:187)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:376)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
> at it.xxx.forge.parser.Parser.parse(Parser.java:17)
> at it.xxx.forge.forge.CreateEntitiesPlugin.parse(CreateEntitiesPlugin.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.forge.shell.command.Execution.perform(Execution.java:160)
> ...
> ...
> Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.esselunga.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
> at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:481)
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:185)
> ... 41 more
> ContextFactory is part of rt.jar with is bundled with the JDK, how can I tell the ModuleClassLoader to let me load it ??
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1199) Cannot use JAXB inside a plugin
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1199?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-1199:
----------------------------------------
It does not work in Forge 2 either:
Here is a test case reproducing that:
{code:java}
/*
* Copyright 2014 Red Hat, Inc. and/or its affiliates.
*
* Licensed under the Eclipse Public License version 1.0, available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package test.org.jboss.forge.furnace.classpath;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.annotation.XmlRootElement;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.forge.arquillian.archive.ForgeArchive;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(Arquillian.class)
public class JAXBLookupTest
{
@Deployment
public static ForgeArchive getDeployment()
{
ForgeArchive archive = ShrinkWrap.create(ForgeArchive.class)
.addClass(TestRoot.class)
.addAsLocalServices(JAXBLookupTest.class);
return archive;
}
@Test
public void testGetJDKProvidedJAXBImpl() throws Exception
{
try
{
getClass().getClassLoader().loadClass("com.sun.xml.internal.bind.v2.ContextFactory");
}
catch (Exception e)
{
Assert.fail("Could not load required Factory class." + e.getMessage());
}
}
@Test
public void testJAXBLookup() throws Exception
{
Assert.assertNotNull(JAXBContext.newInstance(TestRoot.class));
}
@XmlRootElement
public static class TestRoot
{
}
}
{code}
> Cannot use JAXB inside a plugin
> -------------------------------
>
> Key: FORGE-1199
> URL: https://issues.jboss.org/browse/FORGE-1199
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Furnace (Container)
> Affects Versions: 1.4.0.Final, 2.7.2.Final
> Reporter: Luca Masini
> Priority: Critical
> Fix For: 2.x Future
>
>
> I need to unmarshal some XML using JAXB.
> If I try to add this dependency:
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-xjc</artifactId>
> <version>2.2.1</version>
> <scope>compile</scope>
> <exclusions>
> <exclusion>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> and then to create a JAXB Context:
> final JAXBContext context = JAXBContext.newInstance(Model.class);
> then I got an exception when launching the plugin:
> javax.xml.bind.JAXBException
> - with linked exception:
> [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.xxxxxxx.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]]
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:187)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:376)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
> at it.xxx.forge.parser.Parser.parse(Parser.java:17)
> at it.xxx.forge.forge.CreateEntitiesPlugin.parse(CreateEntitiesPlugin.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.forge.shell.command.Execution.perform(Execution.java:160)
> ...
> ...
> Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.esselunga.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
> at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:481)
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:185)
> ... 41 more
> ContextFactory is part of rt.jar with is bundled with the JDK, how can I tell the ModuleClassLoader to let me load it ??
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1199) Cannot use JAXB inside a plugin
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1199?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-1199:
-----------------------------------
Priority: Critical (was: Major)
> Cannot use JAXB inside a plugin
> -------------------------------
>
> Key: FORGE-1199
> URL: https://issues.jboss.org/browse/FORGE-1199
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Furnace (Container)
> Affects Versions: 1.4.0.Final, 2.7.2.Final
> Reporter: Luca Masini
> Priority: Critical
> Fix For: 2.x Future
>
>
> I need to unmarshal some XML using JAXB.
> If I try to add this dependency:
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-xjc</artifactId>
> <version>2.2.1</version>
> <scope>compile</scope>
> <exclusions>
> <exclusion>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> and then to create a JAXB Context:
> final JAXBContext context = JAXBContext.newInstance(Model.class);
> then I got an exception when launching the plugin:
> javax.xml.bind.JAXBException
> - with linked exception:
> [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.xxxxxxx.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]]
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:187)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:376)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
> at it.xxx.forge.parser.Parser.parse(Parser.java:17)
> at it.xxx.forge.forge.CreateEntitiesPlugin.parse(CreateEntitiesPlugin.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.forge.shell.command.Execution.perform(Execution.java:160)
> ...
> ...
> Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.esselunga.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
> at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:481)
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:185)
> ... 41 more
> ContextFactory is part of rt.jar with is bundled with the JDK, how can I tell the ModuleClassLoader to let me load it ??
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1199) Cannot use JAXB inside a plugin
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1199?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-1199:
-----------------------------------
Affects Version/s: 2.7.2.Final
> Cannot use JAXB inside a plugin
> -------------------------------
>
> Key: FORGE-1199
> URL: https://issues.jboss.org/browse/FORGE-1199
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 1.4.0.Final, 2.7.2.Final
> Reporter: Luca Masini
> Fix For: 2.x Future
>
>
> I need to unmarshal some XML using JAXB.
> If I try to add this dependency:
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-xjc</artifactId>
> <version>2.2.1</version>
> <scope>compile</scope>
> <exclusions>
> <exclusion>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> and then to create a JAXB Context:
> final JAXBContext context = JAXBContext.newInstance(Model.class);
> then I got an exception when launching the plugin:
> javax.xml.bind.JAXBException
> - with linked exception:
> [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.xxxxxxx.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]]
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:187)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:376)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
> at it.xxx.forge.parser.Parser.parse(Parser.java:17)
> at it.xxx.forge.forge.CreateEntitiesPlugin.parse(CreateEntitiesPlugin.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.forge.shell.command.Execution.perform(Execution.java:160)
> ...
> ...
> Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.esselunga.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
> at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:481)
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:185)
> ... 41 more
> ContextFactory is part of rt.jar with is bundled with the JDK, how can I tell the ModuleClassLoader to let me load it ??
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1199) Cannot use JAXB inside a plugin
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1199?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-1199:
-----------------------------------
Component/s: Furnace (Container)
> Cannot use JAXB inside a plugin
> -------------------------------
>
> Key: FORGE-1199
> URL: https://issues.jboss.org/browse/FORGE-1199
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Furnace (Container)
> Affects Versions: 1.4.0.Final, 2.7.2.Final
> Reporter: Luca Masini
> Fix For: 2.x Future
>
>
> I need to unmarshal some XML using JAXB.
> If I try to add this dependency:
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-xjc</artifactId>
> <version>2.2.1</version>
> <scope>compile</scope>
> <exclusions>
> <exclusion>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> and then to create a JAXB Context:
> final JAXBContext context = JAXBContext.newInstance(Model.class);
> then I got an exception when launching the plugin:
> javax.xml.bind.JAXBException
> - with linked exception:
> [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.xxxxxxx.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]]
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:187)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:376)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
> at it.xxx.forge.parser.Parser.parse(Parser.java:17)
> at it.xxx.forge.forge.CreateEntitiesPlugin.parse(CreateEntitiesPlugin.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.forge.shell.command.Execution.perform(Execution.java:160)
> ...
> ...
> Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.esselunga.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
> at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:481)
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:185)
> ... 41 more
> ContextFactory is part of rt.jar with is bundled with the JDK, how can I tell the ModuleClassLoader to let me load it ??
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1199) Cannot use JAXB inside a plugin
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1199?page=com.atlassian.jira.plugin... ]
George Gastaldi updated FORGE-1199:
-----------------------------------
Fix Version/s: 2.x Future
> Cannot use JAXB inside a plugin
> -------------------------------
>
> Key: FORGE-1199
> URL: https://issues.jboss.org/browse/FORGE-1199
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 1.4.0.Final, 2.7.2.Final
> Reporter: Luca Masini
> Fix For: 2.x Future
>
>
> I need to unmarshal some XML using JAXB.
> If I try to add this dependency:
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-xjc</artifactId>
> <version>2.2.1</version>
> <scope>compile</scope>
> <exclusions>
> <exclusion>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> and then to create a JAXB Context:
> final JAXBContext context = JAXBContext.newInstance(Model.class);
> then I got an exception when launching the plugin:
> javax.xml.bind.JAXBException
> - with linked exception:
> [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.xxxxxxx.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]]
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:187)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:376)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
> at it.xxx.forge.parser.Parser.parse(Parser.java:17)
> at it.xxx.forge.forge.CreateEntitiesPlugin.parse(CreateEntitiesPlugin.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.forge.shell.command.Execution.perform(Execution.java:160)
> ...
> ...
> Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.esselunga.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
> at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:481)
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:185)
> ... 41 more
> ContextFactory is part of rt.jar with is bundled with the JDK, how can I tell the ModuleClassLoader to let me load it ??
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1199) Cannot use JAXB inside a plugin
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-1199?page=com.atlassian.jira.plugin... ]
George Gastaldi reopened FORGE-1199:
------------------------------------
> Cannot use JAXB inside a plugin
> -------------------------------
>
> Key: FORGE-1199
> URL: https://issues.jboss.org/browse/FORGE-1199
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 1.4.0.Final
> Reporter: Luca Masini
>
> I need to unmarshal some XML using JAXB.
> If I try to add this dependency:
> <dependency>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-xjc</artifactId>
> <version>2.2.1</version>
> <scope>compile</scope>
> <exclusions>
> <exclusion>
> <groupId>com.sun.xml.bind</groupId>
> <artifactId>jaxb-impl</artifactId>
> </exclusion>
> </exclusions>
> </dependency>
> and then to create a JAXB Context:
> final JAXBContext context = JAXBContext.newInstance(Model.class);
> then I got an exception when launching the plugin:
> javax.xml.bind.JAXBException
> - with linked exception:
> [java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.xxxxxxx.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]]
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:187)
> at javax.xml.bind.ContextFinder.find(ContextFinder.java:376)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:574)
> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:522)
> at it.xxx.forge.parser.Parser.parse(Parser.java:17)
> at it.xxx.forge.forge.CreateEntitiesPlugin.parse(CreateEntitiesPlugin.java:19)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.jboss.forge.shell.command.Execution.perform(Execution.java:160)
> ...
> ...
> Caused by: java.lang.ClassNotFoundException: com.sun.xml.internal.bind.v2.ContextFactory from [Module "it.esselunga.forge.prova-plugin:1.0.0-SNAPSHOT-c1d512df-2daa-4ebe-ae7a-154e102bb88d" from local module loader @15aaf0b3 (roots: /Applications/sviluppo/jboss/forge-distribution-1.4.0.Final/modules,/Users/ictlm1/.forge/plugins,/Users/ictlm1/Documents/progetti/forge)]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)
> at javax.xml.bind.ContextFinder.safeLoadClass(ContextFinder.java:481)
> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:185)
> ... 41 more
> ContextFactory is part of rt.jar with is bundled with the JDK, how can I tell the ModuleClassLoader to let me load it ??
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-273) Create project from Maven archetype
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-273?page=com.atlassian.jira.plugin.... ]
George Gastaldi commented on FORGE-273:
---------------------------------------
Which archetype catalogs should we provide by default?
> Create project from Maven archetype
> -----------------------------------
>
> Key: FORGE-273
> URL: https://issues.jboss.org/browse/FORGE-273
> Project: Forge
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Blessed Plugins
> Reporter: Dan Allen
> Assignee: George Gastaldi
> Priority: Critical
> Fix For: 2.x Future
>
>
> Since the catalog of Maven archetypes is substantial, and the archetype plugin interface is so abysmal, Forge could benefit from being a stand-in replacement to archetype:generate. A command in Forge to create a new project from a Maven archetype would certainly offer a nice complement to the more basic "new-project" command. It could just be an additional flag to the new-project command, such as:
> new-project --named MyProject --fromArchetype org.jboss.weld.archetypes:jboss-javaee6-webapp
> Using the interactive prompts, you may be able to provide a list of archetypes, perhaps w/ a filtering mechanism. You could also just do a best guess based on what's found in the catalog.
> new-project --named MyProject --fromArchetype jboss-javaee6-webapp
> You could just delegate to Maven by building up the "mvn archetype:generate" command from Forge. Long term we could consider emulating the archetype:generate plugin so as just to consume the projects that are out there already w/o any linkage to Maven.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-273) Create project from Maven archetype
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-273?page=com.atlassian.jira.plugin.... ]
George Gastaldi updated FORGE-273:
----------------------------------
Priority: Critical (was: Minor)
> Create project from Maven archetype
> -----------------------------------
>
> Key: FORGE-273
> URL: https://issues.jboss.org/browse/FORGE-273
> Project: Forge
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Blessed Plugins
> Reporter: Dan Allen
> Assignee: George Gastaldi
> Priority: Critical
> Fix For: 2.x Future
>
>
> Since the catalog of Maven archetypes is substantial, and the archetype plugin interface is so abysmal, Forge could benefit from being a stand-in replacement to archetype:generate. A command in Forge to create a new project from a Maven archetype would certainly offer a nice complement to the more basic "new-project" command. It could just be an additional flag to the new-project command, such as:
> new-project --named MyProject --fromArchetype org.jboss.weld.archetypes:jboss-javaee6-webapp
> Using the interactive prompts, you may be able to provide a list of archetypes, perhaps w/ a filtering mechanism. You could also just do a best guess based on what's found in the catalog.
> new-project --named MyProject --fromArchetype jboss-javaee6-webapp
> You could just delegate to Maven by building up the "mvn archetype:generate" command from Forge. Long term we could consider emulating the archetype:generate plugin so as just to consume the projects that are out there already w/o any linkage to Maven.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months