[prev in list] [next in list] [prev in thread] [next in thread] 

List:       axis-dev
Subject:    [jira] [Resolved] (AXIS2-5623) axis2 NullPointerException when create stub in load test
From:       "Sagara Gunathunga  (JIRA)" <jira () apache ! org>
Date:       2014-01-08 9:40:52
Message-ID: JIRA.12687823.1389168944308.60714.1389174052275 () arcas
[Download RAW message or body]


     [ https://issues.apache.org/jira/browse/AXIS2-5623?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]

Sagara Gunathunga  resolved AXIS2-5623.
---------------------------------------

    Resolution: Invalid

JIRA is to track project issues not to help users, use user mailing list to get user \
helps.  

> axis2 NullPointerException when create stub in load test
> --------------------------------------------------------
> 
> Key: AXIS2-5623
> URL: https://issues.apache.org/jira/browse/AXIS2-5623
> Project: Axis2
> Issue Type: Bug
> Affects Versions: 1.5.4
> Reporter: tina
> 
> We are using axis2-1.5.4 to generate stub client to send soap message, as we known \
> the axis2 is not thread-safe, so we use a pool to store stub instance. Each thread \
> will borrow stub object from the pool before use and return it to pool after using. \
> however, when the traffic is heavy(400 threads), there are always some NPE \
> exception, it seems although the instance is already returned to the pool, it is \
>                 still used by other thread. The exception stack is as below:
> java.lang.NullPointerException: null
> at org.apache.axis2.client.ServiceClient.cleanupTransport(ServiceClient.java:824)
> at com.cmcc.aus.msgadpter.soap.security.SecurityClient.checkToken(SecurityClient.java:355)
>  at com.cmcc.aus.service.esb.VerifyEaCallingTokenSvc.verifyEaCallingToken(VerifyEaCallingTokenSvc.java:81)
>  at com.cmcc.aus.msgadpter.rest.VerifyEaCallingTokenRestInterface.postVerifyEaCallingToken(VerifyEaCallingTokenRestInterface.java:38)
>  And we also use cached http connection in the create of stub, the stub client code \
> is as below: public SecurityStub(java.lang.String targetEndpoint) throws \
> org.apache.axis2.AxisFault { this(null,targetEndpoint);
> 		Options options = this._getServiceClient().getOptions();
> 		options.setTimeOutInMilliSeconds(60000);
> 		options.setProperty(HTTPConstants.REUSE_HTTP_CLIENT, Boolean.TRUE);
> 		
> 		MultiThreadedHttpConnectionManager conmgr = new \
> MultiThreadedHttpConnectionManager();  \
> conmgr.getParams().setDefaultMaxConnectionsPerHost(AusConstants.SECURITY_CLIENT_MAX_CONNECTION_NUM_PER_HOST);
>   conmgr.getParams().setMaxTotalConnections(AusConstants.SECURITY_CLIENT_MAX_CONNECTION_NUM);
>   HttpClient client = new HttpClient(conmgr);
> 		options.setProperty(HTTPConstants.CACHED_HTTP_CLIENT, client);
> }
> Can anyone help us why this happen? Thanks in advance!



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic