xml2tex icon indicating copy to clipboard operation
xml2tex copied to clipboard

java Exception for running the example

Open behzadm18 opened this issue 6 years ago • 6 comments

Hi, After following the setup steps I ran calabash/calabash.bat -i source=xml2tex/example/example.xml -i conf=xml2tex/example/conf-hubcssa.xml xml2tex/xpl/xml2tex.xpl

(or in cygwin calabash/calabash.sh -i source=xml2tex/example/example.xml -i conf=xml2tex/example/conf-hubcssa.xml xml2tex/xpl/xml2tex.xpl)

and got the following message:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/DataSource at java.base/java.lang.Class.getDeclaredMethods0(Native Method) at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166) at java.base/java.lang.Class.getMethodsRecursive(Class.java:3307) at java.base/java.lang.Class.getMethod0(Class.java:3293) at java.base/java.lang.Class.getMethod(Class.java:2106) at com.xmlcalabash.core.XProcRuntime.initializeSteps(XProcRuntime.java:341) at com.xmlcalabash.core.XProcRuntime.(XProcRuntime.java:290) at com.xmlcalabash.drivers.Main.run(Main.java:100) at com.xmlcalabash.drivers.Main.main(Main.java:83) Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 9 more

(I thought I might have made a mistake during the setup and therefore cloned docx2tex recursively, but got the same error when I tried to run the example command )

Could you please let me know what I should do?

behzadm18 avatar Nov 18 '19 16:11 behzadm18

What is your Java version? It needs to run on Java 7 or 8.

gimsieke avatar Nov 18 '19 16:11 gimsieke

I have java 8 Update 66

behzadm18 avatar Nov 18 '19 16:11 behzadm18

I've updated the path to the xml calabash jar file. You just need to pull the changes in your calabash module.

mkraetke avatar Nov 18 '19 20:11 mkraetke

Thank you. Right now I am trying on another machine with java 8.0.2310.11 and get the error "calabash/calabash.sh: line 158: java: command not found" Tomorrow I can try on the original machine to see if the updated path to the xml calabash jar file solves the problem.

behzadm18 avatar Nov 18 '19 20:11 behzadm18

I guess you need to add the path to the Java bin directory to your Windows Path variable. For example in my case, I added C:\Program Files\Java\jre1.8.0_212\bin

mkraetke avatar Nov 18 '19 20:11 mkraetke

I think some path still might not be correct, I don't have the directory xml2tex under calabash:

ERROR: err:XD0011:XProc error err:XD0011 ERROR: cause: I/O error reported by XML parser processing file:/C:/xml2tex/calabash/xml2tex/xpl/xml2tex.xpl: C:\xml2tex\calabash\xml2tex\xpl\xml2tex.xpl (The system cannot find the path specified) ERROR: It is a dynamic error if the resource referenced by a p:document element does not exist, cannot be accessed, or is not a well-formed XML document. ERROR: Underlying exception: I/O error reported by XML parser processing file:/C:/xml2tex/calabash/xml2tex/xpl/xml2tex.xpl: C:\xml2tex\calabash\xml2tex\xpl\xml2tex.xpl (The system cannot find the path specified)

behzadm18 avatar Nov 18 '19 21:11 behzadm18