Mule jdbc连接器xml解析

Mule jdbc连接器xml解析,jdbc,esb,mule,endpoint,connector,Jdbc,Esb,Mule,Endpoint,Connector,我在向Mule项目添加JDBC端点时遇到问题,但在初始化过程中由于一些XML解析问题而遇到问题。 问题是在我添加JDBC端点之后开始的 Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jdbc:inbound-endpoint'. One of '{ "http://www.mulesource.org/schema

我在向Mule项目添加JDBC端点时遇到问题,但在初始化过程中由于一些XML解析问题而遇到问题。 问题是在我添加JDBC端点之后开始的

Caused by: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jdbc:inbound-endpoint'. One of '{
"http://www.mulesource.org/schema/mule/core/2.2":description,
"http://www.springframework.org/schema/beans":beans,
"http://www.springframework.org/schema/beans":bean,
"http://www.springframework.org/schema/context":property-placeholder,
"http://www.mulesource.org/schema/mule/core/2.2":global-property,
"http://www.mulesource.org/schema/mule/core/2.2":configuration,
"http://www.mulesource.org/schema/mule/core/2.2":notifications,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-extension,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-security-manager,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-transaction-manager,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-connector,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-global-endpoint,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-transformer,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-filter,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-model,
"http://www.mulesource.org/schema/mule/core/2.2":abstract-interceptor-stack}'
is expected.
我一直在遵循这个指南

Mule JDBC名称空间已添加到我的xml定义中

有什么想法吗

检查我的配置文件的一部分:

<mule
xmlns="http://www.mulesource.org/schema/mule/core/2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.2"
xmlns:xm="http://www.mulesource.org/schema/mule/xml/2.2"
xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2"
xmlns:jdbc="http://www.mulesource.org/schema/mule/jdbc/2.2"
xmlns:file="http://www.mulesource.org/schema/mule/file/2.2"
xsi:schemaLocation="
    http://www.mulesource.org/schema/mule/jdbc/2.2 http://www.mulesource.org/schema/mule/jdbc/2.2/mule-jdbc.xsd
   http://www.mulesource.org/schema/mule/core/2.2 http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
   http://www.mulesource.org/schema/mule/jms/2.2 http://www.mulesource.org/schema/mule/jms/2.2/mule-jms.xsd
   http://www.mulesource.org/schema/mule/vm/2.2 http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
   http://www.mulesource.org/schema/mule/file/2.2 http://www.mulesource.org/schema/mule/file/2.2/mule-file.xsd
   http://www.mulesource.org/schema/mule/xml/2.2 http://www.mulesource.org/schema/mule/xml/2.2/mule-xml.xsd">

<!-- Endpoints -->

<jdbc:inbound-endpoint
    name="jdbcKapitalCommandIn"
    connector-ref="jdbcConnector"
    queryKey="queryKapitalProcessControl"
    pollingFrequency="10000" synchronous="true">
</jdbc:inbound-endpoint>

<jdbc:outbound-endpoint
    name="jdbcKapitalCommandOut"
    connector-ref="jdbcConnector"
    queryKey="updateKapitalProcessControl"
    synchronous="true">
</jdbc:outbound-endpoint>   

<file:endpoint
    name="kapitalErrorBackup"
    path="${APPS_HOME}/lbo-esb/files/kapital/error"
    outputPattern="#[DATE:yyyy-MM-dd_HH-mm-ss]_error.txt">
</file:endpoint>
<file:endpoint
    name="kapitalInputBackup"
    path="${APPS_HOME}/lbo-esb/files/kapital/backup"
    outputPattern="#[DATE:yyyy-MM-dd_HH-mm-ss]_kapital-command.xml">
</file:endpoint>
<file:endpoint
    name="kapitalInvalidSchemaBackup"
    path="${APPS_HOME}/lbo-esb/files/kapital/error"
    outputPattern="#[DATE:yyyy-MM-dd_HH-mm-ss]_inv_schema.xml">
</file:endpoint>

<!-- Kapital -->
<vm:endpoint
    name="kapitalTransactionInput"
    path="kapital.transaction.input">
</vm:endpoint>
<vm:endpoint
    name="kapitalError"
    path="kapital.error.input">
</vm:endpoint>


<model
    name="KapitalServices">

    <default-service-exception-strategy>
        <outbound-endpoint
            ref="kapitalError">
        </outbound-endpoint>
    </default-service-exception-strategy>   
    <service
        name="kapitalService">
        <inbound>
            <inbound-endpoint
                ref="jdbcKapitalCommandIn">
            </inbound-endpoint>             
        </inbound>
        <echo-component />
    <!-- more stuff from here -->
    </service>
</model>

<!-- more stuff from here -->
</mule>

由于您没有显示配置,因此很难为您提供帮助

从例外情况来看,我的印象是这个问题与JDBC无关。似乎您试图在只能声明全局端点(不是入站端点,不是出站端点)的位置定义入站端点。全局端点在服务外声明,在服务内声明为入/出绑定端点


如果我的诊断错误,请共享您的配置。

我是对的:)您在服务之外有入站端点和出站端点,即只允许端点。比较您的JDBC(错误)和File/WM(正确)全局端点……这很酷。我已经在我的服务路由器上添加了端点声明