Meaningless Drivel is fun!*
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
Author

Unresolved dependencies in example scripts

jim varan
Greenhorn

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.
Thanks!

Code running against a Web Service:


Error displayed:
unable to resolve class groovy.net.soap.SoapClient 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
Greenhorn

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

For the first example:
The http://groovy.codehaus.org/Groovy+SOAP page has a link to the jar file required, however this is a broken link which specifies the jar file as:
groovysoap-all-1.0-0.3-snapshot_jdk1.5.0.jar
I could not find this jar, but from the site http://dist.codehaus.org/groovy/jars/
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;
at xmp_SoapClient.run(xmp_SoapClient.groovy


For the Second example:
From the http://groovy.codehaus.org/GroovyWS+installation 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
java.lang.NullPointerException
at org.apache.cxf.wsdl11.WSDLServiceFactory.<init>(WSDLServiceFactory.java:67)
at org.apache.cxf.endpoint.ClientImpl.<init>(ClientImpl.java:143)

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?
Thanks!
 
GeeCON Prague 2014
 
subject: Unresolved dependencies in example scripts