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=41132>.
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=41132

           Summary: Chainsaw cannot open log files if file name contains
                    illegal URL characters like '#'
           Product: Log4j
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: chainsaw
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


Chainsaw v2 cannot open Log4J file, if file name contains illegal URL characters
like '#'.  
Example: File 'system#processor.xml' cannot be loaded.

Environment details:
Chainsaw version: Chainsaw v2
JRE : 1.5.0_06
Chainsaw log messages observed:
****
Level   DEBUG
Logger  org.apache.log4j.chainsaw.LogUI
Time    2006-12-08 16:39:44,953
Thread  Chainsaw-WorkerThread
Message Loading files: [D:\Logs\system#processor.xml]
NDC     null
Class   ?
Method
Line
File
Properties      {{hostname,chainsaw}{log4jid,56}{application,log}}
Throwable
****
Level   ERROR
Logger  org.apache.log4j.chainsaw.FileLoadAction
Time    2006-12-08 16:39:44,953
Thread  Chainsaw-WorkerThread
Message java.io.FileNotFoundException: D:\Logs\system (The system cannot find
the file specified)
NDC     null
Class   ?
Method
Line
File
Properties      {{hostname,chainsaw}{log4jid,57}{application,log}}
Throwable
****

Observation was Chainsaw sources use File.toURL() for converting the abstract
path to file: URL. This might has to be replaced with File.toURI().toURL().

Here is an excerpt from Java 5's java.io.File javadoc

toURL
public URL toURL()
          throws MalformedURLException
Converts this abstract pathname into a file: URL. The exact form of the URL is
system-dependent. If it can be determined that the file denoted by this abstract
pathname is a directory, then the resulting URL will end with a slash. 

Usage note: This method does not automatically escape characters that are
illegal in URLs. It is recommended that new code convert an abstract pathname
into a URL by first converting it into a URI, via the toURI method, and then
converting the URI into a URL via the URI.toURL method.

regards, Kamalakar.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to