-
Notifications
You must be signed in to change notification settings - Fork 5
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
Upgrade Java #308
Comments
Metadig-engine Java source code compiles fine using Java 9.4.0, which was downloaded and installed on my MBP macOS 11.6.5 (Big Sur). Java was downloaded from https://jdk.java.net/archive/. Note that this website warns:
However, when I attempt to run with this compiled version, the DataONE libraries that metadig-engine is dependant on produce the following errors:
Therefore, it is not possible currently to upgrade Java until the DataONE libraries have been upgraded to a newer version of Java. The current Java version is 18. |
Hi @jeanetteclark, in the dataone-indexer pom.xml, I added those dependencies to work around the issue:
The full pom.xml can be found: Here is the link for this issue: https://mkyong.com/java/java-lang-classnotfoundexception-com-sun-xml-bind-v2-contextfactory/ |
Docker base images and the pom have both been updated, and everything seems to be working locally. Will test more full on k8s once a few other issues in this release have been addressed |
okay so this is not working and we could use some ideas - The error that is thrown is from d1_libclient_java - MultipartD1Node.deserializeServiceType:870 ... following the stack further down we get to: things I have tried: Adding this set of dependencies to the pom.xml (per @taojing2002 above)
using this for the runtime instead of glassfish, from this SO post
using this set of dependencies instead: (from the same post as above)
creating a jaxb.properties file as described here and here. Nothing is working. @taojing2002 and I spent about 90 minutes reviewing the jar file and all of the classes, everything looks like it is in place correctly so we must be missing something. Any ideas you have @mbjones would be welcome |
@jeanetteclark for this to work in Bookkeeper, I had to explicitly exclude the jaxb dependency from the d1_libclient jar file, like so (in addition to including the jackson dependencies Jing listed above): <dependency>
<groupId>org.dataone</groupId>
<artifactId>d1_libclient_java</artifactId>
<version>${d1libclient.version}</version>
<exclusions>
<exclusion>
<groupId>org.junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion>
</exclusions>
</dependency> I also had to exclude jaxb from our dropwizard dependencies, which included it indirectly. The way I tracked this down is to run |
@jeanetteclark I made it work. The pom.xml file already has the dependency |
Thank you Jing! it works for me as well |
metadig-engine is currently built and run under OpenJDK 8.
This should be upgraded to a newer or current version, see https://openjdk.java.net/projects/jdk/
To accomplish this:
Dockerfiles
to use the newer Java versionThe text was updated successfully, but these errors were encountered: