Hi,
This error should come from that glassfish has a old version of
xmlschema jar in its classpath, but cxf need a new version of xmlschema.
Freeman
On 2011-6-17, at 上午4:41, Stiffler07 wrote:
Hi,
i had written a dynamic web service client and it's working well in
jetty
and tomcat, but when deploying it to glassfish, trying to
createClient leads
to the following exception:
org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException
:
Executing action [operationResponse] of controller
[wsts.WebServiceController] caused exception:
java.lang.NoSuchFieldError:
QUALIFIED
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
at
com
.sun
.enterprise
.web
.PESessionLockingStandardPipeline
.invoke(PESessionLockingStandardPipeline.java:91)
at
com
.sun
.enterprise
.v3.services.impl.ContainerMapper.service(ContainerMapper.java:170)
at
com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:
822)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:
719)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:
1013)
at
com
.sun
.grizzly
.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
at
com
.sun
.grizzly
.DefaultProtocolChain
.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com
.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:
104)
at
com
.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:
90)
at
com
.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at
com
.sun
.grizzly
.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at
com
.sun
.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at
com.sun.grizzly.util.AbstractThreadPool
$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool
$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.codehaus.groovy.runtime.InvokerInvocationException:
java.lang.NoSuchFieldError: QUALIFIED
... 17 more
Caused by: java.lang.NoSuchFieldError: QUALIFIED
at
org.apache.cxf.service.model.SchemaInfo.setSchema(SchemaInfo.java:146)
at org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:
136)
at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:73)
at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:65)
at org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:60)
at
org
.apache
.cxf.wsdl11.WSDLServiceBuilder.getSchemas(WSDLServiceBuilder.java:357)
at
org
.apache
.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:
324)
at
org
.apache
.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:
188)
at
org
.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
134)
at org.apache.cxf.endpoint.ClientImpl.<init>(ClientImpl.java:154)
at
org
.apache
.cxf
.endpoint
.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:
255)
at
org
.apache
.cxf
.endpoint
.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:
198)
at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory
$createClient.call(Unknown
Source)
at wsts.WSService.createClient(WSService.groovy:52)
at wsts.WSService$createClient.callCurrent(Unknown Source)
at wsts.WSService.callOperation(WSService.groovy:353)
at wsts.WSService$$FastClassByCGLIB$$5221d866.invoke(<generated>)
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at wsts.WSService$$EnhancerByCGLIB$
$35b197ef.callOperation(<generated>)
at wsts.WSService$callOperation.call(Unknown Source)
at
wsts.WebServiceController
$_closure6.doCall(WebServiceController.groovy:127)
at wsts.WebServiceController
$_closure6.doCall(WebServiceController.groovy)
... 17 more
That's my code:
JaxWsDynamicClientFactory dcf =
JaxWsDynamicClientFactory.newInstance();
dcf.createClient(wsdlURL);
I had also set the sun-web.xml correctly as described by apache.
What can I
also do to solve the problem?
regards,
Stephan
--
View this message in context:
http://cxf.547215.n5.nabble.com/consuming-dynamic-client-in-glassfish-NoSuchFieldError-QUALIFIED-tp4496629p4496629.html
Sent from the cxf-user mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com