I have been trying to get GroovyWS to work within grails but I cant seem to
resolve an issue. using GroovyWS 0.2, Java 1.5.1. The code below runs fine
in GroovyConsole, but once its intergrated into our main project within a
controller it fails to work. I have taken a look at both the WSClient source
and also CXF source but cannot figure out the null pointer exception!
class GroovyController {
def view = {
def proxy = new
WSClient("http://www.webservicex.net/stockquote.asmx?WSDL",
this.class.classLoader)
def quote = proxy.GetQuote('GOOG')
render ("proxy:- " + proxy + " quote:- " + quote)
}
}
returns "proxy:- groovyx.net.ws.WSClient@f6e45d quote:- null"
Log error is
11-Jan-2008 15:20:56 org.apache.cxf.endpoint.dynamic.DynamicClientFactory
addSchemas
INFO: Loading the JAXB 2.1 simple binding for client.
11-Jan-2008 15:20:57 org.apache.cxf.endpoint.dynamic.DynamicClientFactory
outputDebug
INFO: Created classes: net.webservicex.GetQuote,
net.webservicex.GetQuoteResponse, net.webservicex.ObjectFactory
java.lang.NullPointerException
at java.io.File.<init>(File.java:194)
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.setupClasspath(DynamicClientFactory.java:372)
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:214)
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:143)
at groovyx.net.ws.WSClient.<init>(WSClient.java:126)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at
org.codehaus.groovy.runtime.MetaClassHelper.doConstructorInvoke(MetaClassHelper.java:465)
at
groovy.lang.MetaClassImpl.doConstructorInvoke(MetaClassImpl.java:2086)
at
groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:1022)
at
groovy.lang.MetaClassImpl.invokeConstructor(MetaClassImpl.java:952)
at
groovy.lang.ExpandoMetaClass.invokeConstructor(ExpandoMetaClass.java:521)
at
org.codehaus.groovy.runtime.Invoker.invokeConstructorOf(Invoker.java:126)
at
org.codehaus.groovy.runtime.InvokerHelper.invokeConstructorOf(InvokerHelper.java:103)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeNewN(ScriptBytecodeAdapter.java:233)
at
uk.co.fish4.fig.controllers.joepublic.GroovyController$_closure2.doCall(GroovyController.groovy:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
It seems to create the stubs correctly, we can see them in the temp dir, but
the classes files are empty. It then falls over, with a not very helpful
error message.
Is this a CXF problem, is it a GroovyWS problem, is it a File Permissions
problem (full write permissions on the tempdir - so doubtful), is it a
classpath issue?
Any help gladly appreciated!!
Alex
--
View this message in context: http://www.nabble.com/HELP-PLEASE%21-GroovyWS-Null-pointer-exception-whilst-running-stock-quote-example-tp14759513p14759513.html
Sent from the groovy - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
I will release shortly a new GroovyWS version solving this issue.
Cheers
Guillaume
--
Best Regards
Guillaume
http://cheztog.blogspot.com
Have you managed to solve this issue at all? Do you know what is causing it?
Thanks
Alex
--
View this message in context: http://www.nabble.com/HELP-PLEASE%21-GroovyWS-Null-pointer-exception-whilst-running-stock-quote-example-tp14759513p14841684.html