- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试将 Mule 连接到 MySQL 数据库,使用本教程(对 Mule 来说非常新): http://www.mulesoft.org/connectors/mysql-connector
我一路向下,到第 6 步(测试列表项)。如果我转到指定的 URL,我会收到此错误:
Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=jdbc://selectAll, connector=EEJdbcConnector
{
name=Database
lifecycle=start
this=5b3808ad
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=false
connected=true
supportedProtocols=[jdbc]
serviceOverrides=<none>
}
, name='endpoint.jdbc.selectAll', mep=REQUEST_RESPONSE, properties={queryTimeout=-1}, transactionConfig=Transaction{factory=null, action=INDIFFERENT, timeout=0}, deleteUnacceptedMessages=false, initialState=started, responseTimeout=10000, endpointEncoding=UTF-8, disableTransportTransformer=false}. Message payload is of type: String
我已经找了很长时间了,但找不到解决方案。也许你们能帮帮我?
这是我的 XML:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:jdbc-ee="http://www.mulesoft.org/schema/mule/ee/jdbc" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:json="http://www.mulesoft.org/schema/mule/json" 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.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="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/json http://www.mulesoft.org/schema/mule/json/current/mule-json.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/ee/jdbc http://www.mulesoft.org/schema/mule/ee/jdbc/current/mule-jdbc-ee.xsd">
<jdbc-ee:mysql-data-source name="MySQL_Data_Source" user="$(db.user)" password="$(db.password)" url="$(db.connection_string)" transactionIsolation="UNSPECIFIED" doc:name="MySQL Data Source"/>
<jdbc-ee:connector name="Database" dataSource-ref="MySQL_Data_Source" validateConnections="true" queryTimeout="-1" pollingFrequency="0" doc:name="Database">
<jdbc-ee:query key="selectAll" value="SELECT * FROM demo_tbl"/>
<jdbc-ee:query key="insertItem" value="INSERT INTO demo_tbl SET title=#[message.inboundProperties['title']], description=#[message.inboundProperties['description']]"/>
<jdbc-ee:query key="deleteItem" value="DELETE FROM demo_tbl WHERE id=#[message.inboundProperties['id']]"/>
<jdbc-ee:query key="findById" value="SELECT * FROM demo_tbl WHERE id=#[message.inboundProperties['id']]"/>
<jdbc-ee:query key="updateItem" value="UPDATE demo_tbl SET title=#[message.inboundProperties['title']], description=#[message.inboundProperties['description']] WHERE id=#[message.inboundProperties['id']]"/>
</jdbc-ee:connector>
<flow name="jdbc_demoFlow1" doc:name="jdbc_demoFlow1">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" path="list" doc:name="HTTP"/>
<jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="selectAll" queryTimeout="-1" connector-ref="Database" doc:name="Database"/>
<json:object-to-json-transformer doc:name="Object to JSON"/>
</flow>
</mule>
尝试了最新的 MySQL 连接器 (mysql-connector-java-5.1.29-bin),以及教程中所述的 1。两者均无效。
有人知道如何解决这个问题:)?
谢谢!巴特
最佳答案
错误信息是jdbc://selectAll
,看来你的数据源url不正确。如果您查看 MySql Connector 教程示例,则 url 的样式应为 jdbc:mysql://localhost:3306/mulesoft_db
。
关于mysql - 骡子 MySQL 连接器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22295333/
我正在尝试从 GET http 请求中检索一些变量,例如 http://localhost:8088/?id=xxx&type=yyyy 使用这个流程
我创建了一个java web项目,我正在尝试将Mule嵌入其中。所有必需的依赖项均已添加到 pom.xml 中,web.xml 中的代码片段为: Mule App index.jsp
我正在尝试将 Mule 连接到 MySQL 数据库,使用本教程(对 Mule 来说非常新): http://www.mulesoft.org/connectors/mysql-connector 我一
Mule版本:3,5(实际上是mule工作室) 我是使用 mule 的新手,似乎不知道如何正确执行以下操作: 想要实现的目标:将数据从 html 表单发送到 mule,然后 mule 分割负载并将一部
我有一个正在运行的 Mule 应用程序,我想在其上设置 Jetty 以响应 http 请求。以下配置: ...在我启动应用程序并将选择的浏览器指向 http://lo
我在 amazon S3 上获取文件列表并遍历文件列表并一次处理一个文件。对应流程如下--
我有一个可用的 Web 服务,它允许我上传文件。我想把 Mule 3 放在它前面,但我没有成功让它传递 MIME 类型为“multipart/form-data”的有效载荷。 尝试这样做会产生 400
我需要在 Mule 中配置一个 FTP 入站端点,到目前为止我得到的是: 我可以这样在命令提示符下访问这个服务器: user:xxxxpass:xxxcd ..get K0274K.N45
我想知道是否有一种方法可以根据 HTTP 方法过滤/路由消息。我要做的是不处理使用 OPTIONS 方法发布的传入请求。 (这是为了跨源资源共享处理) 最佳答案 您可以使用 MEL(Mule Exre
我想知道是否有一种方法可以根据 HTTP 方法过滤/路由消息。我要做的是不处理使用 OPTIONS 方法发布的传入请求。 (这是为了跨源资源共享处理) 最佳答案 您可以使用 MEL(Mule Exre
我正在尝试使用 mule 通过 SFTP 发送文件。我们必须为此指定一个固定路径,例如/home/ftp/,然后在 outputpattern 中指定文件名。但我想在远程位置即时创建目录。每次发送文件
有人可以向我展示一个如何创建 Mule 流以向 https 服务发送请求的小示例吗?我尝试这样做,但出现以下错误: INFO 2012-09-21 21:40:40,980 [[myapp_kareo
下面我发布了使用 Mule ESB 3.4.0 从 websphere 7.0 中提取的 SystemOut.log。我的 Mule 流程是同步流程。它使用“Websphere MQ 消息”并为每条消
如何检查我的 session 变量在此 CHOICE 中是否为 null 或空它对我不起作用。
我有一些 Json 数据作为有效负载,例如: { "name" : "Italy" } 我想用正则表达式过滤我的字段“name”的内容。 现在我使用这个过滤器。没有真正的错误,但不匹配。 作
我有一个 JsonNode 负载,其中包含一个 ArrayNode。我想使用这个 ArrayNode 并在 ForEach 元素中迭代它的元素。我将我的 ForEach 集合变量设置为 #[paylo
我是 JAXB 和 Mule 的新手。我们有一个可以连接到各个第三方的应用程序,每个第三方都提供自己的 XSD 来定义消息模式。 如果我为每个第三方定义不同的 JAXBContext 对象,则会收到“
目前我正在使用骡子,需要在 WMQ 队列中写入。但是我不想使用 WMQ 端点,而是想通过使用 JMS 端点来实现。这是我的配置:
我现在的情况: 我目前有一个 Mule ESB 应用程序,它具有三个流,它们处理来自两个不同来源的消息,这三个流使用 VM 队列绑定(bind)在一起。 流程#1: 入站(端点 #1)->(执行消息处
目前我正在使用 mule esb。我想要实现的是:在JavaScript中进行一些操作,并基于HTML格式将响应发布到HTTP。 例如,我有以下 HTML 文件:
我是一名优秀的程序员,十分优秀!