users@jaxb.java.net

Re: xjc binding compiler not generating impl/*.java files

From: Malachi de Ælfweald <malachid_at_gmail.com>
Date: Thu, 28 Jun 2007 14:45:54 -0700

If you are generating v1 and v2 source files, I assume you are doing that
with two separate xjc commands, right? If so, then I would recommend keeping
the jaxb1 file out of the classpath when compiling and using the v2 sources.

You should ensure that you really need to maintain v1 source files. If you
can do just v2, you will have less maintenance than doing both.


Malachi

On 6/28/07, edward pedersson <cpsmadness_at_googlemail.com> wrote:
>
> I thought you need to have the jaxb1-impl in the classpath to be able
> to generate jaxb 1.0 source files? We need to generate 1.0 and 2.0 so
> I have kept it in my classpath. Is this wrong?
>
> On 28/06/07, Malachi de Ælfweald <malachid_at_gmail.com> wrote:
> > Hi Geoff,
> >
> > JAXB used to always generate the impl classes. Then we got a much
> cleaner
> > interface :)
> >
> > You can still generate them if you really need them, but if you are just
> > looking for them because you thought they should be there, I would say
> > don't. The newer approach is much cleaner.
> >
> > As a side note, you probably should take the jaxb1-impl.jar out of your
> > classpath; it can confuse the classpath.
> >
> > Malachi
> >
> >
> > On 6/28/07, Geoff Winsor <gwinsor_at_sfu.ca> wrote:
> > > Hi,
> > > I am trying to use JAXB to marshal XML documents for a website I am
> > > working on. The process of first generating the JAXB classes from the
> > > XML schema using the xjc binding compiler seems easy but I am not able
> > > to generate the impl/ subdirectory and the implementations. I decided
> to
> > > take a step back and use the po.xsd schema which is used in a lot of
> > > JAXB tutorials, however the problem remains.
> > >
> > > Here is what I have entered at the command line:
> > > /usr/java/jaxb-ri-20070122/bin/xjc.sh -p primer.po -d
> > > /home//InnateDB/src/com/innatedb/ po.xsd
> > >
> > > The output I get:
> > > parsing a schema...
> > > compiling a schema...
> > > primer/po/Items.java
> > > primer/po/ObjectFactory.java
> > > primer/po/PurchaseOrderType.java
> > > primer/po/USAddress.java
> > >
> > > When I re-enter the command with the -debug option, I get:
> > >
> > > parsing a schema...
> > > compiling a schema...
> > > [INFO] generating code
> > > unknown location
> > >
> > > primer/po/Items.java
> > > primer/po/ObjectFactory.java
> > > primer/po/PurchaseOrderType.java
> > > primer/po/USAddress.java
> > > JAXBDebug.java
> > >
> > > The following JAXB-related jar files are in my classpath:
> > > activation.jar
> > > jaxb1-impl.jar
> > > jaxb-api-doc.zip
> > > jaxb-api.jar
> > > jaxb-api-src.zip
> > > jaxb-impl.jar
> > > jaxb-impl.src.zip
> > > jaxbw.jar
> > > jaxb-xjc.jar
> > > jaxb-xjc.src.zip
> > > jsr173_1.0_api.jar
> > > substance.jar
> > >
> > > I tried another binding compiler from my JDK1.6 distribution but still
> > > fail to generate the impl/*.java files.
> > > Any suggestions as to how I can fix this would be greatly appreciated.
> > > Thanks,
> > > Geoff
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > users-unsubscribe_at_jaxb.dev.java.net
> > > For additional commands, e-mail: users-help_at_jaxb.dev.java.net
> > >
> > >
> >
> >
>
>
> --
>
>
> -- e
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>