Well, Forge 2 is in Alpha stage now, but it is pretty stable; We might change some APIs (although not drastically) until 2.0.0.Final is released by November.
I highly recommend migrating it to Forge 2, for numerous reasons. I'd suggest you to take a look at the README docs in https://github.com/forge/core/tree/2.0 and ping us in this list or IRC if you have any questions.

We'll be glad to help you out.

On 09/13/2013 09:09 AM, Luca Masini wrote:
I'll create the test-case for the JIRA, but in the meanwhile I think that I should switch to forge2, do you think I can use it for "production" ??


2013/9/13 George Gastaldi <ggastald@redhat.com>
Hi Luca,

We fixed that in Forge 2. In Forge 1 I believe you have no choice but to bundle the JAXB implementation in your plugin. 

Since this looks like a bug still present in Forge 1,  could you please open a JIRA with a simple test case? We'll try to make the fix available in the next release or find a better workaround for it, since it may impact exisiting plugins.

Best Regards,

George Gastaldi


Em 13/09/2013, às 06:40, Luca Masini <luca.masini@gmail.com> escreveu:

Hi guys, I'm developing a plugin where I need to unmarshal some beans using JAXB.

The parsing works great outside forge, but when I try to execute the same code inside a plugin I got this Exception:

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 ??

Thank you.



--
****************************************
http://www.lucamasini.net
http://twitter.com/lmasini
http://www.linkedin.com/pub/luca-masini/7/10/2b9
****************************************
_______________________________________________
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev

_______________________________________________
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev



--
****************************************
http://www.lucamasini.net
http://twitter.com/lmasini
http://www.linkedin.com/pub/luca-masini/7/10/2b9
****************************************


_______________________________________________
forge-dev mailing list
forge-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/forge-dev