axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajesh (JIRA)" <>
Subject [jira] [Created] (AXIS2-5777) AxisConfiguration is NULL
Date Tue, 07 Jun 2016 06:48:21 GMT
Rajesh created AXIS2-5777:

             Summary: AxisConfiguration is NULL
                 Key: AXIS2-5777
             Project: Axis2
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.7.2
            Reporter: Rajesh


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


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

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


    protected void finalize() throws Throwable {
        try {
        } finally {

    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) {
        } else {

    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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message