- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
大家早上好
我对 Mule ESB 中的 Datamapper 组件有一个大问题。我正在尝试将 Excel 文件 (xlsx) 映射到 oracle 数据库的表中。为此,我创建了一个带有 Oracle DataSource 及其所有内容的 JDBC 连接器,但是当我转到 DataMapper 向导创建映射时,我无法选择创建的连接器,因为连接器列表中没有项目(在输出数据映射器向导标签中)。[下面是我的问题的屏幕截图]
我真的不明白为什么,你可以帮帮我吗?
此外,我有一个问题要问你:我需要在数据库中插入除了 xls 文件提供的字段之外的其他字段,如 MuleMessageID、xls 文件名和 Oracle SYSDATE。可能吗?
为了向您提供尽可能多的信息,我将发布我的骡子项目
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting" xmlns:smtp="http://www.mulesoft.org/schema/mule/smtp" xmlns:ftp="http://www.mulesoft.org/schema/mule/ee/ftp" xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns:data-mapper="http://www.mulesoft.org/schema/mule/ee/data-mapper" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:quartz="http://www.mulesoft.org/schema/mule/quartz" xmlns:file="http://www.mulesoft.org/schema/mule/file" xmlns:https="http://www.mulesoft.org/schema/mule/https" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mulesoft.org/schema/mule/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd
http://www.mulesoft.org/schema/mule/https http://www.mulesoft.org/schema/mule/https/current/mule-https.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/http http://www.mulesoft.org/schema/mule/http/current/mule-http.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/quartz http://www.mulesoft.org/schema/mule/quartz/current/mule-quartz.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/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd
http://www.mulesoft.org/schema/mule/ee/ftp http://www.mulesoft.org/schema/mule/ee/ftp/current/mule-ftp-ee.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd
http://www.mulesoft.org/schema/mule/smtp http://www.mulesoft.org/schema/mule/smtp/current/mule-smtp.xsd">
<spring:beans>
<spring:bean id="SettingProperty" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" scope="singleton">
<spring:property name="locations">
<spring:list>
<spring:value>classpath:pilot.properties</spring:value>
</spring:list>
</spring:property>
</spring:bean>
</spring:beans>
<http:connector name="HTTPConnector"
cookieSpec="netscape"
doc:name="HTTP\HTTPS">
<service-overrides messageFactory="it.aizoon.http.customHttpMultipart.MyHttpMultipartMuleMessageFactory"/>
</http:connector>
<file:endpoint path="${file.output}" name="XSLXFile" responseTimeout="10000" doc:name="File"/>
<jdbc-ee:oracle-data-source name="Oracle_Data_Source" user="${db.user}" password="${db.password}" url="${db.url}" doc:name="Oracle Data Source" transactionIsolation="UNSPECIFIED"/>
<jdbc-ee:connector name="JdbcConnector" dataSource-ref="Oracle_Data_Source" validateConnections="true" queryTimeout="-1" doc:name="Database" pollingFrequency="0">
<jdbc-ee:query key="storedProc" value="CALL ${db.storedProc}" />
</jdbc-ee:connector>
<data-mapper:config name="xls_to_db_grf" transformationGraphPath="xls_to_db.grf" doc:name="xls_to_db_grf"/>
<!-- Starting Flow Declaration -->
<flow name="zonal_imbalance_1.0Flow1" doc:name="zonal_imbalance_1.0Flow1">
<http:inbound-endpoint
address="http://${conn.host}:${conn.port}/${conn.path}"
connector-ref="HTTPConnector" doc:name="HTTP" exchange-pattern="request-response"/>
<wildcard-filter pattern="*/${conn.path}*" caseSensitive="true" doc:name="Wildcard"/>
<file:outbound-endpoint responseTimeout="10000" doc:name="Store XSLX File" path="C:\Users\paride.letizia\MuleStudio\workspace_ee\zonal_imbalance_1.0\src\test\resources\outputFolder"/>
<data-mapper:transform doc:name="DataMapper"/>
<jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryTimeout="-1" doc:name="ORACLE Database" queryKey="example" connector-ref="JdbcConnector">
<jdbc-ee:query key="example" value="SELECT * FROM prova;"/>
</jdbc-ee:outbound-endpoint>
</flow>
</mule>
在此先非常感谢大家。我期待着您的来信。
最佳答案
我不确切地知道他们为什么决定添加 JDBC“连接器”,但它们的行为实际上并不像连接器。连接器旨在通过特殊 API 与非标准服务建立连接,因此要与 Oracle DB 建立连接,只需按照标准方式即可。
有关详细信息,请参阅 Anypoint 文档,特别是名为“端点和连接器”的段落:
Connectors function like endpoints by sending and receiving data over a transport. However, while endpoints are generic for a widely-used protocol (such as JDBC, FTP, HTTP, POP3, etc) each connector is built to optimize the connection with a specific third-party API, such as Salesforce or Twitter.
Endpoints serve your needs in most cases in which you are connecting to an external resource that has a standard format or protocol. For example, if you are connecting to an Oracle database or a MS SQL database, you can use the Database endpoint, because those databases output their data in a standard format; there is no need for an Oracle or MS SQL connector. Similarly, you don't need a connector for a particular kind of file, like a .csv file. The File endpoint can be configured to input and output data to any kind of text file format, including .csv, so there is no need for a csv connector.
关于java - 如何在 Mule 3.4 ESB 中使用 Datamapper 映射数据库中的 Excel 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19586901/
我想将 smooks 集成到 mule ide 中。我们正在尝试从 webmethods 转移到 mule。我们在 smmoks 中有一个可用的 Edi 转换,我们想使用它。我找到了可以集成到 mul
当使用 Mule Maven 插件在 Mule 独立服务器上部署可部署存档时,我间歇性地收到此错误。 Error : Caused by: org.apache.maven.plugin.MojoEx
mule 线程中的默认线程数是多少。例如,如果我在 mule 中创建了一个 http 连接器并且没有指定接收器线程大小,那么它可以处理的最大并发请求数是多少? 最佳答案 默认值为 16。 这个值和其他
早上好,我正在尝试设置一个属性并访问它。但无法访问属性集。 我试图访问从客户端设置的 SplitterAggregator 中的属性。 以下是骡子配置。 以下是客户
我一直在试图弄清楚,入站终点和出站终点究竟是什么。对我来说,这有点难以理解。 骡子流中的入站和出站端点究竟是什么?如果流想要发送消息,则在接收时应使用哪个端点。或者当应用程序想要调用一个流时,它应该与
我有一个要求,我必须将 JSON 数据从一种格式转换为另一种格式。我必须获取 JSON 数组的相应值,并使它们成为键值对。 以下是所需的详细信息: 输入: "Headers": { "Head
我是 mule soft 的新手。我不知道 mule studio 和 mule esb 有什么区别。这两个软件只是看起来一样。 mule studio 是图形表示,我们也可以通过代码生成。我怎样才能
我正在尝试评估 Mule 提供的一组开箱即用的传输,并将其与来自例如ServiceMix 和 OpenESB。 在 Mule 的主页上,我找到了支持的传输列表: http://www.mulesoft
我创建了一个 mule 应用程序,当我使用 mule 3.5.6 CE 运行它时,它在 anypoint studio 中运行良好,但是当我尝试在 mule-standalone-3.6.1 中部署它
我们需要监控 HornetQ 消息(Jboss 的一部分)——监控是在消息到达队列、消息数量、消息消耗、审核消息有效负载方面。 HornetQ 是否公开 JMX Mbean 来监控这个过程? 作为集成
我有一个执行 XSLT 转换的 Mule 流,我已将我的 XSL 样式表放在 src/main/resources/ 中。当我打包我的应用程序并将其部署到 Mule Standalone 实例时,应用
我有用例,我需要加密 src/main/resources 下的属性文件中显示的值。 Mule 提供了一个名为 Mule Credentials Vault 的概念。在该文档中,我们可以在“Mule
我正在将 Mule 1.3 应用程序升级到 Mule 3.2.1(最新版本)。 Mule 1.3 配置文件有一个“model”元素和许多“mule-descriptor”子元素。
我对 Mule Studio 很陌生。 我正面临一个问题。我需要使用 Mule Studio 将数据从 CSV 文件插入到 PostgreSQL 数据库。 我正在使用 Mule Studio CE(版
一段时间以来,每当我通过图形编辑器保存流程时,mule studio 中总是出现 java.lang.assertionError 错误。如果我直接对 XML 进行更改,我不会收到任何错误。有人遇到过
是否有某种方法可以获取已部署的 mule 应用程序的基本 mule 应用程序名称? 到目前为止我发现的仅有的两个选项是: muleContext.getConfiguration().getId()
我正在尝试将我的输入字段与正则表达式相匹配。但它给出了 mule-expression 错误, regex: ^(?:[1-9][0-9]?(?:\.[0-9]{2})?|100(?:\.0{2})?
我是 Mule 的新手,我想了解独立 mule 与嵌入式 mule 之间的区别。我已经阅读了有关此的主题,但我无法回答一个问题。 Mule standalone 是如何工作的?它如何处理网络服务?它有
我想开始有条件的 mule quartz..例如:在 mule peroperties 文件中,我设置了一个 flag=on。如果该标志打开,那么调度程序将启动。如果该标志关闭,则不会调用 sched
我需要检查 JSON 对象中是否存在特定关键字,并在此基础上创建一个字符串。我的示例 dataweave 2.0 代码如下: %dw 2.0 output application/json var a
我是一名优秀的程序员,十分优秀!