This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Groovy and the fly likes Unresolved dependencies in example scripts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Languages » Groovy
Bookmark "Unresolved dependencies in example scripts" Watch "Unresolved dependencies in example scripts" New topic

Unresolved dependencies in example scripts

jim varan

Joined: Oct 02, 2009
Posts: 2
I am a new comer to Groovy and I'm running version 1.6.5. on Windows XP.
I am having some troble running two of the code samples from the Groovy site.
It appears that I don't have all the necessary jars.
I would greatly appreciate if somebody could me what I'm missing or I am doing wrong.

Code running against a Web Service:

Error displayed:
unable to resolve class at line: 1, column: 1
The second example is:

Exception thrown: Error grabbing Grapes --
[unresolved dependency: org.codehaus.groovy.modules#groovyws;0.5.1-SNAPSHOT:
not found, unresolved dependency: org.codehaus.groovy.modules#groovyws;0.5.0-SNAPSHOT: not found]

My questions are:
- In the first example, which jar is missing, and where can I get it from?
- In the second example, can I download the necessary jars into the groovy\lib folder and comment out the @Grab,
because I will not have internet access on the machine that will run the final code.
If so, what do I need to download, where do I get it from?
- On a windows XP system, in which folder should the grapeConfig.xml file reside.
My groovy home is the folder C:\Groovy-1.6.5

Your help is much appreciated!
andrew ennamorato
Ranch Hand

Joined: Oct 03, 2007
Posts: 100
For the first one, check the link on Groovy SOAP. There is a link to a Groovy SOAP jar on there.
But sounds like that is deprecated, so maybe check out this link on GroovyWS.
jim varan

Joined: Oct 02, 2009
Posts: 2
Thanks for the response.
However I could not get the examples to work.

For the first example:
The page has a link to the jar file required, however this is a broken link which specifies the jar file as:
I could not find this jar, but from the site
I was able to find a jar that was named groovysoap-all-jsr06-0.1.jar.
But this did not work either. When I run example #1, I get:

Exception thrown: org.codehaus.groovy.runtime.InvokerHelper.getInstance()Lorg/codehaus/groovy/runtime/Invoker;
java.lang.NoSuchMethodError: org.codehaus.groovy.runtime.InvokerHelper.getInstance()Lorg/codehaus/groovy/runtime/Invoker;

For the Second example:
From the page I downloaded the full jar,
which is groovyws-standalone-0.5.0.jar.
When I comment the line with @Grab and run the example I get.

Exception thrown: null
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(
at org.apache.cxf.endpoint.ClientImpl.<init>(

If I uncomment the @Grab line then I get:
Exception thrown: Error grabbing Grapes -- [unresolved dependency: org.codehaus.groovy.modules#groovyws;0.5.0-SNAPSHOT: not found]
java.lang.RuntimeException: Error grabbing Grapes -- [unresolved dependency: org.codehaus.groovy.modules#groovyws;0.5.0-SNAPSHOT: not found]

Has anyone ran these examples successfully? With which jars?
Can anyone tell me where a grape file is placed on a Windows system if the groovy home is C:\Groovy-1.6.5?
Have you checked out Aspose?
subject: Unresolved dependencies in example scripts
It's not a secret anymore!