rOpenStats / sdmx_xsdgen

Converts DSD files to SDX.
European Union Public License 1.1
1 stars 0 forks source link

Problem executing XSDGeneratorApp FREQ #2

Open kenarab opened 6 years ago

kenarab commented 6 years ago
java -cp "jcommander-1.17.jar:xsdgen-app-1.3.1.jar:sdmx_2_1/saxon-9.4.0.3j.jar" org.estat.xsdgen.app.XSDGeneratorApp -i SDMX-RI-DSD-BOP-1.9-sdmx2.1.xml -o SDMX-RI-DSD-BOP-1.9-_XS_FREQ.xsd -s FREQ

Error:

Loading DSD file: /usr/local/indec-dnci/sdmx-dnci/dsd/SDMX-RI-DSD-BOP-1.9-sdmx2.1.xml
Exception in thread "main" java.lang.ExceptionInInitializerError
    at org.estat.xsdgen.app.XSDGeneratorApp.generate(XSDGeneratorApp.java:82)
    at org.estat.xsdgen.app.XSDGeneratorApp.main(XSDGeneratorApp.java:53)
Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: java.util.ServiceConfigurationError: javax.xml.xpath.XPathFactory: jar:file:/Users/kenarab/workspace.indec/sdmx_xsdgen/xsdgen-app-1.3.1-src/target/xsdgen-app-1.3.1/libs/sdmx_2_1/saxon-9.4.0.3j.jar!/META-INF/services/javax.xml.xpath.XPathFactory:2: Illegal configuration-file syntax
kenarab commented 6 years ago

https://stackoverflow.com/questions/798333/classpath-issue-using-xpathfactory?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

You need to add the appropriate .jar in your classpath. In my case I used the Saxon-HE library.

There exists a bug in Saxon9 you maybe run into like me.

The bug has been corrected in version 9.5.1.5. So you may download the latest Saxon 9 HE.

I

kenarab commented 6 years ago

It worked giving a new error

kenarab commented 6 years ago

After Saxon-HE-9.4.0-8.jar, tried Saxon-HE-9.5.1-8.jar Saxon-HE-9.6.0-5.jar Saxon-HE-9.8.0-12.jar

and neither works