Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3C8299C32 for ; Tue, 20 Dec 2011 21:47:53 +0000 (UTC) Received: (qmail 54663 invoked by uid 500); 20 Dec 2011 21:47:52 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 54605 invoked by uid 500); 20 Dec 2011 21:47:52 -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 54597 invoked by uid 99); 20 Dec 2011 21:47:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2011 21:47:52 +0000 X-ASF-Spam-Status: No, hits=-2002.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2011 21:47:51 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 104FB11E2E6 for ; Tue, 20 Dec 2011 21:47:31 +0000 (UTC) Date: Tue, 20 Dec 2011 21:47:31 +0000 (UTC) From: "Felix Meschberger (Commented) (JIRA)" To: dev@felix.apache.org Message-ID: <265972346.32631.1324417651068.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1927115798.32281.1324412250717.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (FELIX-3288) NPE when component exposed as a service with servicefactory = true 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-3288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173532#comment-13173532 ] Felix Meschberger commented on FELIX-3288: ------------------------------------------ You might want to update the SCR bundle to the latest release (1.6.0 at this time). This contains lots of fixes since the virtually age-old 1.0.2 release. > NPE when component exposed as a service with servicefactory = true > ------------------------------------------------------------------ > > Key: FELIX-3288 > URL: https://issues.apache.org/jira/browse/FELIX-3288 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) > Affects Versions: scr-1.0.2 > Reporter: Jarek Gawor > > I have a component that is exposed as a service and is also configured with servicefactory = true. I see the following NPE when shutting the framework: > java.lang.NullPointerException > at org.apache.felix.scr.impl.manager.ImmediateComponentManager.disposeImplementationObject(ImmediateComponentManager.java:252) > at org.apache.felix.scr.impl.manager.ImmediateComponentManager.deleteComponent(ImmediateComponentManager.java:135) > at org.apache.felix.scr.impl.manager.AbstractComponentManager$Satisfied.deactivate(AbstractComponentManager.java:1075) > at org.apache.felix.scr.impl.manager.AbstractComponentManager.disposeInternal(AbstractComponentManager.java:357) > at org.apache.felix.scr.impl.manager.AbstractComponentManager.dispose(AbstractComponentManager.java:196) > at org.apache.felix.scr.impl.config.ConfiguredComponentHolder.disposeComponents(ConfiguredComponentHolder.java:299) > at org.apache.felix.scr.impl.BundleComponentActivator.dispose(BundleComponentActivator.java:319) > at org.apache.felix.scr.impl.Activator.disposeComponents(Activator.java:340) > at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:207) > Since the component is configured with servicefactory = true, ServiceFactoryComponentManager is used to manage the object. ServiceFactoryComponentManager overrides the createComponent() method from ImmediateComponentManager. ServiceFactoryComponentManager also intended (I think) to override the corresponding deleteComponent() method from ImmediateComponentManager. However, the signature of the deleteComponent() in ImmediateComponentManager has changed a bit so the override doesn't work anymore. So that's what I think is causing the problem in this case. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira