You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by wangyan2011 <64...@qq.com> on 2011/06/17 05:52:20 UTC
cxf server publishing success,but client error!
Exception in thread "Main Thread" java.lang.NoSuchMethodError: read
at
org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:130)
at
org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:177)
at
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:344)
at
org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:438)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:501)
at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at
org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:90)
at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:152)
at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:89)
at cxf.service.Client.main(Client.java:39)
client code is :
public static void main(String args[]) throws Exception {
ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setAddress("http://localhost:8080/pm/services/approvalService");
ApprovalService approvalService =
factory.create(ApprovalService.class);
System.out.println("Invoke getApprovalItems()....");
ApprovalItem[] items =
approvalService.getApprovalItems("wangxiaoyan");
for (int i = 0; items!=null && i < items.length; i++) {
System.out.println(items[i].getCurrentApprovers());
}
}
--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-server-publishing-success-but-client-error-tp4497582p4497582.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: cxf server publishing success,but client error!
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Could you elaborate how you use cxf? Standalone or you deploy it in
some container? If in container, you need ensure there's no xmlschema
version conflict.
Freeman
On 2011-6-17, at 下午4:18, wangyan2011 wrote:
> I use xmlschema-core-2.0.jar, but still be wrong.
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/cxf-server-publishing-success-but-client-error-tp4497582p4498048.html
> Sent from the cxf-user mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
Re: cxf server publishing success,but client error!
Posted by Peter4Work <pe...@gmail.com>.
In fact, I have already created share libraries in WAS with a latest
XMLSchema jar bundled with CXF 2.41 and set "parent last" class loader. But
still got the problem.
In WAS 7, there are few jars with XMLSchema classs such as
com.ibm.jaxws.thinclient_7.0.0.jar, org.apache.axis2.jar. So, should we
remove them to avoid the issue?
--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-server-publishing-success-but-client-error-tp4497582p4734010.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: cxf server publishing success,but client error!
Posted by wangyan2011 <64...@qq.com>.
inspect XmlSchema-1.4.3.jar,you need ensure there's no xmlschema version conflict.
------------------ Original ------------------
From: "Peter4Work [via CXF]"<ml...@n5.nabble.com>;
Date: Thu, Aug 25, 2011 03:57 PM
To: "wangyan2011"<64...@qq.com>;
Subject: Re: cxf server publishing success,but client error!
Hi, I encounter similar problem. Could share how you fix it? Thanks
If you reply to this email, your message will be added to the discussion below:
http://cxf.547215.n5.nabble.com/cxf-server-publishing-success-but-client-error-tp4497582p4733497.html
To unsubscribe from cxf server publishing success,but client error!, click here.
--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-server-publishing-success-but-client-error-tp4497582p4733523.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: cxf server publishing success,but client error!
Posted by Peter4Work <pe...@gmail.com>.
Hi, I encounter similar problem. Could share how you fix it? Thanks
--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-server-publishing-success-but-client-error-tp4497582p4733497.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: cxf server publishing success,but client error!
Posted by wangyan2011 <64...@qq.com>.
thanks,This xmlschema-core-2.0.jar conflict.
--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-server-publishing-success-but-client-error-tp4497582p4498116.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: cxf server publishing success,but client error!
Posted by wangyan2011 <64...@qq.com>.
I use xmlschema-core-2.0.jar, but still be wrong.
--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-server-publishing-success-but-client-error-tp4497582p4498048.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: cxf server publishing success,but client error!
Posted by wangyan2011 <64...@qq.com>.
I use xmlschema-core-2.0.jar.
--
View this message in context: http://cxf.547215.n5.nabble.com/cxf-server-publishing-success-but-client-error-tp4497582p4497971.html
Sent from the cxf-user mailing list archive at Nabble.com.
Re: cxf server publishing success,but client error!
Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Seems you use old version of xmlschema on your classpath.
If you're using cxf 2.4.x, ensure you have xmlschema-core-2.0.jar on
your classpath.
Freeman
On 2011-6-17, at 上午11:52, wangyan2011 wrote:
> Exception in thread "Main Thread" java.lang.NoSuchMethodError: read
> at
> org
> .apache
> .cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:130)
> at
> org
> .apache
> .cxf
> .databinding
> .AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:177)
> at
> org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:
> 344)
> at
> org
> .apache
> .cxf
> .service
> .factory
> .AbstractServiceFactoryBean
> .initializeDataBindings(AbstractServiceFactoryBean.java:86)
> at
> org
> .apache
> .cxf
> .service
> .factory
> .ReflectionServiceFactoryBean
> .buildServiceFromClass(ReflectionServiceFactoryBean.java:438)
> at
> org
> .apache
> .cxf
> .service
> .factory
> .ReflectionServiceFactoryBean
> .initializeServiceModel(ReflectionServiceFactoryBean.java:501)
> at
> org
> .apache
> .cxf
> .service
> .factory
> .ReflectionServiceFactoryBean
> .create(ReflectionServiceFactoryBean.java:241)
> at
> org
> .apache
> .cxf
> .frontend
> .AbstractWSDLBasedEndpointFactory
> .createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
> at
> org
> .apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:
> 90)
> at
> org
> .apache
> .cxf
> .frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:
> 152)
> at
> org
> .apache
> .cxf
> .frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:
> 89)
> at cxf.service.Client.main(Client.java:39)
> client code is :
> public static void main(String args[]) throws Exception {
>
> ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
>
> factory.setAddress("http://localhost:8080/pm/services/
> approvalService");
> ApprovalService approvalService =
> factory.create(ApprovalService.class);
> System.out.println("Invoke getApprovalItems()....");
> ApprovalItem[] items =
> approvalService.getApprovalItems("wangxiaoyan");
> for (int i = 0; items!=null && i < items.length; i++) {
> System.out.println(items[i].getCurrentApprovers());
> }
> }
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/cxf-server-publishing-success-but-client-error-tp4497582p4497582.html
> Sent from the cxf-user mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com