Bug 41752

Summary: Wrong message on exception in MemoryRealm
Product: Tomcat 5 Reporter: Ales Milan <amilan>
Component: CatalinaAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 5.5.20   
Target Milestone: ---   
Hardware: Other   
OS: other   

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.