bugzilla | 2 Nov 21:20 2007
Picon

DO NOT REPLY [Bug 40212] - NullPointerException in getLogger when called from ShutdownHook

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40212>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40212

------- Additional Comments From digulla <at> hepe.com  2007-11-02 13:20 -------
I've followed the bugs mentioned there and I concur: log4j is probably being
confused by the Tomcat classloader clearing all static fields on unload.

This also means that the usual setup (one log4j/commons-logging per tomcat and
per webapp) to get logging per webapp is not safe; if we get NPEs after reload,
this means that tomcat somehow mixes different instances of log4j (because after
reload, there shouldn't be *anything* reachable from the last run even if the GC
couldn't throw the classes out, yet).

--

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
psmith | 3 Nov 06:16 2007
Picon

svn commit: r591552 - /logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java

Author: psmith
Date: Fri Nov  2 22:16:19 2007
New Revision: 591552

URL: http://svn.apache.org/viewvc?rev=591552&view=rev
Log:
Bug 43736 applied patch provided by Curt with extraction to a constant to indicate that
XMLDecoder only deals with UTF-8 encoded log files.

Previously the system default encoding was being used to read in the XML file, even though
a header DOCTYPE pre-amble was added indicating the file was in UTF-8 encoding.

This is pretty much a stop gap fix for the time being.  At the moment there is no way in
Chainsaw to specify the encoding of the file about to be opened.

Modified:
    logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java

Modified: logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java
URL: http://svn.apache.org/viewvc/logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java?rev=591552&r1=591551&r2=591552&view=diff
==============================================================================
---
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java (original)
+++
logging/log4j/companions/receivers/trunk/src/main/java/org/apache/log4j/xml/XMLDecoder.java
Fri Nov  2 22:16:19 2007
 <at>  <at>  -37,9 +37,9  <at>  <at> 
 import org.apache.log4j.Level;
 import org.apache.log4j.Logger;
 import org.apache.log4j.spi.Decoder;
(Continue reading)

bugzilla | 3 Nov 06:19 2007
Picon

DO NOT REPLY [Bug 43736] - Chainsaw does not honor encoding when loading XML files

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43736>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43736

------- Additional Comments From psmith <at> apache.org  2007-11-02 22:19 -------
I have applied Curt's patch to XMLDecoder with a very minor tweak.  The DOCTYPE
pre-amble was always assuming that the file was UTF-8 anyway, so it seems safe
to do this, but any arbitrary  encoding can not be used without quite a bit of
fiddly UI work at this stage.

I have elected not to modify the UtilLoggingXMLDecoder at this point as it does
not use a pre-amble and is therefore assuming that the file is in whatever the
default platform encoding is anyway.  

--

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
carnold | 3 Nov 09:35 2007
Picon

[GUMP <at> vmgump]: Project logging-log4j-12-tests (in module logging-log4j-12) failed

To whom it may engage...

This is an automated request, but not an unsolicited one. For 
more information please visit http://gump.apache.org/nagged.html, 
and/or contact the folk at general <at> gump.apache.org.

Project logging-log4j-12-tests has an issue affecting its community integration.
This issue affects 1 projects,
 and has been outstanding for 22 runs.
The current state of this project is 'Failed', with reason 'Build Failed'.
For reference only, the following projects are affected by this:
    - logging-log4j-12-tests :  Fast and flexible logging package for Java

Full details are available at:
    http://vmgump.apache.org/gump/public/logging-log4j-12/logging-log4j-12-tests/index.html

That said, some information snippets are provided here.

The following annotations (debug/informational/warning/error messages) were provided:
 -INFO- Made directory [/srv/gump/public/workspace/logging-log4j-12/tests/classes]
 -INFO- Failed with reason build failed

The following work was performed:
http://vmgump.apache.org/gump/public/logging-log4j-12/logging-log4j-12-tests/gump_work/build_logging-log4j-12_logging-log4j-12-tests.html
Work Name: build_logging-log4j-12_logging-log4j-12-tests (Type: Build)
Work ended in a state of : Failed
Elapsed: 47 secs
Command Line: /usr/lib/jvm/java-1.5.0-sun/bin/java -Djava.awt.headless=true
-Xbootclasspath/p:/srv/gump/public/workspace/xml-xerces2/build/xercesImpl.jar
org.apache.tools.ant.Main -Dgump.merge=/srv/gump/public/gump/work/merge.xml
(Continue reading)

bugzilla | 3 Nov 18:44 2007
Picon

DO NOT REPLY [Bug 43736] - Chainsaw does not honor encoding when loading XML files

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43736>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43736

carnold <at> apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

------- Additional Comments From carnold <at> apache.org  2007-11-03 10:44 -------
The presense of an encoding in the document type declaration in the string representation of the 
document is ignored by the parser.  It is a relic of the document once being encoded in as a byte 
stream, by the time that the parser is seeing it the byte stream has been decoded as a string by the 
InputStreamReader which is oblivious to any encoding declaration in the byte stream.

An external parsed entity (such as our and JUL's XML log files) that is not in UTF-8 or UTF-16 requires 
an explicit text declaration (http://www.w3.org/TR/2006/REC-xml-20060816/#charencoding).  
Without a text declaration, a parser will snif the file and determine if it is UTF-16BE or UTF-16LE by the 
presense of alternative 0 bytes and if not will assume that is it is UTF-8.  More detail at http://
www.w3.org/TR/2006/REC-xml-20060816/#sec-guessing.  It will never consult the platform default 
encoding.

However, if it were written in the platform encoding with the proper text declaration, like:

<?xml encoding="ISO-8859-1"?>
(Continue reading)

bugzilla | 3 Nov 18:54 2007
Picon

DO NOT REPLY [Bug 43736] - Chainsaw does not honor encoding when loading XML files

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43736>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43736

------- Additional Comments From carnold <at> apache.org  2007-11-03 10:54 -------
On fiddly UI changes.  There should be no changes to the user-interface necessary since the UI appears to 
be about to display the right characters if the log file is parsed correctly and all the information to parse 
the file correctly is in the document itself.

--

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
bugzilla | 3 Nov 21:37 2007
Picon

DO NOT REPLY [Bug 43736] - Chainsaw does not honor encoding when loading XML files

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43736>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43736

------- Additional Comments From hoju <at> visi.com  2007-11-03 13:37 -------
I suggest looking at what the Rome developers have done with their XMLReader class [1].  It goes through an
elaborate process to figure out the proper charset for the document.  It's explained here [2] and here [3]. 
It's copyrighted by Sun Microsystems, but it's under an Apache license.  I adapted it for the XMLC project
[4] and modified it to use gnu-regexp instead of JDK1.4 regexp, since my project depends on JDK1.3, not
1.4.  I also slightly modified a couple constructors to make it easier to provide a per/instance
defaultEncoding if, for some reason, none can be detected.  I use it like this....

try {
    InputSource inputSource = new ClosingInputSource(url);
    try {
        XmlReader reader = new XmlReader(InputSourceOps.openSystemId(url), false, defaultEncoding);
        inputSource.setCharacterStream(reader);
        inputSource.setEncoding(reader.getEncoding());
    } catch (XmlReaderException xre) {
        //This is somewhat unlikely to happen, but doesn't hurt to have
        //extra fallback, which XmlReader conveniently allows for by
        //providing access to the original unconsumed inputstream via
        //the XmlReaderException
        inputSource.setByteStream(xre.getInputStream());
        inputSource.setEncoding(defaultEncoding);
    }
(Continue reading)

bugzilla | 4 Nov 06:41 2007
Picon

DO NOT REPLY [Bug 43736] - Chainsaw does not honor encoding when loading XML files

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43736>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43736

------- Additional Comments From carnold <at> apache.org  2007-11-03 22:41 -------
Any XML parser will have the proper handling for encodings, you just need to allow it to work with the 
byte streams instead of trying to help it by passing it character strings which will have already made 
assumptions about encoding that can't be undone.  I'm not familiar with Rome, but it seems like 
everything is well within the capabilities of JAXP if called properly and there should be no need to add 
another dependency.  

The current approach is also wasteful since it first populates a DOM document and then extracts the 
info into an event stream when using an event based parser could eliminate the intermediate DOM 
document and the associated memory use.  I could see that being a pretty substantial performance 
issue with large log files.

I've got a lot of experience in this area and it would not take much time for me to rewrite the code and 
will try to get to it quickly.

--

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
bugzilla | 5 Nov 08:08 2007
Picon

Bug report for Log4j [2007/11/04]

+---------------------------------------------------------------------------+
| Bugzilla Bug ID                                                           |
|     +---------------------------------------------------------------------+
|     | Status: UNC=Unconfirmed NEW=New         ASS=Assigned                |
|     |         OPN=Reopened    VER=Verified    (Skipped Closed/Resolved)   |
|     |   +-----------------------------------------------------------------+
|     |   | Severity: BLK=Blocker     CRI=Critical    MAJ=Major             |
|     |   |           MIN=Minor       NOR=Normal      ENH=Enhancement       |
|     |   |   +-------------------------------------------------------------+
|     |   |   | Date Posted                                                 |
|     |   |   |          +--------------------------------------------------+
|     |   |   |          | Description                                      |
|     |   |   |          |                                                  |
|13099|Opn|Nor|2002-09-27|DOMConfigurator ignores category factory setting  |
|17887|Opn|Maj|2003-03-11|RollingFileAppender does not work for 10 threads  |
|20395|New|Enh|2003-06-01|PreparedStatementAppender Enhancement             |
|22894|Opn|Nor|2003-09-02|Single backslash not accepted in File param value |
|22934|Opn|Nor|2003-09-04|org.apache.log4j.jmx is not compatible with JMX 1.|
|23329|Ass|Maj|2003-09-22|<logger> element in XML config should support reso|
|25355|New|Enh|2003-12-09|allow to require "TLS/SSL only" for outgoing mails|
|25747|New|Enh|2003-12-24|more explanations when hitting "WARN No appenders |
|26084|New|Nor|2004-01-13|Log Event detail panel does not show special chara|
|27363|New|Enh|2004-03-02|JNI based SyslogAppender                          |
|27367|New|Enh|2004-03-02|NetSendAppender                                   |
|28647|Ass|Enh|2004-04-28|Add "Flush on Level" capability to FileAppender   |
|29244|Inf|Nor|2004-05-27|Preserve XML content in log messages when using XM|
|29304|New|Nor|2004-05-30|Starting XMLSocketAppender from config file       |
|29305|New|Nor|2004-05-30|Chainsaw doesn't see locationinfo from XMLSocketRe|
|29735|New|Nor|2004-06-22|Receiver list display error  when receiver has no |
|30055|New|Nor|2004-07-12|Problem with registering Appenders with the same n|
(Continue reading)

bugzilla | 5 Nov 08:15 2007
Picon

DO NOT REPLY [Bug 43567] - julbridge is incompatible with log4j-1.2.15

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=43567>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=43567

psmith <at> apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

------- Additional Comments From psmith <at> apache.org  2007-11-04 23:15 -------
Fixed as of latest snapshot.

--

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

Gmane