3

I am trying to index files on S3 with Lucene and. I found this question Integrating Lucene Index and Amazon AWS, with some code, where one can replace the FSDirectory call with

S3Directory dir = new S3Directory("my-lucene-index");
dir.create();
// use it in your code in place of FSDirectory, for example
dir.close();
dir.delete();

. In order for this to work, I needed to download some dependencies from aws, namely the following:

  • aws-core-2.13.54
  • utils-2.13.54
  • auth-2.13.54
  • http-client-spi-2.13.54
  • aws-xml-protocol-2.13.54

From Lucene I have following dependencies:

  • lucene-core-7.5.0
  • lucene-suggest-6.4.0

For logging I have following dependencies:

  • log4j-slf4j-impl-2.13.3
  • log4j-to-slf4j-2.13.3
  • log4j-core-2.13.3
  • log4j-api-2.13.3

Additionally I have following AWS SDK dependencies:

  • aws-java-sdk-core-1.11.820

That additional AWS SDK Dependency I need for some other part of the code, however I checked by removing if that would have an influence, and it does not have an influence.

I have been checking the dependencies for several hours now, and from my understanding there should be no conflicting dependencies left in the classpath, but whenever I try to run the programm I get the error:

java.lang.NoSuchMethodError: software.amazon.awssdk.utils.IoUtils.closeQuietly(Ljava/lang/AutoCloseable;Lsoftware/amazon/awssdk/thirdparty/org/slf4j/Logger;)

which apparently indicates some conflicting dependencies. But I don't see, which dependencies are conflicting. Has anyone encountered that problem? Or is there now a better approach to index data on AWS S3 with Lucene?

cryptedp
  • 53
  • 1
  • 6

0 Answers0