Code Monkey home page Code Monkey logo

Comments (6)

rfoltyns avatar rfoltyns commented on June 19, 2024

@troyhofeling I haven't seen this one before. Looks like a classloader issue.
Could you give me more context, please? Or ideally, an example project that reproduces it?

from log4j2-elasticsearch.

troyhofeling avatar troyhofeling commented on June 19, 2024

In our use case we run multiple Java applications in a single JVM. Each application has its own Log4J2 instance. The orchestration of applications in managed by a Mulesoft Runtime so I don't think I can provide a sample that would be useful. The service loader fails in java.lang.Class isAssignableFrom method. In this scenario I believe the service is registered using a JVM classloader but the individual applications aren't loading from the same class loader. We observe that once any app registers the BatchEmitter service every new app fails to deploy (log4j2 fails to on startup).

from log4j2-elasticsearch.

troyhofeling avatar troyhofeling commented on June 19, 2024

Accidentally closed - reopening.

from log4j2-elasticsearch.

rfoltyns avatar rfoltyns commented on June 19, 2024

You may need to put both log4j2-elasticsearch-jest and log4j2-elasticsearch-core jars in common lib folder (I'm assuming that there's one) and exclude them from your apps. This will ensure that these classes will always be accessible only in your app's parent classloader.

Does it make sense?

Unfortunately, this may lead to more issues with other dependencies (Apache HC, Jackson FasterXML, Disruptor).

Can you define modules in Mulesoft? In a Wildfly-like fashion? This could help you define classloader's content more precisely.

from log4j2-elasticsearch.

rfoltyns avatar rfoltyns commented on June 19, 2024

@troyhofeling Any luck fixing your setup?

from log4j2-elasticsearch.

rfoltyns avatar rfoltyns commented on June 19, 2024

Closing due to lack of activity.

from log4j2-elasticsearch.

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.