You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Steve Lawrence (Jira)" <ji...@apache.org> on 2023/02/08 15:28:00 UTC

[jira] [Assigned] (DAFFODIL-2787) log4j-core and log4j-api version mismatch can lead to very confusing errors

     [ https://issues.apache.org/jira/browse/DAFFODIL-2787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steve Lawrence reassigned DAFFODIL-2787:
----------------------------------------

    Assignee: Steve Lawrence

> log4j-core and log4j-api version mismatch can lead to very confusing errors
> ---------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2787
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2787
>             Project: Daffodil
>          Issue Type: Bug
>          Components: Infrastructure
>    Affects Versions: 3.4.0
>            Reporter: Steve Lawrence
>            Assignee: Steve Lawrence
>            Priority: Major
>             Fix For: 3.5.0
>
>
> Daffodil libs do not explicitly depend on log4j-core, with the reason being that users can provide whatever log4j implementation that they want (maybe there's something else aside from log4j-core?)
> The problem with this is that if projects that depend on daffodil do not also depend on a log4j implementation then they get a warning like this:
> {quote}ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
> {quote}
> For this reason, many schema projects add an explicit log4j-core dependency to suppress this warning. However, if the version of log4j-core they depend on does not match the version of log4j-api that Daffodil uses then you get a really verbose, unhelpful, and probably wrong, error message about classLoaderLayeringStrategy. And this is fairly common since we frequently update our dependencies but schema projects tend to lag behind.
> We need to either have a dependency on log4j-core so schema projects don't need to worry about adding this depend and matching versions, or use some other dependency mechanism to ensure whatever log4j implementation is used matches our log4j-api version.



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