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

update to jdk 11, and grobid 0.8.1 #164

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft

update to jdk 11, and grobid 0.8.1 #164

wants to merge 8 commits into from

Conversation

lfoppiano
Copy link
Collaborator

I managed to have the build work and it seems that there are issues with the tests. I haven't tried to run it, yet.

Here the broken test classes:

KBUtilitiesTest
CustomisationTest
ProcessTextTest

All the failing test are due to the same error, and I think it's due to the fact that I lmdbjni does not exists for arm 64.

Could not load library. Reasons: [no lmdbjni64-0.4.6 in java.library.path: [/Users/lfoppiano/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .], no lmdbjni-0.4.6 in java.library.path: [/Users/lfoppiano/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .], no lmdbjni in java.library.path: [/Users/lfoppiano/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .], Can't load library: /var/folders/mk/scd8428n18jfgh3jdthbvpz00000gn/T/liblmdbjni-64-0-7539440420833364823.4]
java.lang.UnsatisfiedLinkError: Could not load library. Reasons: [no lmdbjni64-0.4.6 in java.library.path: [/Users/lfoppiano/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .], no lmdbjni-0.4.6 in java.library.path: [/Users/lfoppiano/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .], no lmdbjni in java.library.path: [/Users/lfoppiano/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .], Can't load library: /var/folders/mk/scd8428n18jfgh3jdthbvpz00000gn/T/liblmdbjni-64-0-7539440420833364823.4]
	at org.fusesource.hawtjni.runtime.Library.doLoad(Library.java:187)
	at org.fusesource.hawtjni.runtime.Library.load(Library.java:143)
	at org.fusesource.lmdbjni.JNI.<clinit>(JNI.java:41)
	at org.fusesource.lmdbjni.Env.create(Env.java:57)
	at org.fusesource.lmdbjni.Env.<init>(Env.java:51)
	at com.scienceminer.nerd.kb.db.KBDatabase.<init>(KBDatabase.java:39)
	at com.scienceminer.nerd.kb.db.StringRecordDatabase.<init>(StringRecordDatabase.java:20)
	at com.scienceminer.nerd.kb.db.ConceptDatabase.<init>(ConceptDatabase.java:18)
	at com.scienceminer.nerd.kb.db.KBUpperEnvironment.buildConceptDatabase(KBUpperEnvironment.java:220)
	at com.scienceminer.nerd.kb.db.KBUpperEnvironment.initDatabases(KBUpperEnvironment.java:117)
	at com.scienceminer.nerd.kb.db.KBUpperEnvironment.<init>(KBUpperEnvironment.java:59)
	at com.scienceminer.nerd.kb.UpperKnowledgeBase.<init>(UpperKnowledgeBase.java:76)
	at com.scienceminer.nerd.kb.UpperKnowledgeBase.getNewInstance(UpperKnowledgeBase.java:58)
	at com.scienceminer.nerd.kb.UpperKnowledgeBase.getInstance(UpperKnowledgeBase.java:48)
	at com.scienceminer.nerd.kb.KBUtilitiesTest.setUp(KBUtilitiesTest.java:15)

[...]

@lfoppiano
Copy link
Collaborator Author

@kermitt2 I've created a Github action that should be able to build it. I tried to run the tests but they fail because there is no data in the database. It should work with the latest grobid version compiled with JDK 11.

@kermitt2
Copy link
Owner

kermitt2 commented Jul 4, 2024

Hi @lfoppiano ! Thank you.

Indeed simply removing the --add-opens jdk.incubator.foreign makes it working with jdk 11, which is funny because I added all these modules, including this specific one, to have it running on jdk >8.

About the tests, they can be run only after downloading the data files and installing them, I think it has always been like that. But I can confirm that the tests are fine with the data.

I will merge the PR when grobid version 0.8.1 is published - I updated the master so that it works with version 0.8.0 and jdk 11.

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

Successfully merging this pull request may close these issues.

2 participants