-1

I'm running a grails app (Grails 2.5.6 OpenJDK 1.8.0.292) from my local machine (using IntelliJIDEA) and it runs perfectly. The code is as follows :-

int THE_TIMEOUT  = 4*1000;
def http = new HTTPBuilder ('https://my.url.here')
http.getClient().getParams().setParameter("http.connection.timeout", new Integer(THE_TIMEOUT))
http.auth.basic('theUser', 'thePassword')
http.ignoreSSLIssues()      
    try {
        http.get(path: '/let/me/have/info') {
            resp, reader ->
                print reader.result.something
        }
    }
    catch (Exception e){
        print 'Something else'
    }

Running this on my localhost, everything works like a dream. But when I deploy the web archive to my web server, I hit a problem at the line

http.ignoreSSLIssues()

I get an error :-

No signature of method: groovyx.net.http.HTTPBuilder.ignoreSSLIssues() is applicable for 
argument types: () values: []. 

I can't think why I should encounter this error when the app is deployed to my server, but when I run it locally it runs fine.

Any clues as to why I'm hitting this annoying error?

Simon
  • 97
  • 3
  • 13

1 Answers1

0

So with a bit of head scraching, and a lot of help from a work colleague, (who will remain nameless, but you know who you are!), it was a case of conflicting library versions.

Some fool had a http-builder jar file in the lib directory with a version 0.5.something, and also a line in buildconfig.groovy compiling http-builder 0.7.1. Once I got rid of the jar file, everything started working.

Simon
  • 97
  • 3
  • 13