-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Does CoreNLP support openJdk 17? if so how to solve this "Error creating edu.stanford.nlp.time.TimeExpressionExtractorImpl" ? #1335
-
can coreNLP support openJdk 17?
we are trying to move it from openJDk 1.8 to 17 but we see following error:
edu.stanford.nlp.util.ReflectionLoading$ReflectionLoadingException: Error creating edu.stanford.nlp.time.TimeExpressionExtractorImpl at edu.stanford.nlp.util.ReflectionLoading.loadByReflection(ReflectionLoading.java:38) at edu.stanford.nlp.time.TimeExpressionExtractorFactory.create(TimeExpressionExtractorFactory.java:60) at edu.stanford.nlp.time.TimeExpressionExtractorFactory.createExtractor(TimeExpressionExtractorFactory.java:43) at edu.stanford.nlp.ie.regexp.NumberSequenceClassifier.<init>(NumberSequenceClassifier.java:86) at edu.stanford.nlp.ie.NERClassifierCombiner.<init>(NERClassifierCombiner.java:135) at edu.stanford.nlp.pipeline.NERCombinerAnnotator.<init>(NERCombinerAnnotator.java:131)
can someone pls help?
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 5 comments 1 reply
-
You are not the first to notice this - it appears to be a problem with Java 17 having dropped support for a library Jollyday used
There is unfortunately no great solution aside from not using sutime. Another possible solution, which we'll have to investigate, would be to use the old Jollyday for 1.8 and use an updated library (apparently one exists) for 1.17.
1.8 is such an old friend... would be sad to see it go.
Beta Was this translation helpful? Give feedback.
All reactions
-
The first step would be switching from using joda-time to using Java's built in time library. Unfortunately, that step is a doozy. There's a Partial class which tracks a partially filled out time in joda-time, sutime makes extensive use of that class, and there is no equivalent in Java.
Beta Was this translation helpful? Give feedback.
All reactions
-
we tried adding -ner.useSUTime false
by seeing here https://github.com/stanfordnlp/CoreNLP/issues/636 but that also didn't help, still seeing same error
Beta Was this translation helpful? Give feedback.
All reactions
-
Looks like same issue with OpenJDK 11.0.17, can u suggest anything to make it work?
Beta Was this translation helpful? Give feedback.
All reactions
-
I've been running fine on OpenJDK 11. I suspect there's something else going on, in that case. How are you running CoreNLP in the first place? Is your classpath correctly set to include all of the dependencies?
Beta Was this translation helpful? Give feedback.
All reactions
-
CoreNLp Dockerfile is pulling the OpenJDK and all its dependencies from RHEL8 UBI
Beta Was this translation helpful? Give feedback.