You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2012/11/16 14:12:13 UTC

[jira] [Created] (FELIX-3762) NPE in UpdateConfiguration#run

Carsten Ziegeler created FELIX-3762:
---------------------------------------

             Summary: NPE in UpdateConfiguration#run
                 Key: FELIX-3762
                 URL: https://issues.apache.org/jira/browse/FELIX-3762
             Project: Felix
          Issue Type: Bug
          Components: Configuration Admin
    Affects Versions: configadmin-1.6.0
            Reporter: Carsten Ziegeler


During startup I sometimes see a set of these NPE's :
16.11.2012 04:48:47.004 *ERROR* [CM Configuration Updater (Update: pid=org.apache.sling.servlets.resolver.SlingServletResolver)] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,48] Unexpected problem executing task (java.lang.NullPointerException) java.lang.NullPointerException
	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1701)
	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
	at java.lang.Thread.run(Thread.java:662)
16.11.2012 04:48:47.005 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTED

Looking at the code, it seems the configuration update thread is started before managedServiceTracker or managedServiceFactoryTracker are set in the start() method of the ConfigurationManager

--
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] [Resolved] (FELIX-3762) NPE in UpdateConfiguration#run

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

Felix Meschberger resolved FELIX-3762.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: configadmin-1.6.2

I think this can be resolved.
                
> NPE in UpdateConfiguration#run
> ------------------------------
>
>                 Key: FELIX-3762
>                 URL: https://issues.apache.org/jira/browse/FELIX-3762
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>    Affects Versions: configadmin-1.6.0
>            Reporter: Carsten Ziegeler
>            Assignee: Felix Meschberger
>             Fix For: configadmin-1.6.2
>
>         Attachments: FELIX-3762.patch
>
>
> During startup I sometimes see a set of these NPE's :
> 16.11.2012 04:48:47.004 *ERROR* [CM Configuration Updater (Update: pid=org.apache.sling.servlets.resolver.SlingServletResolver)] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,48] Unexpected problem executing task (java.lang.NullPointerException) java.lang.NullPointerException
> 	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1701)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
> 	at java.lang.Thread.run(Thread.java:662)
> 16.11.2012 04:48:47.005 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTED
> Looking at the code, it seems the configuration update thread is started before managedServiceTracker or managedServiceFactoryTracker are set in the start() method of the ConfigurationManager

--
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] [Updated] (FELIX-3762) NPE in UpdateConfiguration#run

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

Felix Meschberger updated FELIX-3762:
-------------------------------------

    Attachment: FELIX-3762.patch

Proposing to set the helper on-demand when the task is executed, which will always be after the trackers have been set and started.

WDYT ?
                
> NPE in UpdateConfiguration#run
> ------------------------------
>
>                 Key: FELIX-3762
>                 URL: https://issues.apache.org/jira/browse/FELIX-3762
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>    Affects Versions: configadmin-1.6.0
>            Reporter: Carsten Ziegeler
>         Attachments: FELIX-3762.patch
>
>
> During startup I sometimes see a set of these NPE's :
> 16.11.2012 04:48:47.004 *ERROR* [CM Configuration Updater (Update: pid=org.apache.sling.servlets.resolver.SlingServletResolver)] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,48] Unexpected problem executing task (java.lang.NullPointerException) java.lang.NullPointerException
> 	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1701)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
> 	at java.lang.Thread.run(Thread.java:662)
> 16.11.2012 04:48:47.005 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTED
> Looking at the code, it seems the configuration update thread is started before managedServiceTracker or managedServiceFactoryTracker are set in the start() method of the ConfigurationManager

--
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] [Assigned] (FELIX-3762) NPE in UpdateConfiguration#run

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

Felix Meschberger reassigned FELIX-3762:
----------------------------------------

    Assignee: Felix Meschberger
    
> NPE in UpdateConfiguration#run
> ------------------------------
>
>                 Key: FELIX-3762
>                 URL: https://issues.apache.org/jira/browse/FELIX-3762
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>    Affects Versions: configadmin-1.6.0
>            Reporter: Carsten Ziegeler
>            Assignee: Felix Meschberger
>         Attachments: FELIX-3762.patch
>
>
> During startup I sometimes see a set of these NPE's :
> 16.11.2012 04:48:47.004 *ERROR* [CM Configuration Updater (Update: pid=org.apache.sling.servlets.resolver.SlingServletResolver)] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,48] Unexpected problem executing task (java.lang.NullPointerException) java.lang.NullPointerException
> 	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1701)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
> 	at java.lang.Thread.run(Thread.java:662)
> 16.11.2012 04:48:47.005 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTED
> Looking at the code, it seems the configuration update thread is started before managedServiceTracker or managedServiceFactoryTracker are set in the start() method of the ConfigurationManager

--
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] [Work started] (FELIX-3762) NPE in UpdateConfiguration#run

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

Work on FELIX-3762 started by Felix Meschberger.

> NPE in UpdateConfiguration#run
> ------------------------------
>
>                 Key: FELIX-3762
>                 URL: https://issues.apache.org/jira/browse/FELIX-3762
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>    Affects Versions: configadmin-1.6.0
>            Reporter: Carsten Ziegeler
>            Assignee: Felix Meschberger
>         Attachments: FELIX-3762.patch
>
>
> During startup I sometimes see a set of these NPE's :
> 16.11.2012 04:48:47.004 *ERROR* [CM Configuration Updater (Update: pid=org.apache.sling.servlets.resolver.SlingServletResolver)] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,48] Unexpected problem executing task (java.lang.NullPointerException) java.lang.NullPointerException
> 	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1701)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
> 	at java.lang.Thread.run(Thread.java:662)
> 16.11.2012 04:48:47.005 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTED
> Looking at the code, it seems the configuration update thread is started before managedServiceTracker or managedServiceFactoryTracker are set in the start() method of the ConfigurationManager

--
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-3762) NPE in UpdateConfiguration#run

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

Felix Meschberger commented on FELIX-3762:
------------------------------------------

Applied the patch in Rev. 1410944.

Tests and CT still pass.

> so far I couldn't reproduce the problem just saw it once

Other concurrency issues only showed up on Linux systems, maybe this is a similar case ?
                
> NPE in UpdateConfiguration#run
> ------------------------------
>
>                 Key: FELIX-3762
>                 URL: https://issues.apache.org/jira/browse/FELIX-3762
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>    Affects Versions: configadmin-1.6.0
>            Reporter: Carsten Ziegeler
>            Assignee: Felix Meschberger
>         Attachments: FELIX-3762.patch
>
>
> During startup I sometimes see a set of these NPE's :
> 16.11.2012 04:48:47.004 *ERROR* [CM Configuration Updater (Update: pid=org.apache.sling.servlets.resolver.SlingServletResolver)] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,48] Unexpected problem executing task (java.lang.NullPointerException) java.lang.NullPointerException
> 	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1701)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
> 	at java.lang.Thread.run(Thread.java:662)
> 16.11.2012 04:48:47.005 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTED
> Looking at the code, it seems the configuration update thread is started before managedServiceTracker or managedServiceFactoryTracker are set in the start() method of the ConfigurationManager

--
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-3762) NPE in UpdateConfiguration#run

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

Felix Meschberger commented on FELIX-3762:
------------------------------------------

Right, I cannot explain this. Maybe a log file (DEBUG level) with more context would help ?
                
> NPE in UpdateConfiguration#run
> ------------------------------
>
>                 Key: FELIX-3762
>                 URL: https://issues.apache.org/jira/browse/FELIX-3762
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>    Affects Versions: configadmin-1.6.0
>            Reporter: Carsten Ziegeler
>
> During startup I sometimes see a set of these NPE's :
> 16.11.2012 04:48:47.004 *ERROR* [CM Configuration Updater (Update: pid=org.apache.sling.servlets.resolver.SlingServletResolver)] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,48] Unexpected problem executing task (java.lang.NullPointerException) java.lang.NullPointerException
> 	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1701)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
> 	at java.lang.Thread.run(Thread.java:662)
> 16.11.2012 04:48:47.005 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTED
> Looking at the code, it seems the configuration update thread is started before managedServiceTracker or managedServiceFactoryTracker are set in the start() method of the ConfigurationManager

--
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] [Comment Edited] (FELIX-3762) NPE in UpdateConfiguration#run

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

Felix Meschberger edited comment on FELIX-3762 at 11/16/12 5:53 PM:
--------------------------------------------------------------------

This is probably what happens:

1 Thread created (not started)
2 ConfigurationAdmin service is registered and a ServiceListener is creating or updating configuration
3 An UpdateTask is created which sets the "helper" field in the constructor
4 The managedService[Factory]Trackers are created
5 The threads are started and the UpdateTask executed

The problem is step 3 where the helper field is set as a reference to the appropriate managedService[Factory]Tracker. Since this is still null, this fails.
                
      was (Author: fmeschbe):
    Right, I cannot explain this. Maybe a log file (DEBUG level) with more context would help ?
                  
> NPE in UpdateConfiguration#run
> ------------------------------
>
>                 Key: FELIX-3762
>                 URL: https://issues.apache.org/jira/browse/FELIX-3762
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>    Affects Versions: configadmin-1.6.0
>            Reporter: Carsten Ziegeler
>
> During startup I sometimes see a set of these NPE's :
> 16.11.2012 04:48:47.004 *ERROR* [CM Configuration Updater (Update: pid=org.apache.sling.servlets.resolver.SlingServletResolver)] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,48] Unexpected problem executing task (java.lang.NullPointerException) java.lang.NullPointerException
> 	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1701)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
> 	at java.lang.Thread.run(Thread.java:662)
> 16.11.2012 04:48:47.005 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTED
> Looking at the code, it seems the configuration update thread is started before managedServiceTracker or managedServiceFactoryTracker are set in the start() method of the ConfigurationManager

--
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-3762) NPE in UpdateConfiguration#run

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

Carsten Ziegeler commented on FELIX-3762:
-----------------------------------------

Yes, looks good to me - so far I couldn't reproduce the problem just saw it once,
                
> NPE in UpdateConfiguration#run
> ------------------------------
>
>                 Key: FELIX-3762
>                 URL: https://issues.apache.org/jira/browse/FELIX-3762
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>    Affects Versions: configadmin-1.6.0
>            Reporter: Carsten Ziegeler
>         Attachments: FELIX-3762.patch
>
>
> During startup I sometimes see a set of these NPE's :
> 16.11.2012 04:48:47.004 *ERROR* [CM Configuration Updater (Update: pid=org.apache.sling.servlets.resolver.SlingServletResolver)] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,48] Unexpected problem executing task (java.lang.NullPointerException) java.lang.NullPointerException
> 	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1701)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
> 	at java.lang.Thread.run(Thread.java:662)
> 16.11.2012 04:48:47.005 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTED
> Looking at the code, it seems the configuration update thread is started before managedServiceTracker or managedServiceFactoryTracker are set in the start() method of the ConfigurationManager

--
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] [Work stopped] (FELIX-3762) NPE in UpdateConfiguration#run

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

Work on FELIX-3762 stopped by Felix Meschberger.

> NPE in UpdateConfiguration#run
> ------------------------------
>
>                 Key: FELIX-3762
>                 URL: https://issues.apache.org/jira/browse/FELIX-3762
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>    Affects Versions: configadmin-1.6.0
>            Reporter: Carsten Ziegeler
>            Assignee: Felix Meschberger
>         Attachments: FELIX-3762.patch
>
>
> During startup I sometimes see a set of these NPE's :
> 16.11.2012 04:48:47.004 *ERROR* [CM Configuration Updater (Update: pid=org.apache.sling.servlets.resolver.SlingServletResolver)] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,48] Unexpected problem executing task (java.lang.NullPointerException) java.lang.NullPointerException
> 	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1701)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
> 	at java.lang.Thread.run(Thread.java:662)
> 16.11.2012 04:48:47.005 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTED
> Looking at the code, it seems the configuration update thread is started before managedServiceTracker or managedServiceFactoryTracker are set in the start() method of the ConfigurationManager

--
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-3762) NPE in UpdateConfiguration#run

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

Carsten Ziegeler commented on FELIX-3762:
-----------------------------------------

Looking more into the code, I'm really wondering how this could happen?
                
> NPE in UpdateConfiguration#run
> ------------------------------
>
>                 Key: FELIX-3762
>                 URL: https://issues.apache.org/jira/browse/FELIX-3762
>             Project: Felix
>          Issue Type: Bug
>          Components: Configuration Admin
>    Affects Versions: configadmin-1.6.0
>            Reporter: Carsten Ziegeler
>
> During startup I sometimes see a set of these NPE's :
> 16.11.2012 04:48:47.004 *ERROR* [CM Configuration Updater (Update: pid=org.apache.sling.servlets.resolver.SlingServletResolver)] org.apache.felix.configadmin Service [org.apache.felix.cm.ConfigurationAdmin,48] Unexpected problem executing task (java.lang.NullPointerException) java.lang.NullPointerException
> 	at org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1701)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103)
> 	at java.lang.Thread.run(Thread.java:662)
> 16.11.2012 04:48:47.005 *INFO* [FelixStartLevel] org.apache.felix.configadmin BundleEvent STARTED
> Looking at the code, it seems the configuration update thread is started before managedServiceTracker or managedServiceFactoryTracker are set in the start() method of the ConfigurationManager

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