You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Jarek Gawor (Created) (JIRA)" <ji...@apache.org> on 2011/12/20 21:17:30 UTC

[jira] [Created] (FELIX-3288) NPE when component exposed as a service with servicefactory = true

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

        

[jira] [Commented] (FELIX-3288) NPE when component exposed as a service with servicefactory = true

Posted by "Jarek Gawor (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13195920#comment-13195920 ] 

Jarek Gawor commented on FELIX-3288:
------------------------------------

Can someone please take a look at this? We are hitting this problem quite frequently. 

                
> 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.6.0
>            Reporter: Jarek Gawor
>         Attachments: FELIX-3288.patch
>
>
> 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

        

[jira] [Updated] (FELIX-3288) NPE when component exposed as a service with servicefactory = true

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

Jarek Gawor updated FELIX-3288:
-------------------------------

    Affects Version/s:     (was: scr-1.0.2)
                        scr-1.6.0
    
> 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.6.0
>            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

        

[jira] [Assigned] (FELIX-3288) NPE when component exposed as a service with servicefactory = true

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

Felix Meschberger reassigned FELIX-3288:
----------------------------------------

    Assignee: Felix Meschberger
    
> 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.6.0
>            Reporter: Jarek Gawor
>            Assignee: Felix Meschberger
>             Fix For: scr-1.6.2
>
>         Attachments: FELIX-3288.patch
>
>
> 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

        

[jira] [Resolved] (FELIX-3288) NPE when component exposed as a service with servicefactory = true

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

Felix Meschberger resolved FELIX-3288.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: scr-1.6.2

Thanks for providing the patch.

I have applied it in Rev. 1237548
                
> 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.6.0
>            Reporter: Jarek Gawor
>            Assignee: Felix Meschberger
>             Fix For: scr-1.6.2
>
>         Attachments: FELIX-3288.patch
>
>
> 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

        

[jira] [Updated] (FELIX-3288) NPE when component exposed as a service with servicefactory = true

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

Jarek Gawor updated FELIX-3288:
-------------------------------

    Attachment: FELIX-3288.patch

Small patch for this issue.

                
> 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.6.0
>            Reporter: Jarek Gawor
>         Attachments: FELIX-3288.patch
>
>
> 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

        

[jira] [Commented] (FELIX-3288) NPE when component exposed as a service with servicefactory = true

Posted by "David Jencks (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13195921#comment-13195921 ] 

David Jencks commented on FELIX-3288:
-------------------------------------

The patch looks correct to me.  Is there any chance of compiling with java 5 and using @Override to catch stuff like this?
                
> 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.6.0
>            Reporter: Jarek Gawor
>         Attachments: FELIX-3288.patch
>
>
> 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

        

[jira] [Closed] (FELIX-3288) NPE when component exposed as a service with servicefactory = true

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

Felix Meschberger closed FELIX-3288.
------------------------------------


Close after 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.6.0
>            Reporter: Jarek Gawor
>            Assignee: Felix Meschberger
>             Fix For: scr-1.6.2
>
>         Attachments: FELIX-3288.patch
>
>
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (FELIX-3288) NPE when component exposed as a service with servicefactory = true

Posted by "Felix Meschberger (Commented) (JIRA)" <ji...@apache.org>.
    [ 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

        

[jira] [Issue Comment Edited] (FELIX-3288) NPE when component exposed as a service with servicefactory = true

Posted by "Jarek Gawor (Issue Comment Edited) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173758#comment-13173758 ] 

Jarek Gawor edited comment on FELIX-3288 at 12/21/11 1:38 AM:
--------------------------------------------------------------

I just selected a wrong version by mistake.


                
      was (Author: gawor@mcs.anl.gov):
    I just selected a wrong version my mistake.


                  
> 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.6.0
>            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

        

[jira] [Commented] (FELIX-3288) NPE when component exposed as a service with servicefactory = true

Posted by "Jarek Gawor (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-3288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13173758#comment-13173758 ] 

Jarek Gawor commented on FELIX-3288:
------------------------------------

I just selected a wrong version my mistake.


                
> 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.6.0
>            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