0

I'm using grails restclient plugin(':rest:0.7') to consume rest grails rest services.

Here is my code:

    def restClient = new RESTClient(ServiceURL)
    def httpResponseDecorator = restClient.get(query: requestMessage)
    pdfData = handleServiceResponse(httpResponseDecorator)

But getting the follwing error :

java.lang.NoSuchMethodError: org/apache/http/protocol/BasicHttpContext.()V at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:776) at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:705) at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:898) at java.lang.Thread.run(Thread.java:736) Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoSuchMethodError: org/apache/http/protocol/BasicHttpContext.()V

Any idea how to resolve this issue?

TP_JAVA
  • 1,002
  • 5
  • 23
  • 49
  • Which version of Grails are you using? And are you using other dependencies/plugins? There is a dependency issue going on, probably two version of httpclient somewhere. Can you create a new application using only that plugin? – Erik Pragt May 01 '13 at 19:17
  • Eric..I'm using grails 1.3.4 – TP_JAVA May 01 '13 at 19:24
  • Same one works in my local but when I deploy it in CI using Maven ..it throws that error. – TP_JAVA May 01 '13 at 19:25
  • 1
    Please don't use Grails 1.3.4 :) It's a very buggy version, plus 2.x is out for quite some time now. If upgrading is not an option, please try my other suggestions. But please upgrade first. – Erik Pragt May 01 '13 at 19:26
  • And does it work in a new application? – Erik Pragt May 01 '13 at 19:30
  • Erik: Same code works in my local machine and not in CI server... – TP_JAVA May 01 '13 at 19:33

0 Answers0