users@jaxb.java.net

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

From: pmeister <pmeister_at_gmail.com>
Date: Wed, 12 Sep 2007 19:41:27 -0700 (PDT)

No, I gave up on it. I'm also using JDK 1.6. I wonder if that's the key
difference.


tuluvasudeva wrote:
>
> 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>
>
>
> pmeister wrote:
>>
>> Did you ever figure this out? I'm having the same issue, except that XJC
>> finds the plugin jar even if it's not in the endorsed directory. But it
>> does complain that
>> "org.jvnet.jaxb2_commons.tools.xjc.plugin.commons_lang.XjcCommonsLangPlugin
>> is not a subclass of class com.sun.tools.xjc.Plugin. Skipping". I also
>> suspect it's a classloader issue. I'm using xjc-2.1.4 through the ant
>> wrapper with ant 1.7.0.
>>
>>
>>
>>
>> Raymond Wold wrote:
>>>
>>> I just can't seem to make it work, has anyone else tried with any
>>> success?
>>>
>>> Using -Dcom.sun.tools.xjc.Options.findServices=true I find that XJC
>>> finds a
>>> plugin if, and only if, the plugin jar file also resides in the endorsed
>>> directory. And then it lists it as ignored since it "is not a subclass
>>> of
>>> class com.sun.tools.xjc.Plugin". Could this be because of some
>>> classloader
>>> issues, for instance that the com.sun.tools.xjc.Plugin that the plugin
>>> implements is loaded differently from the one the XJC does an instanceof
>>> check
>>> against? What other things should I try, in this case?
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>>
>>>
>>>
>>
>>
>
>

-- 
View this message in context: http://www.nabble.com/Making-XJC-plugins-work-with-JAXB-as-endorsed-in-Java-1.6-tf4317067.html#a12647752
Sent from the java.net - jaxb users mailing list archive at Nabble.com.