Reputation: 11
In first I generated CXF service using the WSDL to Java tool from CXF or the Maven plugin and then trying to expose service via mule 3 using cxf jaxws-service like so:
<flow name="SoakarService">
<!-- Public interface -->
<composite-source>
<inbound-endpoint address="http://localhost:8777/services/soakar" exchange-pattern="request-response">
<cxf:jaxws-service serviceClass="com.arcusys.soakar.soap.Soakar"/>
</inbound-endpoint>
</composite-source>
<component>
<singleton-object class="com.arcusys.soakar.soap.SoakarImpl"/>
</component>
</flow>
And in the end I constantly get the following exception:
Exception in thread "main" org.mule.api.lifecycle.LifecycleException: Failed to invoke lifecycle phase "start" on object: Flow{SoakarService}
at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:236)
at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276)
at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155)
at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126)
at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80)
at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120)
at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94)
at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90)
at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72)
at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64)
at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:223)
at fi.arcusys.soakar.TestMuleServer.main(TestMuleServer.java:12)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.NoSuchMethodError: org.apache.cxf.common.xmlschema.SchemaCollection.read(Lorg/w3c/dom/Document;Ljava/lang/String;)Lorg/apache/ws/commons/schema/XmlSchema;
at org.apache.cxf.databinding.AbstractDataBinding.addSchemaDocument(AbstractDataBinding.java:177)
at org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:398)
at org.apache.cxf.service.factory.AbstractServiceFactoryBean.initializeDataBindings(AbstractServiceFactoryBean.java:86)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:444)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:682)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:507)
at org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:241)
at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:202)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:101)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:157)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:202)
at org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:202)
at org.mule.module.cxf.builder.AbstractInboundMessageProcessorBuilder.build(AbstractInboundMessageProcessorBuilder.java:61)
at org.mule.module.cxf.config.FlowConfiguringMessageProcessor.initialise(FlowConfiguringMessageProcessor.java:94)
at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79)
at org.mule.processor.chain.AbstractMessageProcessorChain.initialise(AbstractMessageProcessorChain.java:79)
at org.mule.endpoint.DefaultInboundEndpoint.createMessageProcessorChain(DefaultInboundEndpoint.java:159)
at org.mule.endpoint.AbstractEndpoint.getMessageProcessorChain(AbstractEndpoint.java:517)
at org.mule.endpoint.DefaultInboundEndpoint.start(DefaultInboundEndpoint.java:100)
at org.mule.source.StartableCompositeMessageSource.start(StartableCompositeMessageSource.java:150)
at org.mule.construct.AbstractFlowConstruct.startIfStartable(AbstractFlowConstruct.java:284)
at org.mule.construct.AbstractPipeline.doStart(AbstractPipeline.java:209)
at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:120)
at org.mule.construct.AbstractFlowConstruct$2.onTransition(AbstractFlowConstruct.java:116)
at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:141)
at org.mule.construct.FlowConstructLifecycleManager.fireStartPhase(FlowConstructLifecycleManager.java:95)
at org.mule.construct.AbstractFlowConstruct.start(AbstractFlowConstruct.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225)
... 16 more
I use mule 3.2.1. So mule-module-cxf is 3.2.1 as well.
I tried to specify wsdl location but nothing happened still got the same exception...
Caused by:
java.lang.NoSuchMethodError: org.apache.cxf.common.xmlschema.SchemaCollection.read(Lorg/w3c/dom/Document;Ljava/lang/String;)Lorg/apache/ws/commons/schema/XmlSchema;
It looks like something wrong with mule-module-cxf. Maybe version of XmlSchema is irrelevant?
Upvotes: 1
Views: 804
Reputation: 11
It seems you are using an incorrect version of xmlschema
on your classpath, please ensure that you have the file XmlSchema-1.4.7.jar
in your %MULE_HOME%/lib/opt
and also that you don't have other xmlschema-core
version in your classpath.
Upvotes: 0