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

Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/ #46

Closed
vastoncosta opened this issue Jul 7, 2019 · 6 comments

Comments

@vastoncosta
Copy link

Hello,

After updating jvm, I can no longer use docx2tex to produce tex files from docx files with the ./d2t command. I use mac OS via terminal for conversions and currently I have the following version of java:
java version "1.8.0_211"
Java (TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot (TM) 64-Bit Server VM (build 25.211-b12, mixed mode).
I would like to know if the problem is really with the java version of my computer, if someone else has already encountered this problem and, if possible, what solution should I take to remedy the problem.

Thank you very much in advance.

Follow the log generated.

2 Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/ DataSource
3 at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
4 at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:31 72)
5 at java.base/java.lang.Class.getMethodsRecursive(Class.java:3313)
6 at java.base/java.lang.Class.getMethod0(Class.java:3299)
7 at java.base/java.lang.Class.getMethod(Class.java:2112)
8 at com.xmlcalabash.core.XProcRuntime.initializeSteps(XProcRuntime.ja va:317)
9 at com.xmlcalabash.core.XProcRuntime.(XProcRuntime.java:272)
10 at com.xmlcalabash.drivers.Main.run(Main.java:100)
11 at com.xmlcalabash.drivers.Main.main(Main.java:83)
12 Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource
13 at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Builti nClassLoader.java:583)
14 at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadCla ss(ClassLoaders.java:178)
15 at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
16 ... 9 more

@mkraetke
Copy link
Member

Hi @vastoncosta ,
thank you for reporting this issue. Can you give me your OSX version? I mainly work with Linux and Windows, but I'll try to reproduce this error on a Mac.
Best, Martin

@vastoncosta
Copy link
Author

Hi, @mkraetke .

Sorry for the delay!!

My OSX version is Mojave version 10.14.5 (18F132).

Thanks again.

Best, Vaston

@mkraetke
Copy link
Member

mkraetke commented Jul 30, 2019

Hi @vastoncosta,

Unfortunately, I was not able to reproduce your error, but the DataSource class should be part of the JRE, so the bug should be related to your JRE installation. I tested docx2tex successfully on a MB Pro with MacOS v10.13.6. Here is what I did:

  1. I got the JRE v1.8.0_211-b12 from the Oracle website and installed it
  2. I opened a terminal and created ~/.bash_profile
  3. Then I edited ~/.bash_profile and set $JAVA_HOME:
    export JAVA_HOME=/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
  4. Finally, I run docx2tex and I got no error.

best, Martin

@carlomontec
Copy link

Hello,
I have the very same error with the current java Ubuntu 18.04:

± |master ?:3 ✗| → java --version
openjdk 11.0.4 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3)
OpenJDK 64-Bit Server VM (build 11.0.4+11-post-Ubuntu-1ubuntu218.04.3, mixed mode, sharing)

do I need to install also the JRE? I am very ignorant about Java, my apologies.
Regards

@mkraetke
Copy link
Member

mkraetke commented Oct 1, 2019

We support only Java 1.7/1.8 yet. This will change when we move to XProc 3.0. For now, I would recommend to downgrade to Java 1.8.

@mkraetke
Copy link
Member

mkraetke commented Jan 5, 2020

Fixed with 5ae4085

@mkraetke mkraetke closed this as completed Jan 5, 2020
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