You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Felix Meschberger (JIRA)" <ji...@apache.org> on 2010/03/24 09:37:27 UTC
[jira] Commented: (FELIX-2231) Errors with services in Lazy bundles
[ https://issues.apache.org/jira/browse/FELIX-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12849106#action_12849106 ]
Felix Meschberger commented on FELIX-2231:
------------------------------------------
The NullPointerException on "ConfiguredComponentHolder.configurationUpdated(ConfiguredComponentHolder.java:187) " is very likely a concurrency issue where configuration is provided after the component has already been disposed off due to the bundle being stopped (it seems).
This requires adding a check in the configurationUpdated and configurationDeleted methods to ensure for them to not do anything if the component has been disposed off already.
The messages:
Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException:
The component name 'com.ibm.ws.transport.orb' has already been registered by Bundle 19 (com.ibm.ws.transport.orb)
as Component of Class com.ibm.ws.iiop.internal.service.ORBServiceImpl
Is also very like caused by a concurrency issue: The only explanation I have here is that the BundleChangeEvent for the lazy start and the actual start are fired quasi at the same time: LAZY_ACTIVATION is sent causing components to be loaded. While components are being loaded, the bundle is actually started and a STARTED event is fired causing the components to be loaded again because the LAZY_ACTIVATION induced load has not completed yet ...
The solution to this problem is to ensure (quasi-)concurrent delivery of bundle events does not cause harm by loading the bundle descriptors twice.
> Errors with services in Lazy bundles
> ------------------------------------
>
> Key: FELIX-2231
> URL: https://issues.apache.org/jira/browse/FELIX-2231
> Project: Felix
> Issue Type: Bug
> Components: Declarative Services (SCR)
> Affects Versions: scr-1.4.0
> Environment: Windows XP
> Reporter: Alex Mulholland
>
> Using equinox f/w with felix DS. Starting many bundles , some of which have Lazy activation policy (including com.ibm.ws.transport.orb, which has 6 services defined). Sometimes everything starts without error.
> About 1 in 3 times I see these messages for the com.ibm.ws.transport.orb bundle:
> Info: OSGI- [23 Mar 2010 14:27:43.531 EDT] BundleEvent RESOLVED Bundle:com.ibm.ws.transport.orb(id=19) {3}
> Info: OSGI- [23 Mar 2010 14:27:43.531 EDT] BundleEvent INSTALLED Bundle:com.ibm.ws.transport.orb(id=19) {3}
> Exception in thread "Alpine-CM-Thread-7" java.lang.NullPointerException
> at org.apache.felix.scr.impl.config.ConfiguredComponentHolder.configurationUpdated(ConfiguredComponentHolder.java:187)
> at org.apache.felix.scr.impl.config.ConfigurationComponentRegistry.configurationEvent(ConfigurationComponentRegistry.java:173)
> at com.ibm.ws.config.cm.internal.ConfigEventDispatcher$1.run(ConfigEventDispatcher.java:89)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:736)
> Info: OSGI- [23 Mar 2010 14:27:43.562 EDT] BundleEvent STOPPED Bundle:com.ibm.ws.transport.orb(id=19) {3}
> On some other start attempts I see these messages:
> Info: OSGI- [19 Mar 2010 15:03:09.647 EDT] BundleEvent RESOLVED Bundle:com.ibm.ws.transport.orb(id=19) {3}
> Info: OSGI- [19 Mar 2010 15:03:09.653 EDT] ServiceEvent REGISTERED Bundle:com.ibm.ws.transport.orb(id=19) ServiceRef:[com.ibm.websphere.channelfw.osgi.ChannelFactoryProvider](id=56, pid=null)
> Info: OSGI- [19 Mar 2010 15:03:09.655 EDT] ServiceEvent REGISTERED Bundle:com.ibm.ws.transport.orb(id=19) ServiceRef:[com.ibm.ws.iiop.transport.internal.EventManager](id=57, pid=null)
> Error: OSGI- [19 Mar 2010 15:03:09.661 EDT] [com.ibm.ws.transport.orb] Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException: The component name 'com.ibm.ws.transport.orb' has already been registered by Bundle 19 (com.ibm.ws.transport.orb) as Component of Class com.ibm.ws.iiop.internal.service.ORBServiceImpl
> OSGI- [19 Mar 2010 15:03:09.661 EDT] [com.ibm.ws.transport.orb] Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException: The component name 'com.ibm.ws.transport.orb' has already been registered by Bundle 19 (com.ibm.ws.transport.orb) as Component of Class com.ibm.ws.iiop.internal.service.ORBServiceImpl
> Error: OSGI- [19 Mar 2010 15:03:09.676 EDT] [IIOPChannelProvider] Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException: The component name 'IIOPChannelProvider' has already been registered by Bundle 19 (com.ibm.ws.transport.orb) as Component of Class com.ibm.ws.iiop.internal.service.IIOPChannelProvider
> OSGI- [19 Mar 2010 15:03:09.676 EDT] [IIOPChannelProvider] Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException: The component name 'IIOPChannelProvider' has already been registered by Bundle 19 (com.ibm.ws.transport.orb) as Component of Class com.ibm.ws.iiop.internal.service.IIOPChannelProvider
> Error: OSGI- [19 Mar 2010 15:03:09.677 EDT] [com.ibm.ws.iiop.transport.internal.EventManager] Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException: The component name 'com.ibm.ws.iiop.transport.internal.EventManager' has already been registered by Bundle 19 (com.ibm.ws.transport.orb) as Component of Class com.ibm.ws.iiop.transport.internal.EventManager
> OSGI- [19 Mar 2010 15:03:09.677 EDT] [com.ibm.ws.iiop.transport.internal.EventManager] Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException: The component name 'com.ibm.ws.iiop.transport.internal.EventManager' has already been registered by Bundle 19 (com.ibm.ws.transport.orb) as Component of Class com.ibm.ws.iiop.transport.internal.EventManager
> Error: OSGI- [19 Mar 2010 15:03:09.678 EDT] [com.ibm.ws.iiop.internal.service.CorbaContainer] Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException: The component name 'com.ibm.ws.iiop.internal.service.CorbaContainer' has already been registered by Bundle 19 (com.ibm.ws.transport.orb) as Component of Class com.ibm.ws.iiop.internal.service.CorbaContainer
> OSGI- [19 Mar 2010 15:03:09.678 EDT] [com.ibm.ws.iiop.internal.service.CorbaContainer] Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException: The component name 'com.ibm.ws.iiop.internal.service.CorbaContainer' has already been registered by Bundle 19 (com.ibm.ws.transport.orb) as Component of Class com.ibm.ws.iiop.internal.service.CorbaContainer
> Error: OSGI- [19 Mar 2010 15:03:09.679 EDT] [com.ibm.ws.iiop.internal.service.IIOPConnectionTracker] Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException: The component name 'com.ibm.ws.iiop.internal.service.IIOPConnectionTracker' has already been registered by Bundle 19 (com.ibm.ws.transport.orb) as Component of Class com.ibm.ws.iiop.internal.service.IIOPConnectionTracker
> OSGI- [19 Mar 2010 15:03:09.679 EDT] [com.ibm.ws.iiop.internal.service.IIOPConnectionTracker] Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException: The component name 'com.ibm.ws.iiop.internal.service.IIOPConnectionTracker' has already been registered by Bundle 19 (com.ibm.ws.transport.orb) as Component of Class com.ibm.ws.iiop.internal.service.IIOPConnectionTracker
> Error: OSGI- [19 Mar 2010 15:03:09.681 EDT] [com.ibm.ws.iiop.internal.service.PortableInterceptorManager] Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException: The component name 'com.ibm.ws.iiop.internal.service.PortableInterceptorManager' has already been registered by Bundle 19 (com.ibm.ws.transport.orb) as Component of Class com.ibm.ws.iiop.internal.service.PortableInterceptorManager
> OSGI- [19 Mar 2010 15:03:09.681 EDT] [com.ibm.ws.iiop.internal.service.PortableInterceptorManager] Cannot register Component Bundle:com.ibm.ws.transport.orb(id=19) org.osgi.service.component.ComponentException: The component name 'com.ibm.ws.iiop.internal.service.PortableInterceptorManager' has already been registered by Bundle 19 (com.ibm.ws.transport.orb) as Component of Class com.ibm.ws.iiop.internal.service.PortableInterceptorManager
> Info: OSGI- [19 Mar 2010 15:03:09.681 EDT] BundleEvent STARTED Bundle:com.ibm.ws.transport.orb(id=19) {3}
> Info: OSGI- [19 Mar 2010 15:03:09.685 EDT] BundleEvent INSTALLED Bundle:com.ibm.ws.transport.orb(id=19) {3}
> Info: OSGI- [19 Mar 2010 15:03:09.690 EDT] ServiceEvent UNREGISTERING Bundle:com.ibm.ws.transport.orb(id=19) ServiceRef:[com.ibm.websphere.channelfw.osgi.ChannelFactoryProvider](id=56, pid=null)
> Info: OSGI- [19 Mar 2010 15:03:09.691 EDT] ServiceEvent UNREGISTERING Bundle:com.ibm.ws.transport.orb(id=19) ServiceRef:[com.ibm.ws.iiop.transport.internal.EventManager](id=57, pid=null)
> Info: OSGI- [19 Mar 2010 15:03:09.692 EDT] BundleEvent STOPPED Bundle:com.ibm.ws.transport.orb(id=19) {3}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.