You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Ralph Goers (Jira)" <ji...@apache.org> on 2022/08/11 15:44:00 UTC

[jira] [Commented] (LOG4J2-3570) java.lang.NoClassDefFoundError: org/apache/logging/log4j/util/ServiceLoaderUtil

    [ https://issues.apache.org/jira/browse/LOG4J2-3570?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17578540#comment-17578540 ] 

Ralph Goers commented on LOG4J2-3570:
-------------------------------------

# apache-log4j-extras was for log4j 1. It will not work with Log4j2 until you include log4j-1.2-api which you do not show.
# log4j-core requires log4j-api. You don't seem to specify a dependency on it so it seems it is not picking up 2.18.0, in which ServiceLoaderUtil was added.

> java.lang.NoClassDefFoundError: org/apache/logging/log4j/util/ServiceLoaderUtil
> -------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3570
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3570
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.18.0
>            Reporter: Vivek
>            Priority: Blocker
>             Fix For: 2.17.2
>
>
> Hello,
> Earlier I am using the below libraries in the Java Gradle project, and it works fine:
> {color:#4c9aff}implementation 'org.slf4j:slf4j-api:1.7.36'{color}
> {color:#4c9aff}implementation 'org.slf4j:slf4j-log4j12:1.7.36'{color}
> {color:#4c9aff}implementation 'org.apache.logging.log4j:log4j-core:2.17.2'{color}
> {color:#4c9aff}implementation 'log4j:apache-log4j-extras:1.3.1-mapr'{color}
> But as soon as I upgrade to{color:#4c9aff} 'org.apache.logging.log4j:log4j-core:2.18.0'{color}, I am starting to get error.
>  
> Thank you



--
This message was sent by Atlassian Jira
(v8.20.10#820010)