users@jaxb.java.net

Re: Making XJC plugins work with JAXB as endorsed in Java 1.6

From: Aleksei Valikov <valikov_at_gmx.net>
Date: Thu, 13 Sep 2007 08:47:18 +0200

Hi.

> Did any of u figure this out for JDK1.6. I came across the same error in
> JDK1.6 while trying to create a simple plugin named varnish. It appears that
> the jar was found even though it was not in endorsed directory but gave the
> error message as below. Also uploading the build file and the simple plugin.
> http://www.nabble.com/file/p12647638/build.xml build.xml
> http://www.nabble.com/file/p12647638/VarnishPlugin.java VarnishPlugin.java
> jax:
> [xjc] Looking for META-INF/services/com.sun.tools.xjc.Plugin for
> add-ons
> [xjc] Checking
> jar:file:/c:/Program%20Files/netbeans-5.5.1/ide7/modules/ext/jaxws21/jaxb-xjc.jar!/META-INF/services/com.sun.tools.xjc.Plugin
> for an add-on
> [xjc] Attempting to instanciate
> com.sun.tools.xjc.addon.locator.SourceLocationAddOn
> [xjc] Attempting to instanciate
> com.sun.tools.xjc.addon.sync.SynchronizedMethodAddOn
> [xjc] Attempting to instanciate
> com.sun.tools.xjc.addon.at_generated.PluginImpl
> [xjc] Attempting to instanciate
> com.sun.tools.xjc.addon.episode.PluginImpl
> [xjc] Checking
> jar:file:/c:/wrk/varnish/dist/varnish.jar!/META-INF/services/com.sun.tools.xjc.Plugin
> for an add-on
> [xjc] com.timebots.fos.jaxb.VarnishPlugin is not a subclass of class
> com.sun.tools.xjc.Plugin. Skipping
> [xjc] Checking
> jar:file:/c:/Program%20Files/netbeans-5.5.1/ide7/modules/ext/jaxws21/jaxb-xjc.jar!/META-INF/services/com.sun.tools.xjc.Plugin
> for an add-on
> [xjc] Checking
> jar:file:/c:/wrk/varnish/dist/varnish.jar!/META-INF/services/com.sun.tools.xjc.Plugin
> for an add-on
> [xjc] failure in the XJC task. Use the Ant -verbose switch for more
> details
>
> BUILD FAILED
> C:\wrk\varnish\dist\build.xml:29: unrecognized parameter -Xvarnish
>
> Total time: 0 seconds
> C:\wrk\varnish\dist>


This seems to be the same problem as reported previously. Seems like
xjc task classpath under ant is not constructed correctly. Would you
post your build.xml?

Bye.
/lexi