AnsweredAssumed Answered

How to solve NoSuchMethodError when i'm calling webservice from workflow?

Question asked by rautnerj on Feb 27, 2017
Latest reply on Mar 15, 2017 by thuynh

Hello, 

i'm trying upload file through webservice client but i m getting this error:

 

Caused by: java.lang.NoSuchMethodError: org.apache.ws.commons.schema.XmlSchemaCollection.read(Lorg/w3c/dom/Document;Ljava/lang/String;)Lorg/apache/ws/
commons/schema/XmlSchema;
at org.apache.cxf.common.xmlschema.SchemaCollection.read(SchemaCollection.java:133)
at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:192)
at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:95)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:380)
at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:474)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:685)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:536)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:248)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:205)
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:155)
at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
at sk.iway.dms3.UploadUnsignedServiceMain.uploadUnsigned(UploadUnsignedServiceMain.java:141)
at sk.iway.dms3.UploadUnsignedServiceMain.runme(UploadUnsignedServiceMain.java:83)
at com.iway.Test.execute(Test.java:78)

I suspect that there is conflict between org.apache.commons.schema.XmlSchema that is include in alfresco-repository:5.1.e.jar and org.apache.ws.xmlschema.xmlschema-core which i'm using in my webservice client.

 

Could you give me some advices how to solve this problem. If i run the client it works. but if i call client from workflow service task, i'm getting NoSuchMethodError. 

 

Thank you so much for any help.

 

Jakub

Outcomes