Return-Path: X-Original-To: apmail-stratos-dev-archive@minotaur.apache.org Delivered-To: apmail-stratos-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 360681092F for ; Wed, 25 Feb 2015 05:04:48 +0000 (UTC) Received: (qmail 68068 invoked by uid 500); 25 Feb 2015 05:04:48 -0000 Delivered-To: apmail-stratos-dev-archive@stratos.apache.org Received: (qmail 68012 invoked by uid 500); 25 Feb 2015 05:04:48 -0000 Mailing-List: contact dev-help@stratos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stratos.apache.org Delivered-To: mailing list dev@stratos.apache.org Received: (qmail 68002 invoked by uid 99); 25 Feb 2015 05:04:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2015 05:04:47 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of chamilad@wso2.com designates 209.85.213.173 as permitted sender) Received: from [209.85.213.173] (HELO mail-ig0-f173.google.com) (209.85.213.173) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Feb 2015 05:04:22 +0000 Received: by mail-ig0-f173.google.com with SMTP id a13so32757544igq.0 for ; Tue, 24 Feb 2015 21:03:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wso2.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=hy8Oy7veLfwnhbqzx4GDWLoaNAdmlTc7ICx28+rz0uc=; b=SUhgbBGx6C0G3ZFAIAi0dKwjPBhK6krS8OJXyJ6zeqQRmquY/p1QUtInOlMrvahDpY gnq4z3AWNgmvwySehCv3/BIqvPCqErd0yJ+Ec7b/X7jSTMXWodPX0FxU2Ukgx8pDV+ku HajErKZ4IbVfyduCtmL7KIiQBtXaJLHiae7hs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=hy8Oy7veLfwnhbqzx4GDWLoaNAdmlTc7ICx28+rz0uc=; b=DdYRG+/C2LC//Inx72q6x4XW11vugL+TTyLNuhYd1m5WdEdDzEWhVYI5hIms0TBH5b dQ5XFLjgD3ZGYZTJNicI6F06YzlPTgPS+zEtOQZoucWeSWVi5u7nnlcz3M0Ko4R3RL2y SjiwCghlmS8YB+aTl50m2lOGLAIr2CqsPd0YDHva3/mXBEI65XziRpZX5JdhFIqY287g isHpYCGDwhnMZMjQUhhzkoINBK3Dw2GFoOyaeB7L013F+Cb/o2m5yxBBGvrPZ64QM5Ro wzY2/foFo82fQR4fMMnJ6dfguwD72dI49mcEO1Jc0EgLahhCVuUpVJpA4ZaHfBXr1kX1 L7oA== X-Gm-Message-State: ALoCoQl3+zzdO6v11pIHCdGoCr05JOUDovenaqZN7UnE6mkaMCOZvGsY/jInMlObH6ZL0DqKt7Ya MIME-Version: 1.0 X-Received: by 10.50.36.104 with SMTP id p8mr2408940igj.16.1424840614999; Tue, 24 Feb 2015 21:03:34 -0800 (PST) Received: by 10.64.150.225 with HTTP; Tue, 24 Feb 2015 21:03:34 -0800 (PST) Received: by 10.64.150.225 with HTTP; Tue, 24 Feb 2015 21:03:34 -0800 (PST) In-Reply-To: References: <07110D8A7AC60C49AE2432100017A3F62895EFF4@xmb-rcd-x12.cisco.com> Date: Wed, 25 Feb 2015 10:33:34 +0530 Message-ID: Subject: Re: ISSUE: java cartridge agent throwing exception was ....RE: [Discuss] Java Cartridge Agent Improvements From: Chamila De Alwis To: dev Content-Type: multipart/alternative; boundary=089e01182faab80f45050fe28e27 X-Virus-Checked: Checked by ClamAV on apache.org --089e01182faab80f45050fe28e27 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Udara, I don't think that might be the case, though I'll have to check that too. There are several events that pass an empty map to the extensions, which do not seem to give rise to these errors. Furthermore these errors did not come with the integration test, which feeds a typical payload. I'll investigate more. On Feb 25, 2015 9:31 AM, "Udara Liyanage" wrote: > Hi Chamila, > > This culprit seems to be the following line in startServerExtension() > method of DefaultExtensionHandler > ExtensionUtils.executeStartServersExtension(Collections. String>emptyMap()); > > It is trying to add elements to the empty map created above > envParameters.put("STRATOS_APP_PATH", > CartridgeAgentConfiguration.getInstance().getAppPath()); > > On Wed, Feb 25, 2015 at 8:22 AM, Martin Eppel (meppel) > wrote: > >> Hi Chamila, >> >> >> >> With the latest code as of today (see last commit) and run into the >> exceptions (see below) when bringing up the cartridge agent ? Not sure i= f >> something is missing or the code is simple not yet ready ? >> >> >> >> I attached the logs as well, >> >> >> >> Thanks >> >> >> >> Martin >> >> >> >> Last commit: >> >> commit a0003d85353bea6d1937f2e06db05f6335f34078 >> >> Author: Lahiru Sandaruwan >> >> Date: Wed Feb 25 05:40:42 2015 +0530 >> >> >> >> Exceptions: >> >> >> >> [2015-02-25 02:38:05,563] INFO - [CartridgeAgentEventPublisher] Instanc= e >> started event published >> >> [2015-02-25 02:38:05,563] INFO - [DefaultExtensionHandler] [start serve= r >> extension] complete topology event received >> >> [2015-02-25 02:38:05,564] ERROR - [ExtensionUtils] Could not execute >> start servers extension >> >> java.lang.UnsupportedOperationException >> >> at java.util.AbstractMap.put(AbstractMap.java:203) >> >> at >> org.apache.stratos.cartridge.agent.util.ExtensionUtils.addPayloadParamet= ers(ExtensionUtils.java:66) >> >> at >> org.apache.stratos.cartridge.agent.util.ExtensionUtils.executeStartServe= rsExtension(ExtensionUtils.java:153) >> >> at >> org.apache.stratos.cartridge.agent.extensions.DefaultExtensionHandler.st= artServerExtension(DefaultExtensionHandler.java:426) >> >> at >> org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.jav= a:122) >> >> at java.lang.Thread.run(Thread.java:745) >> >> >> >> =E2=80=A6 >> >> [2015-02-25 02:38:10,633] INFO - [CartridgeAgentEventPublisher] Startin= g >> health statistics notifier >> >> Exception in thread "Thread-1" java.lang.RuntimeException: Could not >> parse thrift client configuration >> >> at >> org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConf= igParser.parse(ThriftClientConfigParser.java:136) >> >> at >> org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConf= ig.getInstance(ThriftClientConfig.java:44) >> >> at >> org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatistic= sPublisher.(WSO2CEPStatisticsPublisher.java:56) >> >> at >> org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPHealthSta= tisticsPublisher.(WSO2CEPHealthStatisticsPublisher.java:43) >> >> at >> org.apache.stratos.common.statistics.publisher.HealthStatisticsPublisher= Factory.createHealthStatisticsPublisher(HealthStatisticsPublisherFactory.ja= va:31) >> >> at >> org.apache.stratos.cartridge.agent.statistics.publisher.HealthStatistics= Notifier.(HealthStatisticsNotifier.java:45) >> >> at >> org.apache.stratos.cartridge.agent.event.publisher.CartridgeAgentEventPu= blisher.publishInstanceActivatedEvent(CartridgeAgentEventPublisher.java:139= ) >> >> at >> org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.jav= a:145) >> >> at java.lang.Thread.run(Thread.java:745) >> >> Caused by: java.lang.NullPointerException >> >> at java.io.File.(File.java:277) >> >> at >> org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConf= igParser.parse(ThriftClientConfigParser.java:67) >> >> ... 8 more >> >> >> >> =E2=80=A6. >> >> [2015-02-25 02:40:14,097] ERROR - [CartridgeAgentEventListeners] Error >> processing member terminated event >> >> java.lang.NullPointerException >> >> at >> org.apache.stratos.cartridge.agent.util.ExtensionUtils.checkTopologyCons= istency(ExtensionUtils.java:500) >> >> at >> org.apache.stratos.cartridge.agent.extensions.DefaultExtensionHandler.on= MemberTerminatedEvent(DefaultExtensionHandler.java:345) >> >> at >> org.apache.stratos.cartridge.agent.CartridgeAgentEventListeners$11.onEve= nt(CartridgeAgentEventListeners.java:292) >> >> 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.MemberTerminated= MessageProcessor.doProcess(MemberTerminatedMessageProcessor.java:129) >> >> at >> org.apache.stratos.messaging.message.processor.topology.MemberTerminated= MessageProcessor.process(MemberTerminatedMessageProcessor.java:59) >> >> at >> org.apache.stratos.messaging.message.processor.topology.MemberSuspendedM= essageProcessor.process(MemberSuspendedMessageProcessor.java:69) >> >> =E2=80=A6 >> >> >> >> *From:* Martin Eppel (meppel) >> *Sent:* Tuesday, February 24, 2015 4:45 PM >> *To:* dev@stratos.apache.org >> *Subject:* RE: [Discuss] Java Cartridge Agent Improvements >> >> >> >> Never mind, I see the commits >> >> >> >> Thanks >> >> >> >> Martin >> >> *From:* Martin Eppel (meppel) >> *Sent:* Tuesday, February 24, 2015 3:17 PM >> *To:* dev@stratos.apache.org >> *Subject:* RE: [Discuss] Java Cartridge Agent Improvements >> >> >> >> Hi Chamila, >> >> >> >> I was just wondering if you already merged these fixes back to the maste= r >> (or by when ) ? >> >> >> >> I think I am hitting these issues, see exceptions below, >> >> >> >> Thanks >> >> >> >> Martin >> >> >> >> >> >> [2015-02-24 23:06:02,707] ERROR - [TopologyEventMessageDelegator] Failed >> to retrieve topology event message >> >> java.lang.IllegalMonitorStateException: attempt to unlock read lock, not >> locked by current thread >> >> at >> java.util.concurrent.locks.ReentrantReadWriteLock$Sync.unmatchedUnlockEx= ception(ReentrantReadWriteLock.java:447) >> >> at >> java.util.concurrent.locks.ReentrantReadWriteLock$Sync.tryReleaseShared(= ReentrantReadWriteLock.java:431) >> >> at >> java.util.concurrent.locks.AbstractQueuedSynchronizer.releaseShared(Abst= ractQueuedSynchronizer.java:1340) >> >> at >> java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.unlock(Reentr= antReadWriteLock.java:883) >> >> at >> org.apache.stratos.common.concurrent.locks.ReadWriteLock.releaseReadLock= (ReadWriteLock.java:199) >> >> at >> org.apache.stratos.messaging.message.receiver.topology.TopologyManager.r= eleaseReadLockForService(TopologyManager.java:144) >> >> >> >> =E2=80=A6. >> >> >> >> [2015-02-24 23:06:07,706] INFO - [CartridgeAgentEventPublisher] Startin= g >> health statistics notifierException in thread "Thread-1" >> java.lang.RuntimeException: Could not parse thrift client configuration >> >> at >> org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConf= igParser.parse(ThriftClientConfigParser.java:136) >> at >> org.apache.stratos.common.statistics.publisher.wso2.cep.ThriftClientConf= ig.getInstance(ThriftClientConfig.java:44) >> >> at >> org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatistic= sPublisher.(WSO2CEPStatisticsPublisher.java:56) >> at >> org.apache.stratos.common.statistics.publisher.wso2.cep.WSO2CEPHealthSta= tisticsPublisher.(WSO2CEPHealthStatisticsPublisher.java:43) >> at >> org.apache.stratos.common.statistics.publisher.HealthStatisticsPublisher= Factory.createHealthStatisticsPublisher(HealthStatisticsPublisherFactory.ja= va:31) >> at >> org.apache.stratos.cartridge.agent.statistics.publisher.HealthStatistics= Notifier.(HealthStatisticsNotifier.java:45) >> at >> org.apache.stratos.cartridge.agent.event.publisher.CartridgeAgentEventPu= blisher.publishInstanceActivatedEvent(CartridgeAgentEventPublisher.java:129= ) >> >> at >> org.apache.stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.jav= a:171) >> >> at java.lang.Thread.run(Thread.java:745)Caused by: >> java.lang.NullPointerException >> >> at java.io.File.(File.java:277) >> >> >> >> >> >> *From:* Chamila De Alwis [mailto:chamilad@wso2.com ] >> *Sent:* Friday, February 20, 2015 1:36 PM >> *To:* dev >> *Subject:* [Discuss] Java Cartridge Agent Improvements >> >> >> >> Hi, >> >> >> >> I'm in the process of getting the JCA to a matching state with the PCA. >> As a part of this I copied over the integration test that was written by >> Imesh for the PCA, to simplify error checks and find bugs in the JCA. >> >> >> >> There was an issue in the CartridgeEventListener where >> TopologyManager.acquireReadLock() was called after a conditional return >> statement. The lock is released in the finally{} block and thus it execu= tes >> before the return statement completes, i.e. before actually acquiring th= e >> lock. >> >> >> >> Another issue I've found so far is the -Dthrift.client.config.file.path >> system property and the thrift-client-config.xml being missing in the >> Cartridge agent product assembly. >> >> >> >> I will soon submit a PR with a stable JCA. >> >> >> >> Any feedback, ideas are appreciated! :) >> >> >> >> Regards, >> >> Chamila de Alwis >> >> Software Engineer | WSO2 | +94772207163 >> >> Blog: code.chamiladealwis.com >> >> >> >> >> > > > > -- > > Udara Liyanage > Software Engineer > WSO2, Inc.: http://wso2.com > lean. enterprise. middleware > > web: http://udaraliyanage.wordpress.com > phone: +94 71 443 6897 > --089e01182faab80f45050fe28e27 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Hi Udara,

I don't think that might be the case, though I'll ha= ve to check that too. There are several events that pass an empty map to th= e extensions, which do not seem to=C2=A0 give rise to these errors. Further= more these errors did not come with the integration test, which feeds a typ= ical payload. I'll investigate more.=C2=A0=C2=A0=C2=A0

On Feb 25, 2015 9:31 AM, "Udara Liyanage&qu= ot; <udara@wso2.com> wrote:
Hi Cha= mila,

This culprit seems to be the following line i= n startServerExtension() method of DefaultExtensionHandler
Extens= ionUtils.executeStartServersExtension(Collections.<String, String>emp= tyMap());

It is trying to add elements to the empt= y map created above
envParameters.put("STRATOS_APP_PATH"= ;, CartridgeAgentConfiguration.getInstance().getAppPath());

On Wed, Feb 25,= 2015 at 8:22 AM, Martin Eppel (meppel) <meppel@cisco.com> wr= ote:

Hi Chamila,=

=C2=A0

With the latest code as o= f today (see last commit) and run into the exceptions (see below) when brin= ging up the cartridge agent ? Not sure if something is missing or the code is simple not yet ready ?

=C2=A0

I attached the logs as we= ll,

=C2=A0

Thanks

=C2=A0

Martin

=C2=A0

Last commit:

commit a0003d85353bea6d19= 37f2e06db05f6335f34078

Author: Lahiru Sandaruwan= <lahirus@apache= .org>

Date:=C2=A0=C2=A0 Wed Feb= 25 05:40:42 2015 +0530

=C2=A0

Exceptions:=

=C2=A0

[2015-02-25 02:38:05,563]= =C2=A0 INFO - [CartridgeAgentEventPublisher] Instance started event publish= ed

[2015-02-25 02:38:05,563]= =C2=A0 INFO - [DefaultExtensionHandler] [start server extension] complete t= opology event received

[2015-02-25 02:38:05,564]= ERROR - [ExtensionUtils] Could not execute start servers extension<= u>

java.lang.UnsupportedOper= ationException

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.A= bstractMap.put(AbstractMap.java:203)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.cartridge.agent.util.ExtensionUtils.addPayloadParameters(ExtensionU= tils.java:66)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.cartridge.agent.util.ExtensionUtils.executeStartServersExtension(Ex= tensionUtils.java:153)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.cartridge.agent.extensions.DefaultExtensionHandler.startServerExten= sion(DefaultExtensionHandler.java:426)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.java:122)<= u>

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.lang.T= hread.run(Thread.java:745)

=C2=A0

=E2=80=A6

[2015-02-25 02:38:10,633]= =C2=A0 INFO - [CartridgeAgentEventPublisher] Starting health statistics not= ifier

Exception in thread "= ;Thread-1" java.lang.RuntimeException: Could not parse thrift client c= onfiguration

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.common.statistics.publisher.wso2.cep.ThriftClientConfigParser.parse= (ThriftClientConfigParser.java:136)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.common.statistics.publisher.wso2.cep.ThriftClientConfig.getInstance= (ThriftClientConfig.java:44)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.common.statistics.publisher.wso2.cep.WSO2CEPStatisticsPublisher.<= ;init>(WSO2CEPStatisticsPublisher.java:56)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.common.statistics.publisher.wso2.cep.WSO2CEPHealthStatisticsPublish= er.<init>(WSO2CEPHealthStatisticsPublisher.java:43)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.common.statistics.publisher.HealthStatisticsPublisherFactory.create= HealthStatisticsPublisher(HealthStatisticsPublisherFactory.java:31)<= u>

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.cartridge.agent.statistics.publisher.HealthStatisticsNotifier.<i= nit>(HealthStatisticsNotifier.java:45)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.cartridge.agent.event.publisher.CartridgeAgentEventPublisher.publis= hInstanceActivatedEvent(CartridgeAgentEventPublisher.java:139)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.cartridge.agent.CartridgeAgent.run(CartridgeAgent.java:145)<= u>

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.lang.T= hread.run(Thread.java:745)

Caused by: java.lang.Null= PointerException

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.io.Fil= e.<init>(File.java:277)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.common.statistics.publisher.wso2.cep.ThriftClientConfigParser.parse= (ThriftClientConfigParser.java:67)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ... 8 more<= /u>

=C2=A0

=E2=80=A6.<= /span>

[2015-02-25 02:40:14,097]= ERROR - [CartridgeAgentEventListeners] Error processing member terminated = event

java.lang.NullPointerExce= ption

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.cartridge.agent.util.ExtensionUtils.checkTopologyConsistency(Extens= ionUtils.java:500)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.cartridge.agent.extensions.DefaultExtensionHandler.onMemberTerminat= edEvent(DefaultExtensionHandler.java:345)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.cartridge.agent.CartridgeAgentEventListeners$11.onEvent(CartridgeAg= entEventListeners.java:292)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.messaging.listener.EventListener.update(EventListener.java:42)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at java.util.O= bservable.notifyObservers(Observable.java:159)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.messaging.event.EventObservable.notifyEventListeners(EventObservabl= e.java:51)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.messaging.message.processor.topology.MemberTerminatedMessageProcess= or.doProcess(MemberTerminatedMessageProcessor.java:129)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.messaging.message.processor.topology.MemberTerminatedMessageProcess= or.process(MemberTerminatedMessageProcessor.java:59)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.= stratos.messaging.message.processor.topology.MemberSuspendedMessageProcesso= r.process(MemberSuspendedMessageProcessor.java:69)

=E2=80=A6

=C2=A0

From: Martin E= ppel (meppel)
Sent: Tuesday, February 24, 2015 4:45 PM
To: dev@= stratos.apache.org
Subject: RE: [Discuss] Java Cartridge Agent Improvements

=C2=A0

Never mind, I see the com= mits

=C2=A0

Thanks

=C2=A0

Martin

From: Martin E= ppel (meppel)
Sent: Tuesday, February 24, 2015 3:17 PM
To: dev@= stratos.apache.org
Subject: RE: [Discuss] Java Cartridge Agent Improvements

=C2=A0

Hi Chamila,=

=C2=A0

I was just wondering if y= ou already merged these fixes back to the master (or by when ) ?

=C2=A0

I think I am hitting thes= e issues, see exceptions below,

=C2=A0

Thanks

=C2=A0

Martin

=C2=A0

=C2=A0

[2015-02-24 23:06:02,707]= ERROR - [TopologyEventMessageDelegator] Failed to retrieve topology event = message

java.lang.IllegalMonitorS= tateException: attempt to unlock read lock, not locked by current thread=

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at java.util.concurrent.locks.ReentrantReadWriteLock$Syn= c.unmatchedUnlockException(ReentrantReadWriteLock.java:447)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at java.util.concurrent.locks.ReentrantReadWriteLock$Syn= c.tryReleaseShared(ReentrantReadWriteLock.java:431)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at java.util.concurrent.locks.AbstractQueuedSynchronizer= .releaseShared(AbstractQueuedSynchronizer.java:1340)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at java.util.concurrent.locks.ReentrantReadWriteLock$Rea= dLock.unlock(ReentrantReadWriteLock.java:883)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at org.apache.stratos.common.concurrent.locks.ReadWriteL= ock.releaseReadLock(ReadWriteLock.java:199)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at org.apache.stratos.messaging.message.receiver.topolog= y.TopologyManager.releaseReadLockForService(TopologyManager.java:144)

=C2=A0

=E2=80=A6.<= /span>

=C2=A0

[2015-02-24 23:06:07,706]= =C2=A0 INFO - [CartridgeAgentEventPublisher] Starting health statistics not= ifierException in thread "Thread-1" java.lang.RuntimeException: Could not parse thrift client configuration

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at org.apache.stratos.common.statistics.publisher.wso2.c= ep.ThriftClientConfigParser.parse(ThriftClientConfigParser.java:136)=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.stratos.common.statistic= s.publisher.wso2.cep.ThriftClientConfig.getInstance(ThriftClientConfig.java= :44)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at org.apache.stratos.common.statistics.publisher.wso2.c= ep.WSO2CEPStatisticsPublisher.<init>(WSO2CEPStatisticsPublisher.java:= 56)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.stratos.common.= statistics.publisher.wso2.cep.WSO2CEPHealthStatisticsPublisher.<init>= (WSO2CEPHealthStatisticsPublisher.java:43)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 at org.apache.stratos.common.statistics.publisher.HealthStatisticsPublishe= rFactory.createHealthStatisticsPublisher(HealthStatisticsPublisherFactory.j= ava:31)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.stratos.car= tridge.agent.statistics.publisher.HealthStatisticsNotifier.<init>(Hea= lthStatisticsNotifier.java:45)=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 at org.apache.stratos.cartridge.agent.event.publisher.CartridgeAgentEventP= ublisher.publishInstanceActivatedEvent(CartridgeAgentEventPublisher.java:12= 9)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at org.apache.stratos.cartridge.agent.CartridgeAgent.run= (CartridgeAgent.java:171)

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at java.lang.Thread.run(Thread.java:745)Caused by: java.= lang.NullPointerException

=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 at java.io.File.<init>(File.java:277)

=C2=A0

=C2=A0

From: Chamila = De Alwis [mailto:cha= milad@wso2.com]
Sent: Friday, February 20, 2015 1:36 PM
To: dev
Subject: [Discuss] Java Cartridge Agent Improvements

=C2=A0

Hi,

=C2=A0

I'm in the process of getting the JCA to a match= ing state with the PCA. As a part of this I copied over the integration tes= t that was written by Imesh for the PCA, to simplify error checks and find = bugs in the JCA.=C2=A0

=C2=A0

There was an issue in the CartridgeEventListener whe= re TopologyManager.acquireReadLock() was called after a conditional return = statement. The lock is released in the finally{} block and thus it executes= before the return statement completes, i.e. before actually acquiring the lock.=C2=A0

=C2=A0

Another issue I've found so far is the=C2=A0-Dth= rift.client.config.file.path system property and the thrift-client-config.x= ml being missing in the Cartridge agent product assembly.=C2=A0

=C2=A0

I will soon submit a PR with a stable JCA.=

=C2=A0

Any feedback, ideas are appreciated! :)

=C2=A0

Regards,

Chamila de Alwis

Softwa= re Engineer | WSO2 | +94772207163

Blog: = code.chamiladealwis.com

=C2=A0

=C2=A0




--

Udara Liyanage
Software Engineer
WSO2, Inc.:=C2=A0http://wso2.com
lean. enterprise. middleware

phone:=C2=A0+94 71 443 6897
--089e01182faab80f45050fe28e27--