felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Felix Meschberger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-527) Improve Error Reporting during binding
Date Fri, 04 Apr 2008 20:49:27 GMT

    [ https://issues.apache.org/jira/browse/FELIX-527?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585757#action_12585757

Felix Meschberger commented on FELIX-527:

The problem probably is that the InvocationTargetException should be caught somewhere near
to the location where it is thrown. IIRC there are only a select number of such locations:
Calling the bind and unbind methods as well as calling the activate and deactivate methods.
And looking at the code, all 4 of these catch InvocationTargetException and unwrap the exception
to log it.

So if an InvocationTargetException reaches the ComponentActorThread.run method, I am not sure,
whether we should unpack because this method has no clue what is going on and should just
log. The LogService in turn should log the complete stack trace and be prepared to Throwable.getMessage()
returning null - for example most JVM generated NullPointerExceptions are thrown without a

> Improve Error Reporting during binding
> --------------------------------------
>                 Key: FELIX-527
>                 URL: https://issues.apache.org/jira/browse/FELIX-527
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services
>    Affects Versions: felix-1.0.0
>         Environment: org.apache.felix.scr-0.9.0-SNAPSHOT
> org.apache.felix.scr-1.0.0
> pax-logging-0.9.6
>            Reporter: Patrick Forhan
> [cross-reported to pax-logging jira as http://issues.ops4j.org/jira/browse/PAXLOGGING-25
> If a service throws an exception during binding, the following is the only stack trace
reported.  The original context is lost:
> Exception in thread "SCR Component Actor" java.lang.NullPointerException
>         at java.util.Hashtable.put(Unknown Source)
>         at org.ops4j.pax.logging.internal.PaxLoggingServiceImpl.createEvent(PaxLoggingServiceImpl.java:175)
>         at org.ops4j.pax.logging.internal.PaxLoggingServiceImpl.log(PaxLoggingServiceImpl.java:140)
>         at org.ops4j.pax.logging.internal.PaxLoggingServiceImpl.log(PaxLoggingServiceImpl.java:76)
>         at org.ops4j.pax.logging.internal.PaxLoggingServiceImpl.log(PaxLoggingServiceImpl.java:66)
>         at org.apache.felix.scr.Activator.log(Activator.java:455)
>         at org.apache.felix.scr.ComponentActorThread.run(ComponentActorThread.java:89)

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

View raw message