Petals ESB Container

Sometimes a NPE occurs at container start-up recovering components

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 5.0.0
  • Fix Version/s: 5.0.1
  • Component/s: Recovery
  • Security Level: Public
  • Description:
    Hide

    Sometimes a NPE occurs at container start-up recovering components:

    initial-container-3 2015/11/19 16:32:48,820 GMT+0100 INFO [Petals.Server] : Starting messaging sub-system ...
    initial-container-3 2015/11/19 16:32:48,849 GMT+0100 INFO [Petals.Transporter.NioTransportProtocol.NioServerAgent] : The NIO transporter server is ready to process request on port 7805
    initial-container-3 2015/11/19 16:32:48,959 GMT+0100 INFO [Petals.Server] : Messaging sub-system started
    initial-container-3 2015/11/19 16:32:49,965 GMT+0100 SEVERE [Petals.JBI-Management.SystemRecoveryService] : org.ow2.petals.microkernel.api.jbi.management.ManagementException: A component consistency is corrupted: petals-se-rmi
    Its state changes to UNKNOWN
    Please check the repository consistency.
    java.util.concurrent.ExecutionException: org.ow2.petals.microkernel.api.jbi.management.ManagementException: A component consistency is corrupted: petals-se-rmi
    Its state changes to UNKNOWN
    Please check the repository consistency.
    	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    	at org.ow2.petals.microkernel.jbi.management.recovery.SystemRecoveryServiceImpl.recoverAllComponent(SystemRecoveryServiceImpl.java:174)
    	at org.ow2.petals.microkernel.jbi.management.recovery.SystemRecoveryServiceImpl.recoverAllEntities(SystemRecoveryServiceImpl.java:134)
    	at org.ow2.petals.microkernel.jbi.management.recovery.SystemRecoveryServiceInterceptorLC1a2eb783.recoverAllEntities(SystemRecoveryServiceInterceptorLC1a2eb783.java:65)
    	at org.ow2.petals.microkernel.jbi.management.recovery.SystemRecoveryServiceFcItf.recoverAllEntities(SystemRecoveryServiceFcItf.java:34)
    	at org.ow2.petals.microkernel.server.PetalsServerImpl.recoverSystem(PetalsServerImpl.java:383)
    	at org.ow2.petals.microkernel.server.PetalsServerImpl.start(PetalsServerImpl.java:154)
    	at org.ow2.petals.launcher.PetalsLauncher.launchPetalsServer(PetalsLauncher.java:175)
    	at org.ow2.petals.launcher.PetalsLauncher.run(PetalsLauncher.java:446)
    	at org.ow2.petals.launcher.PetalsLauncher.main(PetalsLauncher.java:401)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	at org.ow2.petals.BootstrapLauncher.main(BootstrapLauncher.java:72)
    Caused by: org.ow2.petals.microkernel.api.jbi.management.ManagementException: A component consistency is corrupted: petals-se-rmi
    Its state changes to UNKNOWN
    Please check the repository consistency.
    	at org.ow2.petals.microkernel.jbi.management.recovery.task.RecoverComponentTask.call(RecoverComponentTask.java:98)
    	at org.ow2.petals.microkernel.jbi.management.recovery.task.RecoverComponentTask.call(RecoverComponentTask.java:48)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    	at java.lang.Thread.run(Thread.java:745)
    Caused by: org.ow2.petals.microkernel.api.jbi.management.ManagementException: Failed to recover Component 'petals-se-rmi'
    	at org.ow2.petals.microkernel.jbi.management.recovery.task.RecoverComponentTask.recoverComponent(RecoverComponentTask.java:178)
    	at org.ow2.petals.microkernel.jbi.management.recovery.task.RecoverComponentTask.recoverComponent(RecoverComponentTask.java:122)
    	at org.ow2.petals.microkernel.jbi.management.recovery.task.RecoverComponentTask.call(RecoverComponentTask.java:71)
    	... 7 more
    Caused by: java.lang.NullPointerException
    	at org.ow2.petals.microkernel.api.server.FractalHelper.getComponentByName(FractalHelper.java:360)
    	at org.ow2.petals.microkernel.container.ContainerControllerImpl.startComponent(ContainerControllerImpl.java:628)
    	at org.ow2.petals.microkernel.container.ContainerControllerImpl.startInstaller(ContainerControllerImpl.java:296)
    	at org.ow2.petals.microkernel.container.ContainerControllerInterceptorLC1a2eb783.startInstaller(ContainerControllerInterceptorLC1a2eb783.java:135)
    	at org.ow2.petals.microkernel.container.ContainerControllerFcItf.startInstaller(ContainerControllerFcItf.java:52)
    	at org.ow2.petals.microkernel.container.ContainerServiceImpl.startInstaller(ContainerServiceImpl.java:170)
    	at org.ow2.petals.microkernel.api.container.ContainerServiceInterceptorLC1a2eb783.startInstaller(ContainerServiceInterceptorLC1a2eb783.java:902)
    	at org.ow2.petals.microkernel.api.container.ContainerServiceFcItf.startInstaller(ContainerServiceFcItf.java:247)
    	at org.ow2.petals.microkernel.jbi.management.task.installation.install.component.CreateAndRegisterInstallerMBeanTask.createAndRegisterInstallerMBean(CreateAndRegisterInstallerMBeanTask.java:94)
    	at org.ow2.petals.microkernel.jbi.management.task.installation.install.component.CreateAndRegisterInstallerMBeanTask.execute(CreateAndRegisterInstallerMBeanTask.java:68)
    	at org.ow2.petals.microkernel.api.jbi.management.TaskProcessor.process(TaskProcessor.java:73)
    	at org.ow2.petals.microkernel.jbi.management.recovery.task.RecoverComponentTask.recoverComponent(RecoverComponentTask.java:176)
    	... 9 more
    initial-container-3 2015/11/19 16:32:51,738 GMT+0100 INFO [Petals.JBI-Management.SystemRecoveryService] : Installer of the component 'petals-se-pojo' loaded
    initial-container-3 2015/11/19 16:32:51,742 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo.bootstrap.petals-se-pojo] : Install component [Name : petals-se-pojo, Version : 2.3.1-SNAPSHOT]
    initial-container-3 2015/11/19 16:32:51,885 GMT+0100 INFO [Petals.Container.Lifecycle.Installer] : Component 'petals-se-pojo' installed
    initial-container-3 2015/11/19 16:32:51,886 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Init component...
    initial-container-3 2015/11/19 16:32:52,656 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Placeholders reloading.
    initial-container-3 2015/11/19 16:32:52,658 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Placeholders reloaded.
    initial-container-3 2015/11/19 16:32:52,714 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Component initialized
    initial-container-3 2015/11/19 16:32:52,715 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Start component...
    initial-container-3 2015/11/19 16:32:52,822 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Component started
    initial-container-3 2015/11/19 16:32:52,869 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Deploy Service Unit 'su-POJO-HelloService-5.0.0-SNAPSHOT'
    initial-container-3 2015/11/19 16:32:56,117 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Service Unit 'su-POJO-HelloService-5.0.0-SNAPSHOT' deployed
    initial-container-3 2015/11/19 16:32:56,137 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Init Service Unit 'su-POJO-HelloService-5.0.0-SNAPSHOT'
    initial-container-3 2015/11/19 16:32:56,159 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Start Service Unit 'su-POJO-HelloService-5.0.0-SNAPSHOT'
    initial-container-3 2015/11/19 16:32:57,854 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : New Service Endpoint deployed : {http://petals.ow2.org/}HelloService ->edpt-844a3400-8ed2-11e5-9d31-0090f5fbc4a1 (INTERNAL):initial-container-3/petals-se-pojo
    initial-container-3 2015/11/19 16:32:57,856 GMT+0100 INFO [Petals.Server] : Server STARTED
    Show
    Sometimes a NPE occurs at container start-up recovering components:
    initial-container-3 2015/11/19 16:32:48,820 GMT+0100 INFO [Petals.Server] : Starting messaging sub-system ...
    initial-container-3 2015/11/19 16:32:48,849 GMT+0100 INFO [Petals.Transporter.NioTransportProtocol.NioServerAgent] : The NIO transporter server is ready to process request on port 7805
    initial-container-3 2015/11/19 16:32:48,959 GMT+0100 INFO [Petals.Server] : Messaging sub-system started
    initial-container-3 2015/11/19 16:32:49,965 GMT+0100 SEVERE [Petals.JBI-Management.SystemRecoveryService] : org.ow2.petals.microkernel.api.jbi.management.ManagementException: A component consistency is corrupted: petals-se-rmi
    Its state changes to UNKNOWN
    Please check the repository consistency.
    java.util.concurrent.ExecutionException: org.ow2.petals.microkernel.api.jbi.management.ManagementException: A component consistency is corrupted: petals-se-rmi
    Its state changes to UNKNOWN
    Please check the repository consistency.
    	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    	at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    	at org.ow2.petals.microkernel.jbi.management.recovery.SystemRecoveryServiceImpl.recoverAllComponent(SystemRecoveryServiceImpl.java:174)
    	at org.ow2.petals.microkernel.jbi.management.recovery.SystemRecoveryServiceImpl.recoverAllEntities(SystemRecoveryServiceImpl.java:134)
    	at org.ow2.petals.microkernel.jbi.management.recovery.SystemRecoveryServiceInterceptorLC1a2eb783.recoverAllEntities(SystemRecoveryServiceInterceptorLC1a2eb783.java:65)
    	at org.ow2.petals.microkernel.jbi.management.recovery.SystemRecoveryServiceFcItf.recoverAllEntities(SystemRecoveryServiceFcItf.java:34)
    	at org.ow2.petals.microkernel.server.PetalsServerImpl.recoverSystem(PetalsServerImpl.java:383)
    	at org.ow2.petals.microkernel.server.PetalsServerImpl.start(PetalsServerImpl.java:154)
    	at org.ow2.petals.launcher.PetalsLauncher.launchPetalsServer(PetalsLauncher.java:175)
    	at org.ow2.petals.launcher.PetalsLauncher.run(PetalsLauncher.java:446)
    	at org.ow2.petals.launcher.PetalsLauncher.main(PetalsLauncher.java:401)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:606)
    	at org.ow2.petals.BootstrapLauncher.main(BootstrapLauncher.java:72)
    Caused by: org.ow2.petals.microkernel.api.jbi.management.ManagementException: A component consistency is corrupted: petals-se-rmi
    Its state changes to UNKNOWN
    Please check the repository consistency.
    	at org.ow2.petals.microkernel.jbi.management.recovery.task.RecoverComponentTask.call(RecoverComponentTask.java:98)
    	at org.ow2.petals.microkernel.jbi.management.recovery.task.RecoverComponentTask.call(RecoverComponentTask.java:48)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    	at java.lang.Thread.run(Thread.java:745)
    Caused by: org.ow2.petals.microkernel.api.jbi.management.ManagementException: Failed to recover Component 'petals-se-rmi'
    	at org.ow2.petals.microkernel.jbi.management.recovery.task.RecoverComponentTask.recoverComponent(RecoverComponentTask.java:178)
    	at org.ow2.petals.microkernel.jbi.management.recovery.task.RecoverComponentTask.recoverComponent(RecoverComponentTask.java:122)
    	at org.ow2.petals.microkernel.jbi.management.recovery.task.RecoverComponentTask.call(RecoverComponentTask.java:71)
    	... 7 more
    Caused by: java.lang.NullPointerException
    	at org.ow2.petals.microkernel.api.server.FractalHelper.getComponentByName(FractalHelper.java:360)
    	at org.ow2.petals.microkernel.container.ContainerControllerImpl.startComponent(ContainerControllerImpl.java:628)
    	at org.ow2.petals.microkernel.container.ContainerControllerImpl.startInstaller(ContainerControllerImpl.java:296)
    	at org.ow2.petals.microkernel.container.ContainerControllerInterceptorLC1a2eb783.startInstaller(ContainerControllerInterceptorLC1a2eb783.java:135)
    	at org.ow2.petals.microkernel.container.ContainerControllerFcItf.startInstaller(ContainerControllerFcItf.java:52)
    	at org.ow2.petals.microkernel.container.ContainerServiceImpl.startInstaller(ContainerServiceImpl.java:170)
    	at org.ow2.petals.microkernel.api.container.ContainerServiceInterceptorLC1a2eb783.startInstaller(ContainerServiceInterceptorLC1a2eb783.java:902)
    	at org.ow2.petals.microkernel.api.container.ContainerServiceFcItf.startInstaller(ContainerServiceFcItf.java:247)
    	at org.ow2.petals.microkernel.jbi.management.task.installation.install.component.CreateAndRegisterInstallerMBeanTask.createAndRegisterInstallerMBean(CreateAndRegisterInstallerMBeanTask.java:94)
    	at org.ow2.petals.microkernel.jbi.management.task.installation.install.component.CreateAndRegisterInstallerMBeanTask.execute(CreateAndRegisterInstallerMBeanTask.java:68)
    	at org.ow2.petals.microkernel.api.jbi.management.TaskProcessor.process(TaskProcessor.java:73)
    	at org.ow2.petals.microkernel.jbi.management.recovery.task.RecoverComponentTask.recoverComponent(RecoverComponentTask.java:176)
    	... 9 more
    initial-container-3 2015/11/19 16:32:51,738 GMT+0100 INFO [Petals.JBI-Management.SystemRecoveryService] : Installer of the component 'petals-se-pojo' loaded
    initial-container-3 2015/11/19 16:32:51,742 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo.bootstrap.petals-se-pojo] : Install component [Name : petals-se-pojo, Version : 2.3.1-SNAPSHOT]
    initial-container-3 2015/11/19 16:32:51,885 GMT+0100 INFO [Petals.Container.Lifecycle.Installer] : Component 'petals-se-pojo' installed
    initial-container-3 2015/11/19 16:32:51,886 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Init component...
    initial-container-3 2015/11/19 16:32:52,656 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Placeholders reloading.
    initial-container-3 2015/11/19 16:32:52,658 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Placeholders reloaded.
    initial-container-3 2015/11/19 16:32:52,714 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Component initialized
    initial-container-3 2015/11/19 16:32:52,715 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Start component...
    initial-container-3 2015/11/19 16:32:52,822 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Component started
    initial-container-3 2015/11/19 16:32:52,869 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Deploy Service Unit 'su-POJO-HelloService-5.0.0-SNAPSHOT'
    initial-container-3 2015/11/19 16:32:56,117 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Service Unit 'su-POJO-HelloService-5.0.0-SNAPSHOT' deployed
    initial-container-3 2015/11/19 16:32:56,137 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Init Service Unit 'su-POJO-HelloService-5.0.0-SNAPSHOT'
    initial-container-3 2015/11/19 16:32:56,159 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : Start Service Unit 'su-POJO-HelloService-5.0.0-SNAPSHOT'
    initial-container-3 2015/11/19 16:32:57,854 GMT+0100 INFO [Petals.Container.Components.petals-se-pojo] : New Service Endpoint deployed : {http://petals.ow2.org/}HelloService ->edpt-844a3400-8ed2-11e5-9d31-0090f5fbc4a1 (INTERNAL):initial-container-3/petals-se-pojo
    initial-container-3 2015/11/19 16:32:57,856 GMT+0100 INFO [Petals.Server] : Server STARTED
  • Environment:
    -

Activity

Hide
Christophe DENEUX added a comment - Thu, 19 Nov 2015 - 17:19:23 +0100

When recovering 2 components, we can have this situation:

  • the recovering of components is concurrent,
  • the recovering process try to start one component during the other components is added to the Fractal composite
  • as the 2nd component is added in the composite with a name set to null before to change its name, we can have the NPE.

If, when adding a component to the Fractal composite, we set its name before to add it, we should not have anymore the problem.

Show
Christophe DENEUX added a comment - Thu, 19 Nov 2015 - 17:19:23 +0100 When recovering 2 components, we can have this situation:
  • the recovering of components is concurrent,
  • the recovering process try to start one component during the other components is added to the Fractal composite
  • as the 2nd component is added in the composite with a name set to null before to change its name, we can have the NPE.
If, when adding a component to the Fractal composite, we set its name before to add it, we should not have anymore the problem.
Christophe DENEUX made changes - Thu, 19 Nov 2015 - 17:19:23 +0100
Field Original Value New Value
Status New [ 10000 ] Open [ 10002 ]
Priority Major [ 3 ]
Christophe DENEUX made changes - Thu, 19 Nov 2015 - 17:20:49 +0100
Status Open [ 10002 ] In Progress [ 10003 ]
Hide
Christophe DENEUX added a comment - Thu, 19 Nov 2015 - 17:22:54 +0100

Fixed in trunk

Show
Christophe DENEUX added a comment - Thu, 19 Nov 2015 - 17:22:54 +0100 Fixed in trunk
Christophe DENEUX made changes - Thu, 19 Nov 2015 - 17:22:54 +0100
Status In Progress [ 10003 ] Resolved [ 10004 ]
Fix Version/s 5.0.1 [ 10579 ]
Resolution Fixed [ 1 ]
Transition Status Change Time Execution Times Last Executer Last Execution Date
New New Open Open
5m 41s
1
Christophe DENEUX
Thu, 19 Nov 2015 - 17:19:23 +0100
Open Open In Progress In Progress
1m 26s
1
Christophe DENEUX
Thu, 19 Nov 2015 - 17:20:49 +0100
In Progress In Progress Resolved Resolved
2m 5s
1
Christophe DENEUX
Thu, 19 Nov 2015 - 17:22:54 +0100



People

Dates

  • Created:
    Thu, 19 Nov 2015 - 17:13:42 +0100
    Updated:
    Thu, 19 Nov 2015 - 17:22:54 +0100
    Resolved:
    Thu, 19 Nov 2015 - 17:22:54 +0100