stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Udara Liyanage <ud...@wso2.com>
Subject Re: NPE in ParentComponentMonitor
Date Fri, 19 Dec 2014 05:11:36 GMT
Hi Imesh,

Me too encounter the same NPE

On Fri, Dec 19, 2014 at 3:33 AM, Martin Eppel (meppel) <meppel@cisco.com>
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:imesh@apache.org]
> *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
>
> 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
>


-- 

Udara Liyanage
Software Engineer
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

web: http://udaraliyanage.wordpress.com
phone: +94 71 443 6897

Mime
View raw message