Forum Discussion

toks122's avatar
toks122
New Contributor
13 years ago

Could not initialize class groovy.net.http.ParserRegistry

I am currently getting this error message in SoapUi while using Groovy.

Initially the code didnt compile i.e. errored with 'unable to resolve class HTTPBuilder'. To resolve this i downloaded the jar file from http://repository.codehaus.org/org/code ... ilder/0.6/ and paste it in C:\Program Files\SmartBear\soapUI-Pro-4.5.1\bin\ext and it resolved the issue.

Re-running the same script now errored with Java.lang.NoClassDefFounderError: Could not initialize class groovy.net.http.ParserRegistry

class SomeClassName {

def RequestBody = SomeClassName.Method() // this method returns an XML

static def Methodname()
def http = new HTTPBuilder('http://SomeWebServiceLocation)
http.request(Method.POST, ContentType.URLENC)
{
uri.path = "/"
body = RequestBody
}

}

When i commented out where i was calling this method i.e. SomeClassName.Methodname()
, everything else from the class seems to work fine.

Can someone please help..

1 Reply

  • HammerTime's avatar
    HammerTime
    Occasional Contributor
    I am also having this same issue, is anyone able to help?