You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a super simple example maven project, that has two dependencies: stanford-corenlp and spring-boot-starter-web, and got the pom.xml trimmed down as much as I know how.
Running this main function results in the following error:
May 24, 2024 11:28:29 AM de.jollyday.util.XMLUtil unmarshallConfiguration
WARNING: Could not create JAXB context using the current threads context classloader. Defaulting to ObjectFactory classloader.
Exception in thread "main" 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:110)
at edu.stanford.nlp.pipeline.NERCombinerAnnotator.<init>(NERCombinerAnnotator.java:147)
at edu.stanford.nlp.pipeline.AnnotatorImplementations.ner(AnnotatorImplementations.java:90)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.lambda$getNamedAnnotators$8(StanfordCoreNLP.java:632)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.lambda$null$33(StanfordCoreNLP.java:711)
at edu.stanford.nlp.util.Lazy$3.compute(Lazy.java:126)
at edu.stanford.nlp.util.Lazy.get(Lazy.java:31)
at edu.stanford.nlp.pipeline.AnnotatorPool.get(AnnotatorPool.java:149)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.<init>(StanfordCoreNLP.java:280)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.<init>(StanfordCoreNLP.java:194)
at edu.stanford.nlp.pipeline.StanfordCoreNLP.<init>(StanfordCoreNLP.java:190)
at com.test.App.main(App.java:12)
Caused by: edu.stanford.nlp.util.MetaClass$ClassCreationException: MetaClass couldn't create public edu.stanford.nlp.time.TimeExpressionExtractorImpl(java.lang.String,java.util.Properties) with args [sutime, {}]
at edu.stanford.nlp.util.MetaClass$ClassFactory.createInstance(MetaClass.java:237)
at edu.stanford.nlp.util.MetaClass.createInstance(MetaClass.java:372)
at edu.stanford.nlp.util.ReflectionLoading.loadByReflection(ReflectionLoading.java:36)
... 15 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:74)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
at edu.stanford.nlp.util.MetaClass$ClassFactory.createInstance(MetaClass.java:233)
... 17 more
Caused by: java.lang.RuntimeException: Error initializing binder 1
at edu.stanford.nlp.time.Options.<init>(Options.java:114)
at edu.stanford.nlp.time.TimeExpressionExtractorImpl.init(TimeExpressionExtractorImpl.java:45)
at edu.stanford.nlp.time.TimeExpressionExtractorImpl.<init>(TimeExpressionExtractorImpl.java:40)
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
... 20 more
Caused by: java.lang.IllegalStateException: Cannot instantiate configuration.
at de.jollyday.datasource.impl.XmlFileDataSource.getConfiguration(XmlFileDataSource.java:39)
at de.jollyday.impl.DefaultHolidayManager.doInit(DefaultHolidayManager.java:239)
at de.jollyday.HolidayManager.init(HolidayManager.java:319)
at de.jollyday.caching.HolidayManagerValueHandler.createValue(HolidayManagerValueHandler.java:44)
at de.jollyday.caching.HolidayManagerValueHandler.createValue(HolidayManagerValueHandler.java:13)
at de.jollyday.util.Cache.get(Cache.java:51)
at de.jollyday.HolidayManager.createManager(HolidayManager.java:168)
at de.jollyday.HolidayManager.getInstance(HolidayManager.java:148)
at edu.stanford.nlp.time.JollyDayHolidays.init(JollyDayHolidays.java:57)
at edu.stanford.nlp.time.Options.<init>(Options.java:112)
... 23 more
Caused by: java.lang.IllegalStateException: Cannot parse holidays XML file.
at de.jollyday.util.XMLUtil.unmarshallConfiguration(XMLUtil.java:78)
at de.jollyday.datasource.impl.XmlFileDataSource.getConfiguration(XmlFileDataSource.java:37)
... 32 more
Caused by: javax.xml.bind.JAXBException: Implementation of JAXB-API has not been found on module path or classpath.
- with linked exception:
[java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory]
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:168)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:355)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:508)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:465)
at de.jollyday.util.XMLUtil$JAXBContextCreator.create(XMLUtil.java:170)
at de.jollyday.util.XMLUtil.unmarshallConfiguration(XMLUtil.java:71)
... 33 more
Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.ContextFactory
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
at javax.xml.bind.ServiceLoaderUtil.nullSafeLoadClass(ServiceLoaderUtil.java:122)
at javax.xml.bind.ServiceLoaderUtil.safeLoadClass(ServiceLoaderUtil.java:155)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:165)
... 38 more
These two libraries share zero of the same dependencies (which you can verify if you recreate my setup you can use mvn depenency:tree). Both libraries have similar slf4j dependencies, but excluding these dependencies from both sides still causes the same issue.
The text was updated successfully, but these errors were encountered:
What version Java? There are Java versions where the current release of
jollyday isn't compatible. There are a few library upgrades we could make
which would better support all versions of Java 17, for example.
I made a super simple example maven project, that has two dependencies: stanford-corenlp and spring-boot-starter-web, and got the
pom.xml
trimmed down as much as I know how.My example project only has one file, an
App.java
with a main class which only makes a StanfordCoreNLP pipeline.Running this main function results in the following error:
These two libraries share zero of the same dependencies (which you can verify if you recreate my setup you can use
mvn depenency:tree
). Both libraries have similarslf4j
dependencies, but excluding these dependencies from both sides still causes the same issue.The text was updated successfully, but these errors were encountered: