1

I'm trying to use xjc to generate Java classes from a DDEX schema, http://service.ddex.net/xml/ern/381/release-notification.xsd, but when I run the xjc tool it says Segmentation Fault right away. How do I figure out what is wrong with the xsd file or with the way that I am calling the tool?

$ xjc -d src -p com.mypackage release-notification.xsd
parsing a schema...
Segmentation fault

I opened the xsd file with https://www.oxygenxml.com/ editor and it said it was valid. Also the site https://www.corefiling.com/opensource/schemaValidate/ was able to validate the schema.

1 Answers1

0

I could not get the XML Java Compiler (xjc) to work with DDEX schemas, however, the Apache XMLBeans library is able to parse them and generate Java beans. Also, it has pretty good error messages:

    $ java -classpath xmlbeans-3.1.0.jar \
         org.apache.xmlbeans.impl.tool.SchemaCompiler \
         -dl -d ~/ddex/class -src ~/ddex/src ddex381.jar \
         ~/ddex/381-release-notification.xsd