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-2213) NPE when modifying properties of lazy (uninstantiated) service
Date Thu, 18 Mar 2010 14:10:27 GMT

    [ https://issues.apache.org/jira/browse/FELIX-2213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12846917#action_12846917
] 

Felix Meschberger commented on FELIX-2213:
------------------------------------------

Thanks for reporting this issue.

I have committed a quick fix in Rev. 924787 (just leaving the modify() method if there is
no instance). 

Can you check, whether that fixes your issue ? Thanks alot.

> NPE when modifying properties of lazy (uninstantiated) service
> --------------------------------------------------------------
>
>                 Key: FELIX-2213
>                 URL: https://issues.apache.org/jira/browse/FELIX-2213
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions:  scr-1.4.0
>         Environment: Win XP
>            Reporter: Alex Mulholland
>            Assignee: Felix Meschberger
>             Fix For:  scr-1.4.0
>
>
> Service A is active and has a reference (ServiceReference) to Service B.   Service B
is not immediate and has not been activated.   If at this point I update the properties for
Service B in ConfigAdmin, I get the NPE below.   The code appears to be going down the 'modified'
path but I don't think that is appropriate in this scenario; I expected the new properties
to be 'cached' by SCR until the service was activated.  Workaround:  if I resolve the ServiceReference
to service B (causing it to activate) BEFORE updating the properties in ConfigAdmin, the problem
does not occur and the modified method for service B is driven correctly.
> Exception in thread "pool-1-thread-3" java.lang.NullPointerException
>         at org.apache.felix.scr.impl.manager.ImmediateComponentManager.modify(ImmediateComponentManager.java:422)
>         at org.apache.felix.scr.impl.manager.ImmediateComponentManager.reconfigure(ImmediateComponentManager.java:402)
>         at org.apache.felix.scr.impl.config.ConfiguredComponentHolder.configurationUpdated(ConfiguredComponentHolder.java:187)
>         at org.apache.felix.scr.impl.config.ConfigurationComponentRegistry.configurationEvent(ConfigurationComponentRegistry.java:173).
   

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


Mime
View raw message