You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-dev@portals.apache.org by "Elliot Metsger (JIRA)" <ji...@apache.org> on 2006/09/25 23:46:51 UTC

[jira] Resolved: (PLUTO-239) Missing error message key in properties file results in an ambiquous log entry

     [ http://issues.apache.org/jira/browse/PLUTO-239?page=all ]

Elliot Metsger resolved PLUTO-239.
----------------------------------

    Resolution: Fixed

I modified the log message to include the package name that the key was from.  I also logged the message at the WARN level.

The message looks like this now:
Cannot find message in the ResourceBundle associated with key error.portlet.invoker.dispatcher (package org.apache.pluto.core)

Committed r449829.

> Missing error message key in properties file results in an ambiquous log entry
> ------------------------------------------------------------------------------
>
>                 Key: PLUTO-239
>                 URL: http://issues.apache.org/jira/browse/PLUTO-239
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: Current CVS
>            Reporter: Tuomas Kiviaho
>            Priority: Trivial
>             Fix For: 1.1.0
>
>
> Apache Tomcat produced a following line when request dispacher couldn't be created. 
> ERROR org.apache.pluto.core.PortletInvoker - Cannot find message associated with key error.portlet.invoker.dispatcher
> The given message key (here "error.portlet.invoker.dispatcher", but there are more in the same file) doesn't have a value in LocalString.properties or at least one of them is misspelled.
> The causal issue is the handling of the missing key, which throws a MissingResourceException. Here is the pertinent code in StringManager.getStringInternal():
>   try {
>             str = bundle.getString(key);
>   } catch (MissingResourceException mre) {
>             str = "Cannot find message associated with key '" + key + "'";
>   }
> If key is missing there should be a fallback of displaying the key followed by all of the arguments sent in as parameters in the call to StringManager.getString(). Also, if the key is missing there should, in my opinion, be a separate log entry for that fact, preferrably just as warning.
>  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira