Never mind – please disregard, somehow I was still using the old policy with 
the “childId” reference, I thought I had changed it

Martin

From: Martin Eppel (meppel)
Sent: Monday, December 22, 2014 2:19 PM
To: [email protected]
Subject: RE: NPE in ParentComponentMonitor

Hi Imesh,

I updated my code base today (Monday 12/22) and still see the exception below 
once I deploy the deployment policy – is there something else I need to add in 
the deployment policy. I attached the deployment policy to the email, please 
take a look and verify,

Thanks

Martin

TID: [0] [STRATOS] [2014-12-22 22:09:12,686] ERROR 
{org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator}
 -  Failed to retrieve topology event message 
{org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator}
java.lang.NullPointerException
        at 
org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy.getChildPolicy(DeploymentPolicy.java:214)
        at 
org.apache.stratos.autoscaler.context.cluster.ClusterContext.addInstanceContext(ClusterContext.java:129)
        at 
org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver$14.onEvent(AutoscalerTopologyEventReceiver.java:459)
        at 
org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)
        at java.util.Observable.notifyObservers(Observable.java:159)
        at 
org.apache.stratos.messaging.event.EventObservable.notifyEventListeners(EventObservable.java:51)
        at 
org.apache.stratos.messaging.message.processor.topology.ClusterInstanceCreatedMessageProcessor.doProcess(ClusterInstanceCreatedMessageProcessor.java:131)
        at 
org.apache.stratos.messaging.message.processor.topology.ClusterInstanceCreatedMessageProcessor.process(ClusterInstanceCreatedMessageProcessor.java:60)
        at 
org.apache.stratos.messaging.message.processor.topology.ClusterInstanceTerminatedProcessor.process(ClusterInstanceTerminatedProcessor.java:73)
        at 
org.apache.stratos.messaging.message.processor.topology.ClusterRemovedMessageProcessor.process(ClusterRemovedMessageProcessor.java:65)
        at 
org.apache.stratos.messaging.message.processor.topology.ClusterInstanceInactivateProcessor.process(ClusterInstanceInactivateProcessor.java:73)
        at 
org.apache.stratos.messaging.message.processor.topology.ClusterInstanceActivatedProcessor.process(ClusterInstanceActivatedProcessor.java:73)
        at 
org.apache.stratos.messaging.message.processor.topology.ClusterCreatedMessageProcessor.process(ClusterCreatedMessageProcessor.java:65)

From: Imesh Gunaratne [mailto:[email protected]]
Sent: Thursday, December 18, 2014 9:44 PM
To: dev
Subject: Re: NPE in ParentComponentMonitor

I have now verified this fix and pushed it to master branch. Please review.

Thanks

On Fri, Dec 19, 2014 at 10:46 AM, Imesh Gunaratne 
<[email protected]<mailto:[email protected]>> wrote:
Hi Martin,

The above error (related to the child policy) may have occurred due to the 
modification we did to change the "childId" attribute to "alias" in the 
deployment policy. This was discussed in mail thread "[Discuss] The term 
"ChildId" in the Deployment Policy refers to "Alias" in the Application".

I have now done a fix for the issue described in $subject. Will verify and 
update soon.

Thanks

On Fri, Dec 19, 2014 at 3:33 AM, Martin Eppel (meppel) 
<[email protected]<mailto:[email protected]>> wrote:
I tried to fix it by adding a check (see code snippet) which resolved the NPE 
below but caused a new one – I guess it needs more than that …

Code snippet:
…
if (scalingDependencies != null && !scalingDependencies.isEmpty()) {
                       for (ScalingDependentList scalingDependentList : 
scalingDependencies) {
                           ScalingEvent highestFactorEvent = null;
                           for (String scalingDependentListComponent : 
scalingDependentList.
…

New NPE (with fix from code snippet):

TID: [0] [STRATOS] [2014-12-18 21:56:50,452] ERROR 
{org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator}
 -  Failed to retrieve topology event message 
{org.apache.stratos.messaging.message.receiver.topology.TopologyEventMessageDelegator}
java.lang.NullPointerException
        at 
org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy.getChildPolicy(DeploymentPolicy.java:213)
        at 
org.apache.stratos.autoscaler.context.cluster.VMClusterContext.addInstanceContext(VMClusterContext.java:129)
        at 
org.apache.stratos.autoscaler.event.receiver.topology.AutoscalerTopologyEventReceiver$14.onEvent(AutoscalerTopologyEventReceiver.java:459)
        at 
org.apache.stratos.messaging.listener.EventListener.update(EventListener.java:42)

From: Imesh Gunaratne [mailto:[email protected]<mailto:[email protected]>]
Sent: Thursday, December 18, 2014 11:48 AM
To: dev
Subject: NPE in ParentComponentMonitor

Hi Devs,

I'm seeing the below NPE in ParentComponentMonitor:

[2014-12-19 01:15:25,836]  INFO 
{org.apache.stratos.autoscaler.applications.topic.ApplicationsEventPublisher} - 
 Publishing Application Active event for [application]: single-group-app 
[instance]:single-group-app-1
[2014-12-19 01:15:25,866]  INFO 
{org.apache.stratos.autoscaler.applications.topic.ApplicationsEventPublisher} - 
 Publishing Group activated event for [application]: single-group-app [group]: 
single-group-app-group-1 [instance]:single-group-app-1
[2014-12-19 01:16:04,117] ERROR 
{org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor} -  
Application monitor failed : 
org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor@21d2042d<mailto:org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor@21d2042d>
java.lang.NullPointerException
            at 
org.apache.stratos.autoscaler.monitor.component.ParentComponentMonitor.handleDependentScaling(ParentComponentMonitor.java:573)
            at 
org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor$1.run(ApplicationMonitor.java:117)
            at 
org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor.monitor(ApplicationMonitor.java:125)
            at 
org.apache.stratos.autoscaler.monitor.component.ApplicationMonitor.run(ApplicationMonitor.java:74)
            at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
            at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
            at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
            at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
            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)

Thanks


--
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos


--
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos


--
Imesh Gunaratne

Technical Lead, WSO2
Committer & PMC Member, Apache Stratos

Reply via email to