users@jaxb.java.net

Re: how to use catalogs with jaxb 2.0

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 03 Aug 2005 09:56:17 -0700

Johannes Echterhoff wrote:
> I tried the weekly build jaxb-ri-20050801 and for my simple example it
> works - now obviously with catalogs. Ok so far, but when i try to
> generate sources for more complex xsd's i got an exception. I downloaded
> the schemas from http://schemas.opengeospatial.net/gml/3.1.1 and tried
> to compile them. See the command and exception below:

OK, this looks like a different bug. I'll try to look into the schema,
but you might want to file this as an issue so that you can keep track
of our progress.

> C:\Daten\SPS_x2j_test>xjc -d result -catalog CustomCatalog.xml gml311/base
> parsing a schema...
> compiling a schema...
> Exception in thread "main" java.lang.NullPointerException
> at
> com.sun.tools.xjc.reader.TypeUtil.getCommonBaseType(TypeUtil.java:133)
> at
> com.sun.tools.xjc.reader.TypeUtil.getCommonBaseType(TypeUtil.java:41)
> at
> com.sun.tools.xjc.reader.TypeUtil.getCommonBaseType(TypeUtil.java:155)
> at
> com.sun.tools.xjc.reader.TypeUtil.getCommonBaseType(TypeUtil.java:41)
> at
> com.sun.tools.xjc.generator.bean.field.AbstractField.getType(AbstractField.java:390)
> at
> com.sun.tools.xjc.generator.bean.field.AbstractField.<init>(AbstractField.java:91)
> at
> com.sun.tools.xjc.generator.bean.field.AbstractListField.<init>(AbstractListField.java:86)
> at
> com.sun.tools.xjc.generator.bean.field.UntypedListField.<init>(UntypedListField.java:78)
> at
> com.sun.tools.xjc.generator.bean.field.UntypedListFieldRenderer.generate(UntypedListFieldRenderer.java:32)
> at
> com.sun.tools.xjc.generator.bean.field.DefaultFieldRenderer.generate(DefaultFieldRenderer.java:39)
> at
> com.sun.tools.xjc.generator.bean.BeanGenerator.generateFieldDecl(BeanGenerator.java:648)
> at
> com.sun.tools.xjc.generator.bean.BeanGenerator.generateClassBody(BeanGenerator.java:468)
> at
> com.sun.tools.xjc.generator.bean.BeanGenerator.<init>(BeanGenerator.java:190)
> at
> com.sun.tools.xjc.generator.bean.BeanGenerator.generate(BeanGenerator.java:135)
> at com.sun.tools.xjc.model.Model.generateCode(Model.java:227)
> at com.sun.tools.xjc.Driver.run(Driver.java:265)
> at com.sun.tools.xjc.Driver.run(Driver.java:154)
> at com.sun.tools.xjc.Driver._main(Driver.java:79)
> at com.sun.tools.xjc.Driver.access$000(Driver.java:37)
> at com.sun.tools.xjc.Driver$1.run(Driver.java:59)
>
> The same with the following command:
> C:\Daten\SPS_x2j_test>java -Dxml.catalog.verbosity=999 -jar
> C:/Daten/jaxb-ri-20050801/lib/jaxb-xjc.jar -d result -catalog
> CustomCatalog.xml gml311/base
>
> Any suggestions?
>
> Johannes Echterhoff
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>


-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com