Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.1.2rc3
-
Fix Version/s: 6.1.2
-
Component/s: None
-
Labels:None
-
Environment:Windows
-
Number of attachments :
Description
The new code in MBeanContainer to show the context display names (or the last component of the location path) and servlet/filter names only looks for '/' in the object name basis string to determine the last component of the path. However, under Windows the location contains back-slashes (). Because the full path is then passed to ObjectName.getInstance(), the colon in the path causes a MalformedObjectNameException.
Suggested fix:
Rather than specifying /, the file.separator System property could be used.
Alternatively, at line 223 in /modules/management/src/main/java/org/mortbay/management/MBeanContainer.java add:
name=name.replace('
','/');
Also, begining at line 233, there are a series of replaces to remove equals, commas and spaces. Looking at the javadoc for ObjectName, a space does not appear to be illegal, but colons, asterisks, and question marks should also be replaced. Maybe double quotes should be replaced as well (so that it does not get interpreted as a quoted value when obtaining the ObjectName instance)?
DOH!
Can you test this again from SVN head
thanks