users@jaxb.java.net

Re: Generated runtime depends on XJC jar in version 1.0.3

From: Ryan Shoemaker - JavaSoft East <Ryan.Shoemaker_at_Sun.COM>
Date: Tue, 29 Jun 2004 11:37:25 -0400

Gary Gregory wrote:

> Hello,
>
> I am trying to migrate to JAXB version 1.0.3 included in JWSPD 1.4. The
> following does not seem right.
>
> I've generated code that contains:
>
> <snip>
> UnmarshallerHandler handler =ew
> InterningUnmarshallerHandler(
> createUnmarshallerHandler(new DOMLocator(scanner)));
> <snip>
>
> This code is generated in my JAXB shared runtime, which for us is in
> com.seagullsw.toolbox.xml.jaxb.impl.runtime
>
> Our build's JAXB code gen works fine but the compilation no longer
> works. The following class is undefined: InterningUnmarshallerHandler.
> After some digging I found InterningUnmarshallerHandler packaged in
> jwsdp 1.4 ./jaxb/lib/jaxb-xjc.jar. We've never included jaxb-xjc.jar on
> our compile path before.
>
> This seems like a bug. Generated code should not rely on the compiler
> jar. Should it? If this is normal, it means we must deliver jaxb-xjc.jar
> with our runtime, which does not feel right.
>

Hi Gary,

This seems more like a configuration error on your side. You are
correct that the shared runtime code that gets generated into your
com.seagullsw.*.impl.runtime is also available in the jaxb-xjc.jar
under com.sun.tools.xjc.runtime. When xjc runs, it essentially
copies the source from the compiler jar and repackages it in your
client package.

AFAIK, there are no runtime dependencies on the compiler jar. That
would be a bug, as you pointed out. Can you double check your client
package and classpath and make sure that it isn't a configuration
problem in your environment?

I've attached a sample that I ran. The build.xml sets up two different
classpaths: one with jaxb-xjc.jar, the other without. I run xjc with
the compiler jar and I run javac and java without it and it seems to
work fine. To run it, just:

% jar xvf test.zip
% cd test
% export JWSDP_HOME="/path/to/jwsdp-1.4"
% ant

Please let me know what you discover so I can update the bug report
you filed.

Thanks,

--Ryan


> Please advise.
>
> Thank you,
> Gary
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
> .
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net