You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2006/12/08 12:39:03 UTC
DO NOT REPLY [Bug 41132] New: - Chainsaw cannot open log files if file name contains illegal URL characters like '#'
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: log4j-dev@logging.apache.org
ReportedBy: pkamalak@cordys.com
CC: pkamalak@cordys.com
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
DO NOT REPLY [Bug 41132] - Chainsaw cannot open log files if file name contains illegal URL characters like '#'
Posted by bu...@apache.org.
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
sdeboy@iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From sdeboy@iname.com 2007-08-09 22:44 -------
Implemented in revision 564471
http://svn.apache.org/viewvc?view=rev&revision=564471
Thanks
--
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
DO NOT REPLY [Bug 41132] - Chainsaw cannot open log files if file name contains illegal URL characters like '#'
Posted by bu...@apache.org.
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
------- Additional Comments From pkamalak@cordys.com 2006-12-08 03:44 -------
Created an attachment (id=19231)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=19231&action=view)
Proposed fix, replaces all File.toURL() to File.toURI().toURL()
Attached patch contains changes to below sources
***
1. FileLoadAction.java: url = selectedFile.toURL();
2. help/HelpManager.java: helpLocator.installLocator(dir.toURL());
3. LogUI.java: .getName(), file.toURL());
4. NoReceiversWarningPanel.java: return
chooser.getSelectedFile().toURL();
5. plugins/PluginClassLoaderFactory.java:
list.add(pluginDirectory.toURL());
plugins/PluginClassLoaderFactory.java: list.add(file.toURL());
--
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org