Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 52568 invoked from network); 18 Mar 2010 14:10:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Mar 2010 14:10:49 -0000 Received: (qmail 37770 invoked by uid 500); 18 Mar 2010 14:10:49 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 37734 invoked by uid 500); 18 Mar 2010 14:10:49 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 37726 invoked by uid 99); 18 Mar 2010 14:10:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Mar 2010 14:10:49 +0000 X-ASF-Spam-Status: No, hits=-1055.5 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Mar 2010 14:10:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 740A9234C4AE for ; Thu, 18 Mar 2010 14:10:27 +0000 (UTC) Message-ID: <623714816.342051268921427458.JavaMail.jira@brutus.apache.org> Date: Thu, 18 Mar 2010 14:10:27 +0000 (UTC) From: "Felix Meschberger (JIRA)" To: dev@felix.apache.org Subject: [jira] Commented: (FELIX-2213) NPE when modifying properties of lazy (uninstantiated) service In-Reply-To: <1416469785.341661268920647281.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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.