This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Axis2 exception - NoSuchMethodError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Axis2 exception - NoSuchMethodError" Watch "Axis2 exception - NoSuchMethodError" New topic

Axis2 exception - NoSuchMethodError

Lebogang Moshe

Joined: Jan 28, 2011
Posts: 2

Hi All,

I am having trouble testing a web service client. I have generated java stub classes and callback handlers using the Axis2 code generator plugin for eclipse IDE.

Here is the java code i wrote to test simple validation.

As soon i run this code i get the below exception:

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpConnectionManager.getParams()Lorg/apache/commons/httpclient/params/HttpConnectionManagerParams;
at org.apache.axis2.transport.http.AbstractHTTPSender.initializeTimeouts(
at org.apache.axis2.transport.http.AbstractHTTPSender.getHttpClient(
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(
at org.apache.axis2.transport.http.HTTPSender.send(
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(
at org.apache.axis2.engine.AxisEngine.send(
at org.apache.axis2.description.OutInAxisOperationClient.send(
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(
at org.apache.axis2.client.OperationClient.execute(
at com.vasx.mpesa.webservices.MpesaPaymentsServiceServiceStub.processPayment(
at test.StubTester.main(

Might I add, Im using axis2-1.4.1 and it contains the 'commons-httpclient-3.1.jar' which contains the method 'getParams()'.

Could someone please help on this?

Kind Regards
Lebogang Moshe

Joined: Jan 28, 2011
Posts: 2

Solved this. The issue was conflicting jars in the classpath.
I agree. Here's the link:
subject: Axis2 exception - NoSuchMethodError
Similar Threads
Axis2 client to invoke NTLM .NET WCF web services
Problem creating Web Service Client
Axis 2 generated code in "Expanded Mode"
ERROR in WebService AXIS2
axis2 ntlm authentication - No credentials available for NTLM