Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id BFF36200B27 for ; Wed, 8 Jun 2016 07:06:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id BEA9C160A4F; Wed, 8 Jun 2016 05:06:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 132EE160A36 for ; Wed, 8 Jun 2016 07:06:21 +0200 (CEST) Received: (qmail 57823 invoked by uid 500); 8 Jun 2016 05:06:21 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 57811 invoked by uid 99); 8 Jun 2016 05:06:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2016 05:06:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id E6C192C1F54 for ; Wed, 8 Jun 2016 05:06:20 +0000 (UTC) Date: Wed, 8 Jun 2016 05:06:20 +0000 (UTC) From: "Thamarai (JIRA)" To: java-dev@axis.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AXIS2-5777) AxisConfiguration is NULL MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 08 Jun 2016 05:06:22 -0000 [ https://issues.apache.org/jira/browse/AXIS2-5777?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15320008#comment-15320008 ] Thamarai commented on AXIS2-5777: --------------------------------- Hi, Please let us know if any update/suggestion on this. > AxisConfiguration is NULL > ------------------------- > > Key: AXIS2-5777 > URL: https://issues.apache.org/jira/browse/AXIS2-5777 > Project: Axis2 > Issue Type: Bug > Components: kernel > Affects Versions: 1.7.2 > Reporter: Rajesh > Attachments: AxisClient.zip > > > Hi, > Am using the axis2 1.7.2 > I have deployed the axis2.war in the tomcat and started the service. The StockQuoteService can be listened via the below url > http://localhost:8080/axis2/services/StockQuoteService > I have created a client to request that service (Attached the complete project zip). > To trigger multiple requests, I have invoked the client call method in the For loop from main method > To avoid creating the multiple connections, am caching the http client and reusing it. > When I run the program with this setup, around 46 requests are executed successfully and returning the response. After that NPE in thrown. > After investigating about it, found that the JVM is expelling the ServiceClient object > ========================================================== > ServiceClient.java > ========================================================== > protected void finalize() throws Throwable { > try { > cleanup(); > } finally { > super.finalize(); > } > } > public void cleanup() throws AxisFault { > // if a configuration context was created for this client there'll also > // be a service group, so discard that > if (!createConfigCtx) { > String serviceGroupName = axisService.getAxisServiceGroup().getServiceGroupName(); > AxisConfiguration axisConfiguration = configContext.getAxisConfiguration(); > AxisServiceGroup asg = axisConfiguration.getServiceGroup(serviceGroupName); > if ((asg != null) && removeAxisService) { > axisConfiguration.removeServiceGroup(serviceGroupName); > } > } else { > configContext.terminate(); > } > } > ========================================================== > When the finalize method is called, it is invoking the cleaup method which again calls the terminate method of ConfigurationContext. Because of this > AxisConfiguration in the ConfigurationContext is becoming NULL. > Once this cleanup is done, the subsequent requests are not able to process due to empty AxisConfiguration returned from ConfigurationContext. > This whole issue is due to reusing the HttpClient. When the HttpClient is not reused, this error is not thrown. > But as per our project requirement, we will be getting multiple requests from the end user and we need to reuse the HttpClient. > Kindly advice at the earliest, as we are facing this issue in the production -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org For additional commands, e-mail: java-dev-help@axis.apache.org