users@jaxb.java.net

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

From: edward pedersson <cpsmadness_at_googlemail.com>
Date: Thu, 28 Jun 2007 22:53:56 +0100

I am using two separate xjc tasks and in two separate build files so I
can easily adapt the classpath at compile time. Both generated files
do get deployed in the same war package though so I don't think I can
get rid of it at runtime.

I thought the changes were made in JaxB 2.0 to have the /1.0/com...
appended to the package name so you would not get into such problems?

On 28/06/07, Malachi de Ælfweald <malachid_at_gmail.com> wrote:
> 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
> >
> >
>
>


-- 
-- e