Giter VIP home page Giter VIP logo

Comments (11)

jlfeld1 avatar jlfeld1 commented on June 26, 2024 2

We shouldn't have to change our applications logging implementation in order to use this library.

from elasticsearch-cluster-runner.

ganil89 avatar ganil89 commented on June 26, 2024 1

Thank you,

I have an other issue with this

2019-01-17 11:39:14,059 main ERROR LogManager returned an instance of org.apache.logging.slf4j.SLF4JLoggerContextFactory which does not implement org.apache.logging.log4j.core.impl.Log4jContextFactory. Unable to initialize Log4j.

Caused by: java.lang.ClassCastException: org.apache.logging.slf4j.SLF4JLoggerContext cannot be cast to org.apache.logging.log4j.core.LoggerContext
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:142)
at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:119)
at org.codelibs.elasticsearch.runner.ElasticsearchClusterRunner.buildNodeSettings(ElasticsearchClusterRunner.java:496)
at org.codelibs.elasticsearch.runner.ElasticsearchClusterRunner.build(ElasticsearchClusterRunner.java:384)
... 15 more

Is there any work around for this issue, please let me know

from elasticsearch-cluster-runner.

marevol avatar marevol commented on June 26, 2024

Try version 6.5.4.0.

from elasticsearch-cluster-runner.

ganil89 avatar ganil89 commented on June 26, 2024

you mean elastic search or codelibs version

from elasticsearch-cluster-runner.

marevol avatar marevol commented on June 26, 2024

elasticsearch-cluster-runner 6.5.4.0 is for elasticsearch 6.5.4.

from elasticsearch-cluster-runner.

marevol avatar marevol commented on June 26, 2024

You can check dependencies for this project in pom.xml.
It's better to check your dependencies in your project.

from elasticsearch-cluster-runner.

ganil89 avatar ganil89 commented on June 26, 2024

I have taken all the dependencies from this project pom.xml, but still I am getting this error

from elasticsearch-cluster-runner.

marevol avatar marevol commented on June 26, 2024

I could not reproduce it. Could you provide steps or all code to reproduce it.

from elasticsearch-cluster-runner.

wallner avatar wallner commented on June 26, 2024

I had the same problem too. I am using Spring Data Elasticsearch. In a Spring Boot project. The problem is that spring-boot-starter pulls in spring-boot-starter-logging. If you exclude it, it works. This is the relevant part of my pom.xml:

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-test</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.junit.vintage</groupId>
          <artifactId>junit-vintage-engine</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
      <scope>test</scope>
      <exclusions>
        <exclusion>
          <groupId>org.springframework.boot</groupId>
          <artifactId>spring-boot-starter-logging</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.codelibs</groupId>
      <artifactId>elasticsearch-cluster-runner</artifactId>
      <version>6.8.4.0</version>
      <scope>test</scope>
    </dependency>

An interesting observation: The spring-data-elasticsearch release train working with the current spring boot version (2.2) pulls in Elasticsearch 6.8.5 but there is no corresponding elasticsearch-cluster-runner version.

Thank You for your Work!

from elasticsearch-cluster-runner.

foal avatar foal commented on June 26, 2024

@wallner - it is easy. Elasticsearch-cluster-runner works only with log4j. It depends on log4j-core and uses the log4j core classes in runtime. Spring boot starter logger add to the classpath SLF4j bridge that causes exception above

from elasticsearch-cluster-runner.

foal avatar foal commented on June 26, 2024

It will be great if Elasticsearch-cluster-runner will not depend on log4j implementation. Only on log4j interfaces. It will allow to use it without patching sources each time than I need to run integration tests in spring boot application.

See https://stackoverflow.com/questions/54036773/unable-to-initialize-log4j-slf4jloggercontextfactory for example

from elasticsearch-cluster-runner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.