You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Richard S. Hall (JIRA)" <ji...@apache.org> on 2009/07/13 15:41:14 UTC

[jira] Resolved: (FELIX-1124) ResourceNotFoundException too verbose

     [ https://issues.apache.org/jira/browse/FELIX-1124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-1124.
------------------------------------

       Resolution: Fixed
    Fix Version/s: felix-2.0.0
         Assignee: Richard S. Hall

Ok, I removed the exception from the logged information.

My original confusion was that I thought you were saying that Felix was printing the information, but it doesn't since Felix' default logger doesn't print stack traces for debug logs.

I am still not convinced that this isn't a lack of configurability in the log service impl, but I removed the exception since it probably doesn't provide much value any way.

Also, make sure your logger doesn't make calls back into Felix, since we witnessed deadlocking, which is why we disabled that by default.

> ResourceNotFoundException too verbose
> -------------------------------------
>
>                 Key: FELIX-1124
>                 URL: https://issues.apache.org/jira/browse/FELIX-1124
>             Project: Felix
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: felix-1.6.1, felix-1.8.0, felix-1.8.1
>            Reporter: Thomas Diesler
>            Assignee: Richard S. Hall
>             Fix For: felix-2.0.0
>
>
> ModuleImpl logs stack traces for every resource that cannot be found. Often resources are optional or may be located at different locations. 
>     public URL getResourceByDelegation(String name)
>     {
>         try
>         {
>             return (URL) findClassOrResourceByDelegation(name, false);
>         }
>         catch (ClassNotFoundException ex)
>         {
>             // This should never be thrown because we are loading resources.
>         }
>         catch (ResourceNotFoundException ex)
>         {
>             m_logger.log(
>                 Logger.LOG_DEBUG,
>                 ex.getMessage(),
>                 ex);
>         }
>         return null;
>     }
> Please consider a log message without stack trace and leave it to the client to be more verbose when appropriate. 
> To log no message at all and simply return null would also be consistent with 
> http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.