mule 工程在linux上部署问题,找不到mule-data-mapper.xsd?

wobushiwangj 发布于 2015/03/10 15:16
阅读 918
收藏 0

我用mule 3.5 studio创建了mule工程,在studio中用Run As Mule Application的方式运行是可以的,

但是当我把工程打包成zip放到/usr/local/mule-standalone-3.5.0/apps去运行,就会报错,java版本是1.6.0_45,错误日志如下:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Initializing app 'xx'                                    +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2015-03-10 14:50:01,363  INFO AbstractLifecycleManager - Initialising RegistryBroker
2015-03-10 14:50:01,381  INFO MuleArtifactContext - Refreshing org.mule.config.spring.MuleArtifactContext@12b27c38: startup date [Tue Mar 10 14:50:01 CST 2015]; root of context hierarchy
2015-03-10 14:50:06,367  WARN XmlBeanDefinitionReader - Ignored XML validation warning
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.warning(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaWarning(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.getSchemaDocument(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.findSchemaGrammar(Unknown Source)


2015-03-10 14:50:06,582 ERROR DefaultMuleApplication - null
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'data-mapper:config'. One of '{"http://www.springframework.org/schema/beans":beans, "http://www.springframework.org/schema/beans":bean, "http://www.springframework.org/schema/context":property-placeholder, "http://www.springframework.org/schema/beans":ref, "http://www.mulesoft.org/schema/mule/core":global-property, "http://www.mulesoft.org/schema/mule/core":configuration, "http://www.mulesoft.org/schema/mule/core":notifications, "http://www.mulesoft.org/schema/mule/core":abstract-extension, "http://www.mulesoft.org/schema/mule/core":abstract-shared-extension, "http://www.mulesoft.org/schema/mule/core":abstract-mixed-content-extension, "http://www.mulesoft.org/schema/mule/core":abstract-agent, "http://www.mulesoft.org/schema/mule/core":abstract-security-manager, "http://www.mulesoft.org/schema/mule/core":abstract-transaction-manager, "http://www.mulesoft.org/schema/mule/core":abstract-shared-transaction-manager, "http://www.mulesoft.org/schema/mule/core":abstract-connector, "http://www.mulesoft.org/schema/mule/core":abstract-shared-connector, "http://www.mulesoft.org/schema/mule/core":abstract-global-endpoint, "http://www.mulesoft.org/schema/mule/core":abstract-exception-strategy, "http://www.mulesoft.org/schema/mule/core":abstract-flow-construct, "http://www.mulesoft.org/schema/mule/core":flow, "http://www.mulesoft.org/schema/mule/core":sub-flow, "http://www.mulesoft.org/schema/mule/core":abstract-model, "http://www.mulesoft.org/schema/mule/core":abstract-interceptor-stack, "http://www.mulesoft.org/schema/mule/core":abstract-filter, "http://www.mulesoft.org/schema/mule/core":abstract-transformer, "http://www.mulesoft.org/schema/mule/core":processor-chain, "http://www.mulesoft.org/schema/mule/core":custom-processor, "http://www.mulesoft.org/schema/mule/core":invoke, "http://www.mulesoft.org/schema/mule/core":abstract-global-intercepting-message-processor, "http://www.mulesoft.org/schema/mule/core":custom-queue-store, "http://www.mulesoft.org/schema/mule/core":abstract-processing-strategy}' is expected.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)


我的mule项目配置文件是:

<?xml version="1.0" encoding="UTF-8"?>


<mule xmlns:ws="http://www.mulesoft.org/schema/mule/ws" xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/ws http://www.mulesoft.org/schema/mule/ws/current/mule-ws.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd">
    <ws:consumer-config name="Web_Service_Consumer" wsdlLocation="http://localhost:8080/cxf/soapHelloWorld?wsdl" service="SoapHelloWorldService" port="SoapHelloWorldPort" serviceAddress="http://localhost:8080/cxf/soapHelloWorld" doc:name="Web Service Consumer"/>
    <data-mapper:config name="Pojo_To_Xml_executeParam_" transformationGraphPath="pojo_to_xml_executeparam_.grf" doc:name="Pojo_To_Xml_executeParam_"/>
    <data-mapper:config name="Xml_executeParamResponse__To_Pojo" transformationGraphPath="xml_executeparamresponse__to_pojo.grf" doc:name="Xml_executeParamResponse__To_Pojo"/>
    <flow name="xx_soapFlow1" doc:name="xx_soapFlow1">
        <http:inbound-endpoint exchange-pattern="request-response" host="20.251.44.208" port="8888" path="soap" doc:name="HTTP"/>
        <set-property propertyName="uid" value="#[message.inboundProperties.'http.query.params'.get('uid')]" doc:name="Property"/>
        <custom-transformer class="com.gcloud.mule.trans.MyTransform" doc:name="Java"/>
        <set-variable variableName="param" value="#[message.outboundProperties.param]" doc:name="Variable"/>
        <data-mapper:transform config-ref="Pojo_To_Xml_executeParam_" input-ref="#[flowVars[&quot;param&quot;]]" doc:name="Pojo To Xml&lt;executeParam&gt;"/>
        <ws:consumer config-ref="Web_Service_Consumer" operation="executeParam" doc:name="Web Service Consumer"/>
        <data-mapper:transform config-ref="Xml_executeParamResponse__To_Pojo" doc:name="Xml&lt;executeParamResponse&gt; To Pojo"/>
        <http:response-builder status="200" contentType="text/plain" doc:name="HTTP Response Builder"/>
    </flow>
    <flow name="xx_restFlow1" doc:name="xx_restFlow1">
        <http:inbound-endpoint exchange-pattern="request-response" host="20.251.44.208" port="8888" path="rest" doc:name="HTTP"/>
        <set-property propertyName="uid" value="#[message.inboundProperties.'http.query.params'.get('uid')]" doc:name="Property"/>
        <custom-transformer class="com.gcloud.mule.trans.MyTransform" doc:name="Java"/>
        <set-payload value="#[message.outboundProperties.param]" doc:name="Set Payload"/>
        <http:outbound-endpoint exchange-pattern="request-response" host="localhost" port="8080" path="cxf/hello/executeParam" method="POST" encoding="UTF-8" mimeType="text/plain" contentType="text/plain" doc:name="HTTP"/>
    </flow>
</mule>




加载中
0
TavenLi
TavenLi
你的工程里面使用了 datamapper,这个组件是企业版里面才能使用的哦,而你服务器上运行的 mule-standalone-3.5.0 是社区版,所以会报错哦。还有不明白的,可以去看网上的视频“远哥教你MuleESB”
药妖
药妖
dataMapper真的是企业版的吗?社区版的不能使用dataMapper的功能吗,我也是在Anypoint studio上可以正常运行,但是在mule-standalone 上跑就出错,说找不到dataMapper-config
0
wobushiwangj
wobushiwangj

引用来自“TavenLi”的评论

你的工程里面使用了 datamapper,这个组件是企业版里面才能使用的哦,而你服务器上运行的 mule-standalone-3.5.0 是社区版,所以会报错哦。还有不明白的,可以去看网上的视频“远哥教你MuleESB”
是的,后来我换成3.6的企业版studio及runtime重新画了下流程图,就可以了。这里顺便说下,3.5和3.6的版本差别有些大,http组件的属性都妹的改了,有些组件还废弃了,让我们这些初学者真是郁闷
zheng_sam
zheng_sam
请问除了用企业版的之外,还有没有其他办法也可以使得在社区版中使用data-mapper ? 企业版之后30天使用期.....
返回顶部
顶部