【问题标题】:Mule compilation failed with maven : Invalid content was found starting with element 'db:generic-config'maven 的 Mule 编译失败:发现以元素 'db:generic-config' 开头的无效内容
【发布时间】:2015-07-07 04:09:01
【问题描述】:

我因为一个该死的依赖问题被阻止了两天,所以我决定分享解决方案;-)。

我在通过 Maven 运行功能测试时遇到以下错误:

Invalid content was found starting with element 'db:generic-config'.
One of '{"http://www.springframework.org/schema/beans":beans, ..."}' is expected

Mule xml 引用的数据库配置如下:

<db:generic-config name="mf-connector-thebes"
    url="${url}"
    driverClassName="${driver}"
    doc:name="Generic Database Configuration" >
</db:generic-config>

【问题讨论】:

  • 如果您将问题的解决方案部分移至答案并接受它会更好。这会将这个问题标记为已关闭,而不是当前的“打开但已解决”状态......
  • 我按照你的建议做了

标签: java maven mule


【解决方案1】:

要解决这个问题,只需将以下依赖项添加到您的 pom.xml 文件中:

    <dependency>
        <groupId>org.mule.modules</groupId>
        <artifactId>mule-module-db</artifactId>
        <version>${mule.version}</version>
        <scope>provided</scope>
    </dependency>

【讨论】:

    【解决方案2】:

    确保您的 Mule 配置中有 db:generic-config 所需的命名空间

    xmlns:db="http://www.mulesoft.org/schema/mule/db
    

    和架构位置:-

    http://www.mulesoft.org/schema/mule/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
    

    【讨论】:

      猜你喜欢
      • 2017-07-25
      • 1970-01-01
      • 2015-09-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-18
      相关资源
      最近更新 更多