karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (KARAF-4670) Race condition in the Activator.updated() of the org.apache.karaf.cellar.hazelcast
Date Fri, 02 Sep 2016 13:16:21 GMT

     [ https://issues.apache.org/jira/browse/KARAF-4670?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Jean-Baptiste Onofré resolved KARAF-4670.
-----------------------------------------
    Resolution: Fixed

> Race condition in the Activator.updated() of the org.apache.karaf.cellar.hazelcast
> ----------------------------------------------------------------------------------
>
>                 Key: KARAF-4670
>                 URL: https://issues.apache.org/jira/browse/KARAF-4670
>             Project: Karaf
>          Issue Type: Bug
>          Components: cellar-hazelcast
>    Affects Versions: cellar-4.0.1
>            Reporter: Sergiy Shyrkov
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: cellar-4.0.2
>
>
> Sometimes on the startup I get an NPE in the org.apache.karaf.cellar.hazelcast.internal.osgi.Activator.updated()
because the doStart() method execution has not been finished yet and the hazelcastServiceFactory
is still null.
> My log is as follows, where the log message about the initialization of the hazelcastServiceFactory
("init Hazelcast service factory") comes after the call to Activator.updated() (causes an
NPE).
> Thank you!
> {code}
> 2016-08-26 14:35:01,780: DEBUG [FelixStartLevel] org.apache.karaf.cellar.bundle: BundleEvent
STARTING - org.apache.karaf.cellar.bundle
> 2016-08-26 14:35:01,793: INFO  [FelixStartLevel] org.apache.karaf.shell.impl.action.osgi.CommandExtension:
Command registration delayed for bundle org.apache.karaf.cellar.bundle/4.0.1. Missing dependencies:
[org.apache.karaf.cellar.core.ClusterManager, org.apache.karaf.cellar.core.GroupManager, org.apache.karaf.cellar.core.event.EventProducer]
> 2016-08-26 14:35:01,794: DEBUG [FelixStartLevel] org.apache.karaf.cellar.bundle: BundleEvent
STARTED - org.apache.karaf.cellar.bundle
> 2016-08-26 14:35:01,795: DEBUG [FelixStartLevel] org.apache.karaf.cellar.config: BundleEvent
STARTING - org.apache.karaf.cellar.config
> 2016-08-26 14:35:01,801: DEBUG [FelixStartLevel] org.apache.karaf.cellar.config: ServiceEvent
REGISTERED - [org.osgi.service.cm.ManagedService] - org.apache.karaf.cellar.config
> 2016-08-26 14:35:01,810: INFO  [FelixStartLevel] org.apache.karaf.shell.impl.action.osgi.CommandExtension:
Command registration delayed for bundle org.apache.karaf.cellar.config/4.0.1. Missing dependencies:
[org.apache.karaf.cellar.core.ClusterManager, org.apache.karaf.cellar.core.GroupManager, org.apache.karaf.cellar.core.event.EventProducer]
> 2016-08-26 14:35:01,810: DEBUG [FelixStartLevel] org.apache.karaf.cellar.config: BundleEvent
STARTED - org.apache.karaf.cellar.config
> 2016-08-26 14:35:01,811: DEBUG [FelixStartLevel] org.apache.karaf.cellar.features: BundleEvent
STARTING - org.apache.karaf.cellar.features
> 2016-08-26 14:35:01,831: INFO  [FelixStartLevel] org.apache.karaf.shell.impl.action.osgi.CommandExtension:
Command registration delayed for bundle org.apache.karaf.cellar.features/4.0.1. Missing dependencies:
[org.apache.karaf.cellar.core.ClusterManager, org.apache.karaf.cellar.core.GroupManager, org.apache.karaf.cellar.core.event.EventProducer]
> 2016-08-26 14:35:01,831: DEBUG [FelixStartLevel] org.apache.karaf.cellar.features: BundleEvent
STARTED - org.apache.karaf.cellar.features
> 2016-08-26 14:35:01,832: DEBUG [FelixStartLevel] org.apache.karaf.cellar.hazelcast: BundleEvent
STARTING - org.apache.karaf.cellar.hazelcast
> 2016-08-26 14:35:01,839: DEBUG [FelixStartLevel] org.apache.karaf.cellar.hazelcast: ServiceEvent
REGISTERED - [org.osgi.service.cm.ManagedService] - org.apache.karaf.cellar.hazelcast
> 2016-08-26 14:35:01,841: INFO  [FelixStartLevel] org.apache.karaf.shell.impl.action.osgi.CommandExtension:
Registering commands for bundle org.apache.karaf.cellar.hazelcast/4.0.1
> 2016-08-26 14:35:01,841: DEBUG [pool-153-thread-1] org.apache.karaf.cellar.hazelcast.internal.osgi.Activator:
CELLAR HAZELCAST: init combined class loader
> 2016-08-26 14:35:01,844: ERROR [CM Configuration Updater (ManagedService Update: pid=[org.apache.karaf.cellar.discovery])]
org.apache.karaf.cellar.hazelcast.internal.osgi.Activator: Can't update Hazelcast service
factory
> java.lang.NullPointerException
> 	at org.apache.karaf.cellar.hazelcast.internal.osgi.Activator.updated(Activator.java:392)
> 	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updated(ManagedServiceTracker.java:189)
> 	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:152)
> 	at org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:85)
> 	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.provide(ConfigurationManager.java:1444)
> 	at org.apache.felix.cm.impl.ConfigurationManager$ManagedServiceUpdate.run(ConfigurationManager.java:1400)
> 	at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:143)
> 	at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:110)
> 	at java.lang.Thread.run(Thread.java:745)
> 2016-08-26 14:35:01,851: DEBUG [FelixStartLevel] org.apache.karaf.cellar.hazelcast: BundleEvent
STARTED - org.apache.karaf.cellar.hazelcast
> 2016-08-26 14:35:01,854: DEBUG [pool-153-thread-1] org.apache.karaf.cellar.hazelcast.internal.osgi.Activator:
CELLAR HAZELCAST: start the discovery service tracker
> 2016-08-26 14:35:01,855: DEBUG [FelixStartLevel] org.apache.karaf.cellar.shell: BundleEvent
STARTING - org.apache.karaf.cellar.shell
> 2016-08-26 14:35:01,855: DEBUG [pool-153-thread-1] org.apache.karaf.cellar.hazelcast.internal.osgi.Activator:
CELLAR HAZELCAST: start the synchronizer service tracker
> 2016-08-26 14:35:01,857: DEBUG [pool-153-thread-1] org.apache.karaf.cellar.hazelcast.internal.osgi.Activator:
CELLAR HAZELCAST:init dispatcher
> 2016-08-26 14:35:01,858: DEBUG [pool-153-thread-1] org.apache.karaf.cellar.hazelcast.internal.osgi.Activator:
CELLAR HAZELCAST: create Hazelcast configuration manager
> 2016-08-26 14:35:01,859: DEBUG [pool-153-thread-1] org.apache.karaf.cellar.hazelcast.internal.osgi.Activator:
CELLAR HAZELCAST:init Hazelcast service factory
> 2016-08-26 14:35:01,862: DEBUG [pool-153-thread-1] org.apache.karaf.cellar.hazelcast.internal.osgi.Activator:
CELLAR HAZELCAST:register Hazelcast instance
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message