Lucene conflict with MinimalWorkingExample

2 views
Skip to first unread message

alainde...@gmail.com

unread,
Oct 3, 2019, 12:18:26 PM10/3/19
to dkpro-tc-users
I am trying to use DKPro TC into my own project. To that effect, I have cloned the MinimalWorkingExample from dkpro-tc-examples and copied it into my project under the new name MinimalWorkingExample2.

But when I run it, I get:

2019-10-03 12:08:42 ERROR [main] (DefaultLoggingService) - [MetaInfoTask-trainTest-20191003120841583] Task failed [org.dkpro.tc.core.task.MetaInfoTask-trainTest](caused by NoSuchFieldError: LUCENE_44)

See the end of the message for the complete output. 

When I look at the dependency tree of my project, I see that it has two versions of lucene-core: 1.4.4 and 7.5.0 and that it is ignoring the 1.4.4 version. 

I can't remove the 7.5.0 version because the rest of my code needs that version. 

Any suggestion on how I could deal with that?

== Complete output ==

DKPRO_HOME not set.
Setting DKPRO_HOME to: target/results/Users/desilets/Documents/GitRepositories/dkpro-tc/dkpro-tc-examples/target
2019-10-03 12:06:11  WARN [main] (PropertiesLoaderSupport) - Could not load properties from URL [file:target/results/Users/desilets/Documents/GitRepositories/dkpro-tc/dkpro-tc-examples/target/org.dkpro.lab/settings.properties]: target/results/Users/desilets/Documents/GitRepositories/dkpro-tc/dkpro-tc-examples/target/org.dkpro.lab/settings.properties (No such file or directory)
2019-10-03 12:08:42 ERROR [main] (DefaultLoggingService) - [MetaInfoTask-trainTest-20191003120841583] Task failed [org.dkpro.tc.core.task.MetaInfoTask-trainTest](caused by NoSuchFieldError: LUCENE_44)
2019-10-03 12:08:42 ERROR [main] (DefaultLoggingService) - [Evaluation-trainTest-20191003120611882] Task failed [Evaluation-trainTest](caused by NoSuchFieldError: LUCENE_44)
Exception in thread "main" org.dkpro.lab.engine.ExecutionException: org.dkpro.lab.engine.ExecutionException: java.lang.NoSuchFieldError: LUCENE_44
at org.dkpro.lab.engine.impl.BatchTaskEngine.run(BatchTaskEngine.java:155)
at org.dkpro.lab.engine.impl.DefaultTaskExecutionService.run(DefaultTaskExecutionService.java:52)
at org.dkpro.lab.Lab.run(Lab.java:113)
at org.dkpro.tc.ml.experiment.builder.AbstractBuilder.run(AbstractBuilder.java:420)
at org.dkpro.tc.examples.MinimalWorkingExample2.runExperiment(MinimalWorkingExample2.java:79)
at org.dkpro.tc.examples.MinimalWorkingExample2.main(MinimalWorkingExample2.java:52)
Caused by: org.dkpro.lab.engine.ExecutionException: java.lang.NoSuchFieldError: LUCENE_44
at org.dkpro.lab.uima.engine.simple.SimpleExecutionEngine.run(SimpleExecutionEngine.java:175)
at org.dkpro.lab.engine.impl.BatchTaskEngine.runNewExecution(BatchTaskEngine.java:346)
at org.dkpro.lab.engine.impl.BatchTaskEngine.executeConfiguration(BatchTaskEngine.java:241)
at org.dkpro.lab.engine.impl.BatchTaskEngine.run(BatchTaskEngine.java:133)
... 5 more
Caused by: java.lang.NoSuchFieldError: LUCENE_44
at org.dkpro.tc.features.ngram.meta.LuceneMC.initializeWriter(LuceneMC.java:88)
at org.dkpro.tc.features.ngram.meta.LuceneMC.initialize(LuceneMC.java:71)
at org.dkpro.tc.features.ngram.meta.WordNGramMC.initialize(WordNGramMC.java:63)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:267)
at org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:172)
at org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94)
at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:279)
at org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:407)
at org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:256)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:435)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:379)
at org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:192)
at org.dkpro.lab.uima.engine.simple.SimpleExecutionEngine.run(SimpleExecutionEngine.java:121)
... 8 more

alainde...@gmail.com

unread,
Oct 3, 2019, 8:37:40 PM10/3/19
to dkpro-tc-users
 

I tried modifying dkpro-tc/pom.xml to upgrade the lucene versio to 7.5.0:


    <lucene.version>7.5.0</lucene.version> 


After a number of modification, I was able to compile it and run the tests.


All tests run except one in dkpro-tc-examples (ModelProviderConversionFeatureTest.testAnnotator) which uses a Lucene index dump that is in 6.0 format (which is not supported by 7.5.0).


I would like to contribute those changes back to the project. What is the way to proceeed with that?


Thx.



Johannes Daxenberger

unread,
Oct 4, 2019, 10:11:03 AM10/4/19
to alainde...@gmail.com, dkpro-tc-users

Hi,

 

thanks for the hints. All information on contributing to DKPro can be found here: https://dkpro.github.io/contributing/

 

Cheers,

Johannes

--
You received this message because you are subscribed to the Google Groups "dkpro-tc-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dkpro-tc-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dkpro-tc-users/3c97307e-0566-4888-be83-78f94e91c156%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages