Ken,

Here is the output of mvn dependency:tree

[ [1;34mINFO [m] |  +-
org.apache.tika:tika-parser-webarchive-module:jar:2.4.1:compile
[ [1;34mINFO [m] |  |  +- org.netpreserve:jwarc:jar:0.18.1:compile
[ [1;34mINFO [m] |  |  \-
org.apache.commons:commons-compress:jar:1.21:compile

I have run the same code in a new small project, it does not give me any
conflict.

I do not understand this: commons-compress is the latest version, yet
somewhere invisibly, I get the old one.

Thank you,
Mark

Mark Kerzner, SHMsoft <http://shmsoft.com/>,
Book a call with me here <http://www.meetme.so/markkerzner>

Mobile: 713-724-2534
Skype: mark.kerzner1
<http://shmsoft.com/>


On Sun, Sep 4, 2022 at 9:32 PM Ken Krugler <[email protected]>
wrote:

> This type of error is often caused by having conflicting jars on the class
> path.
>
> E.g. I see that the detect() method exists in version 1.18 of
> ArchiveStreamFactory
> <https://commons.apache.org/proper/commons-compress/javadocs/api-1.18/org/apache/commons/compress/archivers/ArchiveStreamFactory.html>,
> but not version 1.9
>
> The problem might already have existed in Tika, but been hidden by the
> classloader picking up the newer version of the the jar.
>
> It looks like you’re running this from IntelliJ…do you get the same error
> using the command line?
>
> And can you check for multiple versions of Commons Compress on the
> classpath?
>
> Thanks,
>
> — Ken
>
> On Sep 4, 2022, at 7:07 PM, Mark Kerzner SHMsoft, Inc. <
> [email protected]> wrote:
>
> Hi,
>
> I get the error below, but I cannot find the cause for it. Any ideas?
>
> Thank you,
> Mark
>
> java.lang.NoSuchMethodError: 'java.lang.String
> org.apache.commons.compress.archivers.ArchiveStreamFactory.detect(java.io.InputStream)'
>
> at
> org.apache.tika.detect.zip.DefaultZipContainerDetector.detectArchiveFormat(DefaultZipContainerDetector.java:124)
> at
> org.apache.tika.detect.zip.DefaultZipContainerDetector.detect(DefaultZipContainerDetector.java:170)
> at
> org.apache.tika.detect.CompositeDetector.detect(CompositeDetector.java:85)
> at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:142)
> at
> org.freeeed.main.FileProcessorTest.doTestTikaExtractText(FileProcessorTest.java:89)
> at
> org.freeeed.main.FileProcessorTest.testTikaExtractText(FileProcessorTest.java:81)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> at junit.framework.TestCase.runTest(TestCase.java:176)
> at junit.framework.TestCase.runBare(TestCase.java:141)
> at junit.framework.TestResult$1.protect(TestResult.java:122)
> at junit.framework.TestResult.runProtected(TestResult.java:142)
> at junit.framework.TestResult.run(TestResult.java:125)
> at junit.framework.TestCase.run(TestCase.java:129)
> at junit.framework.TestSuite.runTest(TestSuite.java:252)
> at junit.framework.TestSuite.run(TestSuite.java:247)
> at
> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:86)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> at
> com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
> at
> com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
> at
> com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
> at
> com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
> at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
>
> Mark Kerzner, SHMsoft <http://shmsoft.com/>,
> Book a call with me here <http://www.meetme.so/markkerzner>
>
> Mobile: 713-724-2534
> Skype: mark.kerzner1
> <http://shmsoft.com/>
>
>
> --------------------------
> Ken Krugler
> http://www.scaleunlimited.com
> Custom big data solutions
> Flink, Pinot, Solr, Elasticsearch
>
>
>
>

Reply via email to