Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-1386

Problem using a newer version of log4j-core

    Details

    • Type: Question
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 2.0.0, 1.1.0, 1.0.4
    • Component/s: storm-core
    • Labels:
      None
    • Environment:
      Ubuntu 14.04, Ambari 2.1.2 with HDP-2.3.2.0-2950

      Description

      Storm 0.10.0 comes with log4j-core 2.1 and I can't find any way to override it in my app. I need 2.4.x+ in order to use the kafka appender. I have even tried to relocate the org.apache.logging.log4j in my shade configuration but even then I'm getting errors like this :

      ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...

      Thanks in advance.

        Issue Links

          Activity

          Hide
          svolle Sébastien Volle added a comment - - edited

          I have a similar problem. I'm stuck with log4j-core 2.4 in my application and I get illegal access errors due to API changes between 2.1 and 2.4

          Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.apache.logging.log4j.core.lookup.MapLookup.newMap(I)Ljava/util/HashMap; from class org.apache.logging.log4j.core.lookup.MainMapLookup
          

          Would it be possible to shade logging dependencies and allow users to use whatever version of log4j they see fit, or does shading logging pose a particular problem?

          Thanks.

          Show
          svolle Sébastien Volle added a comment - - edited I have a similar problem. I'm stuck with log4j-core 2.4 in my application and I get illegal access errors due to API changes between 2.1 and 2.4 Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.apache.logging.log4j.core.lookup.MapLookup.newMap(I)Ljava/util/HashMap; from class org.apache.logging.log4j.core.lookup.MainMapLookup Would it be possible to shade logging dependencies and allow users to use whatever version of log4j they see fit, or does shading logging pose a particular problem? Thanks.
          Hide
          jnioche Julien Nioche added a comment -

          Fixed with STORM-2326

          Show
          jnioche Julien Nioche added a comment - Fixed with STORM-2326

            People

            • Assignee:
              Unassigned
              Reporter:
              diadistis Vassilis Sotiridis
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development