Mule vm:连接器在Mule 3.8运行时与域项目失败

时间:2017-07-18 16:12:01

标签: mule mule-studio mule-component mule-el

我是Mule社区3.8版的新手。当我尝试使用vm:connector组件构建域项目时,部署失败并获得以下错误。看起来Mule社区不支持vm:connector组件。有人可以建议。

代码段

<?xml version="1.0" encoding="UTF-8"?>
<mule-domain xmlns="http://www.mulesoft.org/schema/mule/domain" xmlns:core="http://www.mulesoft.org/schema/mule/core"
        xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:context="http://www.springframework.org/schema/context" xmlns:spring="http://www.springframework.org/schema/beans"
        xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:https="http://www.mulesoft.org/schema/mule/https"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/domain http://www.mulesoft.org/schema/mule/domain/current/mule-domain.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-current.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.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/https http://www.mulesoft.org/schema/mule/https/current/mule-https.xsd">

<vm:connector name="vm-shared" validateConnections="true" doc:name="VM Connector">
            <core:receiver-threading-profile poolExhaustedAction="WAIT" />
            <vm:queue-profile maxOutstandingMessages="50">
                    <core:default-in-memory-queue-store />
            </vm:queue-profile>
</vm:connector>

错误日志

org.mule.module.launcher.DeploymentInitException: SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'vm:connector'. 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.mulesoft.org/schema/mule/core":abstract-shared-connector, "http://www.mulesoft.org/schema/mule/core":abstract-shared-transaction-manager, "http://www.mulesoft.org/schema/mule/core":abstract-shared-extension}' is expected.
    at org.mule.module.launcher.domain.DefaultMuleDomain.init(DefaultMuleDomain.java:192) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.artifact.ArtifactWrapper$2.execute(ArtifactWrapper.java:63) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.artifact.ArtifactWrapper.executeWithinArtifactClassLoader(ArtifactWrapper.java:136) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.artifact.ArtifactWrapper.init(ArtifactWrapper.java:58) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:25) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployArtifact(DefaultArchiveDeployer.java:309) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployExplodedApp(DefaultArchiveDeployer.java:296) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.DefaultArchiveDeployer.deployExplodedArtifact(DefaultArchiveDeployer.java:95) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.DomainArchiveDeployer.deployExplodedArtifact(DomainArchiveDeployer.java:60) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.DomainArchiveDeployer.deployExplodedArtifact(DomainArchiveDeployer.java:32) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.DeploymentDirectoryWatcher.deployExplodedDomains(DeploymentDirectoryWatcher.java:472) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.DeploymentDirectoryWatcher.start(DeploymentDirectoryWatcher.java:143) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.MuleDeploymentService.start(MuleDeploymentService.java:134) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at org.mule.module.launcher.MuleContainer.start(MuleContainer.java:172) ~[mule-module-launcher-3.8.3.jar:3.8.3]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_111]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_111]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_111]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_111]
    at org.mule.module.reboot.MuleContainerWrapper.start(MuleContainerWrapper.java:52) ~[mule-module-reboot-3.8.3.jar:3.8.3]
    at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2788) ~[wrapper-3.2.3.jar:3.2.3]

1 个答案:

答案 0 :(得分:1)

VM作为共享资源仅在企业中: https://docs.mulesoft.com/mule-user-guide/v/3.8/shared-resources

只需使用:

即可使用默认连接器
  

vm:outbound-endpoint exchange-pattern =&#34; request-response&#34;路径=&#34; yourPathName&#34;   vm:inbound-endpoint exchange-pattern =&#34; request-response&#34;路径=&#34; yourPathName&#34;

在许多情况下,我更喜欢使用vms队列而不是vms。至少可以在域项目中共享JMS连接器。