[MAGNOLIA-3146] Update to log4j 1.2.16 asap Created: 18/Mar/10  Updated: 09/Oct/12  Resolved: 11/Nov/10

Status: Closed
Project: Magnolia
Component/s: build, core
Affects Version/s: None
Fix Version/s: 4.3.9, 4.4

Type: Task Priority: Major
Reporter: Magnolia International Assignee: Ondrej Chytil
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by MAGNOLIA-3358 Occasional failure to startup instanc... Closed
duplicate
is duplicated by MGNLDATA-109 NullpointerException during renaming ... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty

 Description   

Everynow and then, we get these in logs:

java.lang.NullPointerException
        at java.io.Writer.write(Writer.java:126)
        at org.apache.log4j.helpers.QuietWriter.write(QuietWriter.java:48)
        at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:309)
        at org.apache.log4j.WriterAppender.append(WriterAppender.java:160)
        at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
        at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
        at org.apache.log4j.Category.callAppenders(Category.java:206)
        at org.apache.log4j.Category.forcedLog(Category.java:391)
        at org.apache.log4j.Category.log(Category.java:856)
        at org.slf4j.impl.Log4jLoggerAdapter.error(Log4jLoggerAdapter.java:571)

This is this issue: https://issues.apache.org/bugzilla/show_bug.cgi?id=44032
It's apparently been fixed for a while, but 1.2.16 was never released; however, there seems to be a fairly recent (1 month old) RC1 tag so all hope is not lost !

Another, slightly longer-term, option would be to switch to logback.



 Comments   
Comment by Magnolia International [ 08/Nov/10 ]

The bundles currently still ship with log4j 1.2.15.

log4j dep somehow comes from openutils - m-core has no direct dep on log4j

log4j: 2 non-mututually exclusive options: 1) add a "direct" dependency to log4j in m-core. this is correct, since the core code does use log4j directly.
2) exclude log4j from the openutils dep. should not be necessary - the core dep will always be closer and stronger
since we had no "direct" dep, openutil's dep was "stronger".

and the depMgt from m-project are not taken into when resolving deps of the bundles.

Generated at Mon Feb 12 03:43:38 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.