Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java Exception for running the example #4

Open
behzadm18 opened this issue Nov 18, 2019 · 6 comments
Open

java Exception for running the example #4

behzadm18 opened this issue Nov 18, 2019 · 6 comments
Assignees

Comments

@behzadm18
Copy link

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?

@gimsieke
Copy link
Contributor

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

@behzadm18
Copy link
Author

I have java 8 Update 66

@mkraetke
Copy link
Member

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

@mkraetke mkraetke assigned behzadm18 and unassigned mkraetke Nov 18, 2019
@behzadm18
Copy link
Author

behzadm18 commented Nov 18, 2019

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.

@mkraetke
Copy link
Member

mkraetke commented Nov 18, 2019

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

@behzadm18
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants