users@jaxb.java.net

Re: Strange plugin problem

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_Sun.COM>
Date: Tue, 07 Jun 2005 10:04:15 -0400

Aleksei Valikov wrote:
>
> 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.
>

The idea was to find a way to package the 1.0 and 2.0 xjc code in
the same jar safely since some of the packages exist in both code
bases but have different versions of the classes...or something like
that. I didn't actually work on that part of the implementation, but
that's my recollection of what it is used for. I'll have Bhakti or
Kohsuke (on vacation this week) look into it.

Would you be willing to file a new issue with all the details from
this thread?

Thanks,

--Ryan