You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Kristian Koehler (JIRA)" <ji...@apache.org> on 2009/04/02 13:26:12 UTC

[jira] Created: (FELIX-1022) Classloader Exceptions should be more informative

Classloader Exceptions should be more informative
-------------------------------------------------

                 Key: FELIX-1022
                 URL: https://issues.apache.org/jira/browse/FELIX-1022
             Project: Felix
          Issue Type: Improvement
          Components: Framework
            Reporter: Kristian Koehler
         Attachments: 2009_04_02_framework-exception-patch.txt

Hi

if you run a application within felix sometimes it is hard to find the bundle which could not load a specific class or resource. A general ClassNotFound exception is thrown. 

The message should be more "meaningful".

Kristian

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


[jira] Commented: (FELIX-1022) Classloader Exceptions should be more informative

Posted by "Kristian Koehler (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695244#action_12695244 ] 

Kristian Koehler commented on FELIX-1022:
-----------------------------------------

I think performance is less important in that case of a failure. This should only happen during development.

Do you mean setting 'felix.log.level' for Felix log level? This prints too much IMO to quickly find the problem.

just my two cent

Kristian

> Classloader Exceptions should be more informative
> -------------------------------------------------
>
>                 Key: FELIX-1022
>                 URL: https://issues.apache.org/jira/browse/FELIX-1022
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Kristian Koehler
>         Attachments: 2009_04_02_framework-exception-patch.txt
>
>
> Hi
> if you run a application within felix sometimes it is hard to find the bundle which could not load a specific class or resource. A general ClassNotFound exception is thrown. 
> The message should be more "meaningful".
> Kristian

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


[jira] Commented: (FELIX-1022) Classloader Exceptions should be more informative

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695226#action_12695226 ] 

Richard S. Hall commented on FELIX-1022:
----------------------------------------

With log level DEBUG, Felix outputs more detailed information. We try to avoid doing much in case of errors with other log levels because there tends to be a ton of resource probing going on in most applications, so the quicker it is to fail the better.

> Classloader Exceptions should be more informative
> -------------------------------------------------
>
>                 Key: FELIX-1022
>                 URL: https://issues.apache.org/jira/browse/FELIX-1022
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Kristian Koehler
>         Attachments: 2009_04_02_framework-exception-patch.txt
>
>
> Hi
> if you run a application within felix sometimes it is hard to find the bundle which could not load a specific class or resource. A general ClassNotFound exception is thrown. 
> The message should be more "meaningful".
> Kristian

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


[jira] Updated: (FELIX-1022) Classloader Exceptions should be more informative

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-1022:
-----------------------------------

             Assignee: Richard S. Hall
        Fix Version/s: framework-3.2.0
    Affects Version/s: framework-3.0.2

> Classloader Exceptions should be more informative
> -------------------------------------------------
>
>                 Key: FELIX-1022
>                 URL: https://issues.apache.org/jira/browse/FELIX-1022
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.2
>            Reporter: Kristian Koehler
>            Assignee: Richard S. Hall
>             Fix For: framework-3.2.0
>
>         Attachments: 2009_04_02_framework-exception-patch.txt, 2009_04_03_framework-exception-patch.txt
>
>
> Hi
> if you run a application within felix sometimes it is hard to find the bundle which could not load a specific class or resource. A general ClassNotFound exception is thrown. 
> The message should be more "meaningful".
> Kristian

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


[jira] Issue Comment Edited: (FELIX-1022) Classloader Exceptions should be more informative

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904750#action_12904750 ] 

Richard S. Hall edited comment on FELIX-1022 at 8/31/10 4:02 PM:
-----------------------------------------------------------------

I added bundle info to the exception messages in trunk.

      was (Author: rickhall):
    I added bundle info to the exceptions in trunk.
  
> Classloader Exceptions should be more informative
> -------------------------------------------------
>
>                 Key: FELIX-1022
>                 URL: https://issues.apache.org/jira/browse/FELIX-1022
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.2
>            Reporter: Kristian Koehler
>            Assignee: Richard S. Hall
>             Fix For: framework-3.2.0
>
>         Attachments: 2009_04_02_framework-exception-patch.txt, 2009_04_03_framework-exception-patch.txt
>
>
> Hi
> if you run a application within felix sometimes it is hard to find the bundle which could not load a specific class or resource. A general ClassNotFound exception is thrown. 
> The message should be more "meaningful".
> Kristian

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


[jira] Updated: (FELIX-1022) Classloader Exceptions should be more informative

Posted by "Kristian Koehler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Koehler updated FELIX-1022:
------------------------------------

    Attachment: 2009_04_02_framework-exception-patch.txt

This is a simple patch which generates messages like:

--- 8< ---
Caused by: java.lang.ClassNotFoundException: could not find 'javax.transaction.SystemException' for bundle 'xxx' with id [8]
	at org.apache.felix.framework.searchpolicy.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:574)
	at org.apache.felix.framework.searchpolicy.ModuleImpl.access$100(ModuleImpl.java:59)
	at org.apache.felix.framework.searchpolicy.ModuleImpl$ModuleClassLoader.loadClass(ModuleImpl.java:1443)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
	... 91 more
--- 8< ---

Kristian


> Classloader Exceptions should be more informative
> -------------------------------------------------
>
>                 Key: FELIX-1022
>                 URL: https://issues.apache.org/jira/browse/FELIX-1022
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Kristian Koehler
>         Attachments: 2009_04_02_framework-exception-patch.txt
>
>
> Hi
> if you run a application within felix sometimes it is hard to find the bundle which could not load a specific class or resource. A general ClassNotFound exception is thrown. 
> The message should be more "meaningful".
> Kristian

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


[jira] Resolved: (FELIX-1022) Classloader Exceptions should be more informative

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall resolved FELIX-1022.
------------------------------------

    Resolution: Fixed

I added bundle info to the exceptions in trunk.

> Classloader Exceptions should be more informative
> -------------------------------------------------
>
>                 Key: FELIX-1022
>                 URL: https://issues.apache.org/jira/browse/FELIX-1022
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.2
>            Reporter: Kristian Koehler
>            Assignee: Richard S. Hall
>             Fix For: framework-3.2.0
>
>         Attachments: 2009_04_02_framework-exception-patch.txt, 2009_04_03_framework-exception-patch.txt
>
>
> Hi
> if you run a application within felix sometimes it is hard to find the bundle which could not load a specific class or resource. A general ClassNotFound exception is thrown. 
> The message should be more "meaningful".
> Kristian

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


[jira] Commented: (FELIX-1022) Classloader Exceptions should be more informative

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12902445#action_12902445 ] 

Don Brown commented on FELIX-1022:
----------------------------------

Is there an additional cost to adding the bundle id to CNFE?  It would save heaps of debugging time, where the usual practice is to run the app in debug mode, then put a break point in Felix to examine who is throwing what.

> Classloader Exceptions should be more informative
> -------------------------------------------------
>
>                 Key: FELIX-1022
>                 URL: https://issues.apache.org/jira/browse/FELIX-1022
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Kristian Koehler
>         Attachments: 2009_04_02_framework-exception-patch.txt, 2009_04_03_framework-exception-patch.txt
>
>
> Hi
> if you run a application within felix sometimes it is hard to find the bundle which could not load a specific class or resource. A general ClassNotFound exception is thrown. 
> The message should be more "meaningful".
> Kristian

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


[jira] Commented: (FELIX-1022) Classloader Exceptions should be more informative

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695246#action_12695246 ] 

Richard S. Hall commented on FELIX-1022:
----------------------------------------

The issue is that failures are expected in resource probing (e.g., for localization) so diagnosis is not needed. We originally had our diagnosis messages printing in non-DEBUG level and had to switch them off due to cost...of course, the diagnosis messages try to be much more detailed than your proposed messages and thus much more costly.

> Classloader Exceptions should be more informative
> -------------------------------------------------
>
>                 Key: FELIX-1022
>                 URL: https://issues.apache.org/jira/browse/FELIX-1022
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Kristian Koehler
>         Attachments: 2009_04_02_framework-exception-patch.txt
>
>
> Hi
> if you run a application within felix sometimes it is hard to find the bundle which could not load a specific class or resource. A general ClassNotFound exception is thrown. 
> The message should be more "meaningful".
> Kristian

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


[jira] Commented: (FELIX-1022) Classloader Exceptions should be more informative

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12695266#action_12695266 ] 

Richard S. Hall commented on FELIX-1022:
----------------------------------------

Well, I am not necessarily against your first patch, just pointing out the issues.

> Classloader Exceptions should be more informative
> -------------------------------------------------
>
>                 Key: FELIX-1022
>                 URL: https://issues.apache.org/jira/browse/FELIX-1022
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Kristian Koehler
>         Attachments: 2009_04_02_framework-exception-patch.txt, 2009_04_03_framework-exception-patch.txt
>
>
> Hi
> if you run a application within felix sometimes it is hard to find the bundle which could not load a specific class or resource. A general ClassNotFound exception is thrown. 
> The message should be more "meaningful".
> Kristian

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


[jira] Updated: (FELIX-1022) Classloader Exceptions should be more informative

Posted by "Richard S. Hall (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard S. Hall updated FELIX-1022:
-----------------------------------

    Fix Version/s: framework-3.0.3
                       (was: framework-3.2.0)

> Classloader Exceptions should be more informative
> -------------------------------------------------
>
>                 Key: FELIX-1022
>                 URL: https://issues.apache.org/jira/browse/FELIX-1022
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>    Affects Versions: framework-3.0.2
>            Reporter: Kristian Koehler
>            Assignee: Richard S. Hall
>             Fix For: framework-3.0.3
>
>         Attachments: 2009_04_02_framework-exception-patch.txt, 2009_04_03_framework-exception-patch.txt
>
>
> Hi
> if you run a application within felix sometimes it is hard to find the bundle which could not load a specific class or resource. A general ClassNotFound exception is thrown. 
> The message should be more "meaningful".
> Kristian

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


[jira] Updated: (FELIX-1022) Classloader Exceptions should be more informative

Posted by "Kristian Koehler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1022?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Koehler updated FELIX-1022:
------------------------------------

    Attachment: 2009_04_03_framework-exception-patch.txt

Another try ;-)

I think from the users point of view 'better' information without turning DEBUG level on would be great. But I also see your point with resource probing...

What about a 'cache' for some values? (see patch) Something like that??

I don't want to pollute the class with additional attributes but I also want to see the information... ;-)

OK. Now I'm quiet ;-)
Perhaps there are other thought on this?

Thanks

Kristian



> Classloader Exceptions should be more informative
> -------------------------------------------------
>
>                 Key: FELIX-1022
>                 URL: https://issues.apache.org/jira/browse/FELIX-1022
>             Project: Felix
>          Issue Type: Improvement
>          Components: Framework
>            Reporter: Kristian Koehler
>         Attachments: 2009_04_02_framework-exception-patch.txt, 2009_04_03_framework-exception-patch.txt
>
>
> Hi
> if you run a application within felix sometimes it is hard to find the bundle which could not load a specific class or resource. A general ClassNotFound exception is thrown. 
> The message should be more "meaningful".
> Kristian

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