using groovyws-standalone-0.2.0.jar, Groovy 1.5.4 (and Java 1.5.10)
Is GroovyWS currently broken? Or the examples wrong? Or ?
thx,
Steve
---------------------
groovy> import groovyx.net.ws.WSClient;
groovy> def proxy = new
WSClient("http://terraservice.net/TerraService.asmx?WSDL",
this.class.classLoader)
groovy> // Create the Place object
groovy> def place = proxy.create("com.terraserver_usa.terraserver.Place")
groovy> // Initialize the Place object
groovy> place.city = "mountain view"
groovy> place.state = "ca"
groovy> place.country = "us"
groovy> // Geocode the place
groovy> def result = proxy.ConvertPlaceToLonLatPt(place)
groovy> println "Longitude: ${result.lon}"
groovy> println "Latitude: ${result.lat}"
Exception thrown: java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.<init>(RuntimeTypeInfoSetImpl.java:25)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:89)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:42)
at
com.sun.xml.bind.v2.model.impl.ModelBuilder.<init>(ModelBuilder.java:114)
at
com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.<init>(RuntimeModelBuilder.java:49)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:389)
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:253)
at
com.sun.tools.xjc.reader.xmlschema.bindinfo.BindInfo.getJAXBContext(BindInfo.java:316)
at
com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl$1.<init>(AnnotationParserFactoryImpl.java:63)
at
com.sun.tools.xjc.reader.xmlschema.bindinfo.AnnotationParserFactoryImpl.create(AnnotationParserFactoryImpl.java:62)
at
com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.createAnnotationParser(NGCCRuntimeEx.java:320)
at
com.sun.xml.xsom.impl.parser.state.annotation.action0(annotation.java:48)
at
com.sun.xml.xsom.impl.parser.state.annotation.enterElement(annotation.java:68)
at
com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
at
com.sun.xml.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:74)
at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:213)
at
com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
at
com.sun.xml.xsom.impl.parser.state.NGCCHandler.revertToParentFromEnterElement(NGCCHandler.java:111)
at
com.sun.xml.xsom.impl.parser.state.foreignAttributes.enterElement(foreignAttributes.java:50)
at
com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
at
com.sun.xml.xsom.impl.parser.state.NGCCHandler.spawnChildFromEnterElement(NGCCHandler.java:74)
at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:436)
at
com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:205)
at
com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:181)
at
com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:372)
at
com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:388)
at
com.sun.xml.xsom.impl.parser.state.NGCCRuntime.sendEnterElement(NGCCRuntime.java:378)
at com.sun.xml.xsom.impl.parser.state.Schema.enterElement(Schema.java:189)
at
com.sun.xml.xsom.impl.parser.state.NGCCRuntime.startElement(NGCCRuntime.java:219)
at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
at com.sun.tools.xjc.util.SubtreeCutter.startElement(SubtreeCutter.java:68)
at
com.sun.tools.xjc.reader.ExtensionBindingChecker.startElement(ExtensionBindingChecker.java:128)
at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
at
com.sun.tools.xjc.reader.xmlschema.parser.IncorrectNamespaceURIChecker.startElement(IncorrectNamespaceURIChecker.java:97)
at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
at
com.sun.tools.xjc.reader.xmlschema.parser.CustomizationContextChecker.startElement(CustomizationContextChecker.java:172)
at org.xml.sax.helpers.XMLFilterImpl.startElement(XMLFilterImpl.java:527)
at
com.sun.tools.xjc.reader.internalizer.DOMForestScanner$LocationResolver.startElement(DOMForestScanner.java:125)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:224)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:261)
at com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:230)
at com.sun.xml.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:107)
at
com.sun.tools.xjc.reader.internalizer.DOMForestScanner.scan(DOMForestScanner.java:73)
at
com.sun.tools.xjc.reader.internalizer.DOMForestScanner.scan(DOMForestScanner.java:81)
at
com.sun.tools.xjc.reader.internalizer.DOMForestParser.parse(DOMForestParser.java:83)
at
com.sun.tools.xjc.ModelLoader$XMLSchemaParser.parse(ModelLoader.java:246)
at
com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:298)
at com.sun.xml.xsom.impl.parser.ParserContext.parse(ParserContext.java:87)
at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:147)
at com.sun.xml.xsom.parser.XSOMParser.parse(XSOMParser.java:136)
at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:497)
at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:216)
at
com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:69)
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:172)
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:143)
at groovyx.net.ws.WSClient.<init>(WSClient.java:126)
at Script2.run(Script2:2)
--
View this message in context: http://www.nabble.com/GroovyWS-client-problem---fails-w--NoClassDefFoundError-tp15620449p15620449.html
Sent from the groovy - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
I am trying the demos here http://groovy.codehaus.org/GroovyWS
with public web services (just cutting and pasting)
but they fail with NoClassDefFoundError trying to create the proxy.
using groovyws-standalone-0.2.0.jar, Groovy 1.5.4 (and Java 1.5.10)
Is GroovyWS currently broken? Or the examples wrong? Or ?
Anybody have any clues?
Anybody got GroovyWS to run successfully with jdk1.5.0_10 and or jdk1.6.0_03
on Linux with Groovy 1.5.4?
I mucked around with the env to make sure Java in the path was the same as
JAVA_HOME, but that didn't help.
I just tried it on WinXP with Groovy 1.5.4 and Java jdk1.6.0_04. It fail,
but with a different error. It gets past the def proxy, but throws an NPE
because place is null.
How do I get GroovyWS to work?
---------------------------------
Here's snippts of the errors from running the example TerraServer script.
jdk1.5.0_10 : Linux
(first run)
Exception thrown: java.lang.LinkageError: loader constraints violated when
linking javax/xml/namespace/QName class
java.lang.LinkageError: loader constraints violated when linking
javax/xml/namespace/QName class
at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.<clinit>(RuntimeBuiltinLeafInfoImpl.java:186)
...
at groovyx.net.ws.WSClient.<init>(WSClient.java:126)
at Script0.run(Script0:2)
(all runs after first)
Exception thrown: java.lang.NoClassDefFoundError
java.lang.NoClassDefFoundError
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.<init>(RuntimeTypeInfoSetImpl.java:25)
...
at groovyx.net.ws.WSClient.<init>(WSClient.java:126)
at Script1.run(Script1:2)
jdk1.6.0_03 : Linux
(first run)
Exception thrown: java.lang.LinkageError: loader constraint violation: when
resolving field "DATETIME" the class loader (instance of
org/codehaus/groovy/tools/RootLoader) of the referring class,
javax/xml/datatype/DatatypeConstants, and the class loader (instance of
<bootloader>) for the field's resolved type, javax/xml/namespace/QName, have
different Class objects for that type
java.lang.LinkageError: loader constraint violation: when resolving field
"DATETIME" the class loader (instance of
org/codehaus/groovy/tools/RootLoader) of the referring class,
javax/xml/datatype/DatatypeConstants, and the class loader (instance of
<bootloader>) for the field's resolved type, javax/xml/namespace/QName, have
different Class objects for that type
at
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.<clinit>(RuntimeBuiltinLeafInfoImpl.java:186)
...
at groovyx.net.ws.WSClient.<init>(WSClient.java:126)
at Script1.run(Script1:2)
(all runs after first)
Exception thrown: java.lang.NoClassDefFoundError: Could not initialize class
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl
java.lang.NoClassDefFoundError: Could not initialize class
com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl
at
com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.<init>(RuntimeTypeInfoSetImpl.java:25)
...
at groovyx.net.ws.WSClient.<init>(WSClient.java:126)
at Script3.run(Script3:2)
jdk1.6.0_04 : WinXP
Exception thrown: java.lang.NullPointerException
java.lang.NullPointerException
at Script0.run(Script0:8)
--
View this message in context: http://www.nabble.com/GroovyWS-client-problem---fails-w--NoClassDefFoundError-tp15620449p15700859.html
I still can't get GroovyWS to work. (I am still trying the TerraService
example.)
Jason Brazile-3 wrote:
>
> Could it be that your jar got corrupted during download? Sorry no other
> ideas.
>
I don't think so. I've downloaded again, making multiple different
downloads on two different OSs.
Maybe the first java.lang.LinkageError is more telling. Running the script
from the cmd line instead of GroovyConsole, it never becomes a
java.lang.NoClassDefFoundError, like it does after the first run in
GroovyConsole. While that might point to bug in the GroovyConsole, I'd be
happy to have it run anywhere.
Here's what it the Terra2 script looks like from the cmd line (instead of
the GroovyConsole).
Feb 27, 2008 8:54:45 AM org.apache.cxf.endpoint.dynamic.DynamicClientFactory
addSchemas
INFO: Loading the JAXB 2.1 simple binding for client.
Caught: java.lang.LinkageError: loader constraints violated when linking
javax/xml/namespace/QName class
at wstest.run(wstest.groovy:3)
at wstest.main(wstest.groovy)
Anyone else seen something like this? I can't see how I could be the only
one, unless there's just two of us using GroovyWS.
BTW, Why do we have to pass in a classLoader to create a WSClient?
GroovySoap didn't require it. Is there anything else I could try there?
thx,
Steve
--
View this message in context: http://www.nabble.com/GroovyWS-client-problem---fails-w--NoClassDefFoundError-tp15620449p15716200.html
Steve Tekell wrote:
>
> Anyone else seen something like this? I can't see how I could be the only
> one, unless there's just two of us using GroovyWS.
>
I tried running something simple:
import groovyx.net.ws.WSClient
proxy = new WSClient('http://www.webservicex.net/stockquote.asmx?WSDL',
this.class.classLoader)
quote = proxy.GetQuote('GOOG')
println quote
And I get the following running from the command line (XP) with Groovy
Version: 1.5.4 JVM: 1.5.0_14-b03:
Caught: java.lang.NoSuchMethodError:
org.w3c.dom.Node.getTextContent()Ljava/lang/String;
at stock.run(stock.groovy:2)
I thought there might be something in the classpath causing this, so I
opened a new command line, cleared the classpath and I get the same error:
Caught: java.lang.LinkageError: loader constraints violated when linking
javax/xml/namespace/QName class
at stock.run(stock.groovy:2)
-Paul
--
View this message in context: http://www.nabble.com/GroovyWS-client-problem---fails-w--NoClassDefFoundError-tp15620449p15726099.html
Steve Tekell wrote:
>
> Caught: java.lang.LinkageError: loader constraints violated when linking
> javax/xml/namespace/QName class
> at wstest.run(wstest.groovy:3)
> at wstest.main(wstest.groovy)
>
Steve,
I was able to resolve my similar problem by deleting
groovysoap-all-1.0-0.3-snapshot_jdk1.5.0.jar from groovy\lib.
-Paul
--
View this message in context: http://www.nabble.com/GroovyWS-client-problem---fails-w--NoClassDefFoundError-tp15620449p15726846.html
Cheers
Guillaume
--
Best Regards
Guillaume
PGP KeyID:C1A0A73F FingerPrint:A4A2 73C0 E7D4 6437 8185 D05E ECF2
AD84 C1A0 A73F
http://cheztog.blogspot.com
Thank you so much!
This makes me wonder if Groovy should have some sort of package manager.
Paul S wrote:
>
>
> Steve Tekell wrote:
>>
>> Caught: java.lang.LinkageError: loader constraints violated when linking
>> javax/xml/namespace/QName class
>> at wstest.run(wstest.groovy:3)
>> at wstest.main(wstest.groovy)
>>
>
> Steve,
>
> I was able to resolve my similar problem by deleting
> groovysoap-all-1.0-0.3-snapshot_jdk1.5.0.jar from groovy\lib.
>
> -Paul
>
--
View this message in context: http://www.nabble.com/GroovyWS-client-problem---fails-w--NoClassDefFoundError-tp15620449p15739331.html
That's was it!
I had groovysoap-all-jsr06-0.1.jar in the classpath (~/.groovy/lib).
Thank you so much!
This makes me wonder if Groovy should have some sort of package manager.
Paul S wrote:
>
>
> Steve Tekell wrote:
>>
>> Caught: java.lang.LinkageError: loader constraints violated when linking
>> javax/xml/namespace/QName class
>> at wstest.run(wstest.groovy:3)
>> at wstest.main(wstest.groovy)
>>
>
> Steve,
>
> I was able to resolve my similar problem by deleting
> groovysoap-all-1.0-0.3-snapshot_jdk1.5.0.jar from groovy\lib.
>
> -Paul
>
--
View this message in context: http://www.nabble.com/GroovyWS-client-problem---fails-w--NoClassDefFoundError-tp15620449p15739331.html
Sent from the groovy - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email