2014-11-04 56 views
0

我試圖將PostgreSQL JDBC連接器添加到我的應用程序,但無法啓動。 連接器和數據源由Mule工作室添加,但沒有發現問題。 在我嘗試添加數據庫訪問功能之前,此應用程序正常運行。發現無效內容以元素'jdbc -ee:postgresql-data-source'開頭

這是啓動應用程序後,我得到的錯誤:

ERROR 2014-11-01 15:14:46,389 [Mule.app.deployer.monitor.1.thread.1] org.mule.module.launcher.DeploymentService: Failed to deploy application archive: myapp.zip 
org.mule.module.launcher.DeploymentInitException: SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jdbc-ee:postgresql-data-source'. 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-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-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.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:220) 
    at org.mule.module.launcher.application.ApplicationWrapper.init(ApplicationWrapper.java:64) 
    at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:46) 
    at org.mule.module.launcher.DeploymentService.guardedDeploy(DeploymentService.java:398) 
    at org.mule.module.launcher.DeploymentService.deploy(DeploymentService.java:365) 
    at org.mule.module.launcher.DeploymentService$AppDirWatcher.run(DeploymentService.java:685) 
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) 
    at java.util.concurrent.FutureTask.runAndReset(Unknown Source) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) 
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 

和MFLOW文件的一部分不通過驗證:

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

<mule xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:tcp="http://www.mulesoft.org/schema/mule/tcp" xmlns:sftp="http://www.mulesoft.org/schema/mule/sftp" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:jms="http://www.mulesoft.org/schema/mule/jms" xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:core="http://www.mulesoft.org/schema/mule/core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="EE-3.4.1" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.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/tcp http://www.mulesoft.org/schema/mule/tcp/current/mule-tcp.xsd 
http://www.mulesoft.org/schema/mule/sftp http://www.mulesoft.org/schema/mule/sftp/current/mule-sftp.xsd 
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd 
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd 
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd 
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd 
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/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd 
http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd"> 
... 
    <jdbc-ee:postgresql-data-source name="My_Data_Source" user="usr123" password="pwd123" transactionIsolation="UNSPECIFIED" doc:name="PostgreSQL Data Source" url="jdbc:postgresql://localhost:5432/MyDB"/> 
... 

你能看到什麼我已經錯過了,請?

+0

您使用哪個版本的Mule社區版或企業版? – 2014-11-04 17:42:50

+0

它是社區版本。 – MirecXP 2014-11-04 18:07:37

回答

0

您正在使用騾子社區版和使用PostgreSQL JDBC連接器: - <jdbc-ee:postgresql-data-source.這是企業版的..

使用騾子工作室社區版數據庫連接器,或者如果你想使用<jdbc-ee:postgresql-data-source ..使用Mule的企業版。

+0

謝謝!我如何配置社區連接器?我在Mule Studio中看不到選項。 Mule Studio是3.5版本。 – MirecXP 2014-11-04 22:08:55

+0

如果你使用Community Edition ..你會發現DB連接器的社區版本..如果你找不到它,那麼你有2個選擇:1)使用Mule企業版Studio或者2)在Community Edition中使用Spring Beans配置您的數據源併爲您提供url,用戶名,密碼在spring beans – 2014-11-05 07:57:15

+0

我不打算使用企業版。我試圖使用通用JDBC連接器,但他們表示它將在下一個版本中被棄用。所以我想有一個bean是未來的更好的選擇,以防萬一以後沒有選擇使用通用JDBC連接器,對嗎? – MirecXP 2014-11-05 08:40:58

相關問題