You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Jake Dern (Jira)" <ji...@apache.org> on 2021/12/15 02:45:00 UTC

[jira] [Created] (LOG4J2-3234) NoClassDefFoundError: org/apache/logging/log4j/core/lookup/JndiLookup when upgrading to 2.16.0

Jake Dern created LOG4J2-3234:
---------------------------------

             Summary: NoClassDefFoundError: org/apache/logging/log4j/core/lookup/JndiLookup when upgrading to 2.16.0 
                 Key: LOG4J2-3234
                 URL: https://issues.apache.org/jira/browse/LOG4J2-3234
             Project: Log4j 2
          Issue Type: Bug
          Components: Configurators
    Affects Versions: 2.16.0
         Environment: OS: Ubuntu 20.04

{{Java --version:}}
{quote}{{openjdk 11.0.9.1 2020-11-04 LTS}}
{{OpenJDK Runtime Environment Zulu11.43+56-SA (build 11.0.9.1+1-LTS)}}
{{OpenJDK 64-Bit Server VM Zulu11.43+56-SA (build 11.0.9.1+1-LTS, mixed mode)}}
{quote}
{{JVM Arguments:}}
{quote}{{[-Xshare:auto, -Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.locale.providers=SPI,COMPAT, -Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -Djava.io.tmpdir=/tmp/elasticsearch-4157234198199718700, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m, -Des.cgroups.hierarchy.override=/, -Dlog4j2.formatMsgNoLookups=true, -Xms1024m, -Xmx1024m, -XX:MaxDirectMemorySize=536870912, -Des.path.home=/opt/elasticsearch, -Des.path.conf=/opt/elasticsearch/config, -Des.distribution.flavor=oss, -Des.distribution.type=tar, -Des.bundled_jdk=true]}}
{quote}
 
            Reporter: Jake Dern
         Attachments: logs.txt

After upgrading log4j2 dependencies to 2.16.0 on a from source build of ElasticSearch  7.9.1 we're running into errors like the following:

{color:#7a869a}2021-12-15 00:24:58,904 main ERROR Unable to create Lookup for ctx java.lang.NoClassDefFoundError: org/apache/logging/log4j/core/lookup/JndiLookup{color}
{quote}        at org.apache.logging.log4j.core.lookup.Interpolator.<init>(Interpolator.java:81)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:631)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:243)
        at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:289)
        at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626)
        at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:302)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:236)
        at org.elasticsearch.common.logging.LogConfigurator.configure(LogConfigurator.java:129)
        at org.elasticsearch.bootstrap.Bootstrap.init(Bootstrap.java:354)
        at org.elasticsearch.bootstrap.Elasticsearch.init(Elasticsearch.java:170)
        at org.elasticsearch.bootstrap.Elasticsearch.execute(Elasticsearch.java:161)
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:127)
        at org.elasticsearch.cli.Command.main(Command.java:90)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:126)
        at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:92)
{quote}
Full logs are attached, any advice is appreciated. We do not see these errors with log4j2 version 2.15.0. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)