Aaron Stromas wrote:
> Greetings,
>
> I'm new to JAXP, and I've run into an error trying to generate code from my
> schema. The schema is correct, validated by Xerces and XmlSpy, but running
> xjc.sh fails:
>
> $ xjc.sh -xmlschema sps.xsd -b binding.xjb -d .
> parsing a schema...
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269)
> Caused by: java.lang.NullPointerException
> at
> com.sun.tools.xjc.GrammarLoader.buildDOMForest(GrammarLoader.java:315)
> at
> com.sun.tools.xjc.GrammarLoader.loadXMLSchema(GrammarLoader.java:346) at com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:125)
> at com.sun.tools.xjc.GrammarLoader.load(GrammarLoader.java:71)
> at com.sun.tools.xjc.Driver.run(Driver.java:192)
> at com.sun.tools.xjc.Driver._main(Driver.java:82)
> at com.sun.tools.xjc.Driver.access$000(Driver.java:48)
> at com.sun.tools.xjc.Driver$1.run(Driver.java:62)
>
Aaron,
This normally indicates a problem with the classpath, but since you're running
xjc.sh it should be taking care of all the settings for you. Can you boil
your schema down to a simple test case that reproduces the problem and send
it to the list?
> I need a hint at where I should look. BTW, is it possible to get the source
> code? TIA,
>
Soon, keep an eye on
http://jaxb.dev.java.net
-Ryan
> -a
> --
> Aaron Stromas | "Tik-tik-tik!!!... ja, Pantani is weg..."
> mailto:ams_at_izoard.com | BRTN commentator
> +1 (301) 493 4933 | L'Alpe d'Huez
> http://www.izoard.com | 1995 Tour de France
>