users@jaxb.java.net

Re: Strange plugin problem

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Tue, 07 Jun 2005 11:42:04 +0200

Hi.

> After several hours of digging, seems like I've found what the source of
> the problem is. XJCTask uses ParallelWorldClassLoader which seems to
> conflict with Ant's classloader.
> For now, I simply disabled ParallelWorldClassLoader for 2.0:
> cl = XJCTask.class.getClassLoader();
> // cl = new
> // ParallelWorldClassLoader(XJCTask.class.getClassLoader(),source);
> driver = cl.loadClass("com.sun.tools.xjc.XJC2Task");
>
> And it works. I don't know what exactly the conflict is and what the
> whole idea behind this ParallelWorld was, but it functions now, with ant
> and plugins.

Finally, it was enough to switch ant task to com.sun.tools.xjc.XJC2Task.

Bye.
/lexi