Bug 41752 - Wrong message on exception in MemoryRealm
Summary: Wrong message on exception in MemoryRealm
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 5
Classification: Unclassified
Component: Catalina (show other bugs)
Version: 5.5.20
Hardware: Other other
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-02 16:28 UTC by Ales Milan
Modified: 2007-03-03 08:24 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ales Milan 2007-03-02 16:28:19 UTC
When Digester read tomcat-user.xml file and exception is throw, then is created
new LifecycleException. As first parameter of this Exception is message string.
This string is hardcoded to "memoryRealm.readXml", so I thing that log message
will be wrong too!

I think that there must be used StringManager.

actual implementation:

Digester digester = getDigester();
try {
  synchronized (digester) {
    digester.push(this);
    digester.parse(file);
  }
} 
catch (Exception e) {
  throw new LifecycleException("memoryRealm.readXml", e);
} 
finally {
  digester.reset();
}


fixed:

Digester digester = getDigester();
try {
  synchronized (digester) {
    digester.push(this);
    digester.parse(file);
  }
} 
catch (Exception e) {
  throw new LifecycleException(sm.getString("memoryRealm.readXml"), e);
} 
finally {
  digester.reset();
}
Comment 1 Mark Thomas 2007-03-03 08:24:31 UTC
This is fuxed in svn and will be included in 5.5.23 and 6.0.11 onwards.
Thanks for the patch.