-
Notifications
You must be signed in to change notification settings - Fork 37
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/DataSource #81
Comments
This should be part of JRE. Which Java version do you use? |
I updated to java version "9" and i'm now getting the following error: Exception in thread "main" java.lang.Error: java.lang.reflect.InvocationTargetException |
Java 8 should work. With Java 9 it's probably the new module system which does not load |
I just ran into the same issue. From java 9 on, jaxb (and some other JEE modules are not provided on the default classpath anymore.
|
I tried adding
P.S. The conversion still went through. |
@ghdna thank you so much , that's was helpfull for me . it work (y) |
I tried running an Arabic tokenizer/diacritizer and got the same error message: Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/DataSource Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource I have limited experience in Java. As instructed by the developer, I entered the following line via the terminal: Can anyone let what could be the cause of this error and how to fix it? |
@fhr21 try to add |
The developer wrote this command to run the program thru the terminal in mac computer:
This is what I get:
|
As of https://stackoverflow.com/questions/52502189/java-11-package-javax-xml-bind-does-not-exist, it was removed in Java11. Adding following lines to Maven's pom.xml helped me:
|
I was having this problem with Java 8, spring boot and camel, this solution worked for me. |
I am having the same issue and also tried the --add-modules java.xml.bind but getting this: And I am using jdk 11.0.8 |
As noted in the following post, java.xml.bind has been removed from Java 11+. However, with a side-by-side installation of a lower version (Java 10 in my case), I was able to make the following command work in Windows via powershell: |
changing version java to 8 will help |
I was able to download activation.jar and use this:
|
This actually related to java version, this work only under java 8, see JAVA8_HOME This is temporary, I propose migrate java version, https://stackoverflow.com/questions/52502189/java-11-package-javax-xml-bind-does-not-exist |
That is not necessary, see #81 (comment) |
I am trying to build the tool from source, but since, there are too many changes it seems the build itself is quite broken. |
I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/activation/DataSource
when attempting to run:
java -jar node_modules/jsonix-schema-compiler/lib/jsonix-schema-compiler-full.jar -d mappings -p PO purchaseorder.xsd
on the CLI
I'm trying to get the examples working before I try real data. Any help would be greatly appreciated.
The text was updated successfully, but these errors were encountered: