You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-user@xml.apache.org by Radhakrishnan J <ra...@tavant.com> on 2004/05/06 02:12:20 UTC

JAXB support ?

Hi,

The -jaxb commandline option of the
org.apache.xmlbeans.impl.tool.SchemaCompiler doesn't seem to work. I get the
following exception when I try to use it -

Exception in thread "main" java.lang.ExceptionInInitializerError
        at
org.apache.xmlbeans.impl.tool.SchemaCodeGenerator.jaxbCodeGenerator(SchemaCo
deGenerator.java:231)
        at
org.apache.xmlbeans.impl.tool.SchemaCodeGenerator.compileTypeSystem(SchemaCo
deGenerator.java:106)
        at
org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(SchemaCompiler.java:798
)
        at
org.apache.xmlbeans.impl.tool.SchemaCompiler.main(SchemaCompiler.java:264)
Caused by: java.lang.IllegalStateException: Cannot load JaxbCodeGenerator:
verify that xbean.jar is on the classpath
        at
org.apache.xmlbeans.impl.tool.SchemaCodeGenerator$JaxbCodeGeneratorHolder.bu
ildJaxbCodeGeneratorMethod(SchemaCodeGenerator.java:220)
        at
org.apache.xmlbeans.impl.tool.SchemaCodeGenerator$JaxbCodeGeneratorHolder.<c
linit>(SchemaCodeGenerator.java:209)
        ... 4 more
Caused by: java.lang.ClassNotFoundException:
org.apache.xmlbeans.impl.jaxb.compiler.JaxbCodeGenerator
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Unknown Source)
        at
org.apache.xmlbeans.impl.tool.SchemaCodeGenerator$JaxbCodeGeneratorHolder.bu
ildJaxbCodeGeneratorMethod(SchemaCodeGenerator.java:215)
        ... 5 more

Also, the 'jaxb-api.jar' thats referred to in the 'jaxbc.cmd' script is not
part of the distribution. Is this a shortcoming or am I missing something ?

I'm doing an exercise of evaluating XmlBeans for Java-XML binding, in
comparison to Castor. Amongst the other differences, one such difference is
the fact that XmlBeans supports JAXB. However, I am not able to get the jaxb
compilation going.

Thanks,
Radhakrishnan

Radhakrishnan J
714.634.3494 x 5744 ( work )
714.748.7700 # 509 ( hotel )


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/