Hi,
I am trying to invoke the Web service methods using HttpClient.
So i have added the below required jar files to my project.
commons-httpclient-3.1
commons-codec-1.4
commons-logging-1.1.1
And i am using IBM RAD 7.5 as my IDE. I am getting the below exception if try to instantiate PostMethod of HttpClient.
[3/6/12 17:53:20:749 IST] 0000002c servlet E com.ibm.ws.webcontainer.servlet.ServletWrapper service SRVE0068E: Uncaught exception created in one of the service methods of the servlet Test in application WebServiceEAR. Exception created : java.lang.NoClassDefFoundError: org.apache.commons.codec.DecoderException
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java: 72)
at java.lang.J9VMInternals.initialize(J9VMInternals.j ava:134)
at org.apache.commons.httpclient.HttpMethodBase.<init >(HttpMethodBase.java:217)
at org.apache.commons.httpclient.methods.EntityEnclos ingMethod.<init>(EntityEnclosingMethod.java:118)
at org.apache.commons.httpclient.methods.PostMethod.< init>(PostMethod.java:105)
at Test.doGet(Test.java:44)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:718)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:831)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.ser vice(ServletWrapper.java:1455)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:793)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.han dleRequest(ServletWrapper.java:444)
at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl .handleRequest(ServletWrapperImpl.java:175)
at com.ibm.ws.webcontainer.webapp.WebApp.handleReques t(WebApp.java:3622)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequ est(WebGroup.java:276)
at com.ibm.ws.webcontainer.WebContainer.handleRequest (WebContainer.java:927)
at com.ibm.ws.webcontainer.WSWebContainer.handleReque st(WSWebContainer.java:1566)
at com.ibm.ws.webcontainer.channel.WCChannelLink.read y(WCChannelLink.java:175)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleDiscrimination(HttpInboundLink.java:455)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.handleNewInformation(HttpInboundLink.java:384)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLi nk.ready(HttpInboundLink.java:272)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.sendToDiscriminators(NewConnectionIniti alReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialRe adCallback.complete(NewConnectionInitialReadCallba ck.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListe ner.futureCompleted(AioReadCompletionListener.java :165)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallbac k(AbstractAsyncFuture.java:217)
at com.ibm.io.async.AsyncChannelFuture.fireCompletion Actions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture .java:138)
at com.ibm.io.async.ResultHandler.complete(ResultHand ler.java:204)
at com.ibm.io.async.ResultHandler.runEventProcessingL oop(ResultHandler.java:775)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler .java:905)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.j ava:1527)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.codec.DecoderException
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:419)
at com.ibm.ws.bootstrap.ExtClassLoader.findClass(ExtC lassLoader.java:150)
at java.lang.ClassLoader.loadClass(ClassLoader.java:6 43)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtC lassLoader.java:90)
at java.lang.ClassLoader.loadClass(ClassLoader.java:6 09)
Could someone please help me to resolve this?
Thanks,
Rajesh.B