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

Steve Lawrence resolved DAFFODIL-2787.
--------------------------------------
    Resolution: Fixed

Fixed in 10b74f4fc6ff5a12e2f7bd24e053631deebd714a

There is no longer a log4j dependency, so version mismatches are not a problem. 
We now use slf4j and a custom slf4j backed for tdml processors. DFDL Schema 
projects depending on log4j-core can now remove that dependency, though it 
won't hurt anything if it exists.

> 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)

Reply via email to