2014-11-04 63 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

相关问题