使用 mule esb CE 的流量控制选项进行简单测试
Simple test using a flow control choice with mule esb CE
我想根据我从这个 json 文件中获取的变量 "sent" 的值显示一条消息:https://gist.githubusercontent.com/Rajeun/b550fe17181610f5c0f0/raw/934bf1e621d6bc056f20dee653dac74275026ba5/file.json
这是我的代码:
<flow name="cpushFlow">
<quartz:inbound-endpoint jobName="HTTP-Puller-Scheduler" repeatInterval="3000" responseTimeout="10000" doc:name="Quartz">
<quartz:event-generator-job/>
</quartz:inbound-endpoint>
<https:outbound-endpoint exchange-pattern="request-response" host="gist.githubusercontent.com" port="443" path="Rajeun/b550fe17181610f5c0f0/raw/934bf1e621d6bc056f20dee653dac74275026ba5/file.json" method="GET" doc:name="HTTP"/>
<json:json-to-object-transformer returnClass="java.lang.Object" doc:name="JSON to Object"/>
<choice doc:name="Choice">
<when expression="#[message.payload.sent]">
<logger message="c bn" level="INFO" doc:name="Logger"/>
</when>
<otherwise>
<logger message="c pas bn" level="INFO" doc:name="Logger"/>
</otherwise>
</choice>
</flow>
错误:
log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@25154f.
log4j: Trying to find [log4j.xml] using sun.misc.Launcher$AppClassLoader@25154f class loader.
log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
log4j: Trying to find [log4j.properties] using context classloader sun.misc.Launcher$AppClassLoader@25154f.
log4j: Using URL [jar:file:/C:/AnypointStudio/plugins/org.mule.tooling.server.3.5.0_3.5.0.201407241708/mule/tooling/tooling-support-3.5.0.jar!/log4j.properties] for automatic log4j configuration.
log4j: Reading configuration from URL jar:file:/C:/AnypointStudio/plugins/org.mule.tooling.server.3.5.0_3.5.0.201407241708/mule/tooling/tooling-support-3.5.0.jar!/log4j.properties
log4j: Parsing for [root] with value=[INFO, console].
log4j: Level token is [INFO].
log4j: Category root set to INFO
log4j: Parsing appender named "console".
log4j: Parsing layout options for "console".
log4j: Setting property [conversionPattern] to [%-5p %d [%t] %c: %m%n].
log4j: End of parsing for "console".
log4j: Parsed "console" options.
log4j: Parsing for [com.mycompany] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category com.mycompany set to DEBUG
log4j: Handling log4j.additivity.com.mycompany=[null]
log4j: Parsing for [org.springframework.beans.factory] with value=[WARN].
log4j: Level token is [WARN].
log4j: Category org.springframework.beans.factory set to WARN
log4j: Handling log4j.additivity.org.springframework.beans.factory=[null]
log4j: Parsing for [org.apache] with value=[WARN].
log4j: Level token is [WARN].
log4j: Category org.apache set to WARN
log4j: Handling log4j.additivity.org.apache=[null]
log4j: Parsing for [org.mule] with value=[INFO].
log4j: Level token is [INFO].
log4j: Category org.mule set to INFO
log4j: Handling log4j.additivity.org.mule=[null]
log4j: Parsing for [org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog] with value=[ERROR].
log4j: Level token is [ERROR].
log4j: Category org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog set to ERROR
log4j: Handling log4j.additivity.org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog=[null]
log4j: Finished configuring.
Exception in thread "main" java.lang.IllegalArgumentException: Application name not specified.
at org.mule.tooling.server.application.ApplicationDeployer$ApplicationDeployerArguments.parse(ApplicationDeployer.java:60)
at org.mule.tooling.server.application.ApplicationDeployer.parseArguments(ApplicationDeployer.java:48)
at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:96)
有人能帮帮我吗!
好像是申请格式或Anypoint Studio版本的问题。尝试重新创建应用程序或升级到 3.6.0。
我想根据我从这个 json 文件中获取的变量 "sent" 的值显示一条消息:https://gist.githubusercontent.com/Rajeun/b550fe17181610f5c0f0/raw/934bf1e621d6bc056f20dee653dac74275026ba5/file.json
这是我的代码:
<flow name="cpushFlow">
<quartz:inbound-endpoint jobName="HTTP-Puller-Scheduler" repeatInterval="3000" responseTimeout="10000" doc:name="Quartz">
<quartz:event-generator-job/>
</quartz:inbound-endpoint>
<https:outbound-endpoint exchange-pattern="request-response" host="gist.githubusercontent.com" port="443" path="Rajeun/b550fe17181610f5c0f0/raw/934bf1e621d6bc056f20dee653dac74275026ba5/file.json" method="GET" doc:name="HTTP"/>
<json:json-to-object-transformer returnClass="java.lang.Object" doc:name="JSON to Object"/>
<choice doc:name="Choice">
<when expression="#[message.payload.sent]">
<logger message="c bn" level="INFO" doc:name="Logger"/>
</when>
<otherwise>
<logger message="c pas bn" level="INFO" doc:name="Logger"/>
</otherwise>
</choice>
</flow>
错误:
log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@25154f.
log4j: Trying to find [log4j.xml] using sun.misc.Launcher$AppClassLoader@25154f class loader.
log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
log4j: Trying to find [log4j.properties] using context classloader sun.misc.Launcher$AppClassLoader@25154f.
log4j: Using URL [jar:file:/C:/AnypointStudio/plugins/org.mule.tooling.server.3.5.0_3.5.0.201407241708/mule/tooling/tooling-support-3.5.0.jar!/log4j.properties] for automatic log4j configuration.
log4j: Reading configuration from URL jar:file:/C:/AnypointStudio/plugins/org.mule.tooling.server.3.5.0_3.5.0.201407241708/mule/tooling/tooling-support-3.5.0.jar!/log4j.properties
log4j: Parsing for [root] with value=[INFO, console].
log4j: Level token is [INFO].
log4j: Category root set to INFO
log4j: Parsing appender named "console".
log4j: Parsing layout options for "console".
log4j: Setting property [conversionPattern] to [%-5p %d [%t] %c: %m%n].
log4j: End of parsing for "console".
log4j: Parsed "console" options.
log4j: Parsing for [com.mycompany] with value=[DEBUG].
log4j: Level token is [DEBUG].
log4j: Category com.mycompany set to DEBUG
log4j: Handling log4j.additivity.com.mycompany=[null]
log4j: Parsing for [org.springframework.beans.factory] with value=[WARN].
log4j: Level token is [WARN].
log4j: Category org.springframework.beans.factory set to WARN
log4j: Handling log4j.additivity.org.springframework.beans.factory=[null]
log4j: Parsing for [org.apache] with value=[WARN].
log4j: Level token is [WARN].
log4j: Category org.apache set to WARN
log4j: Handling log4j.additivity.org.apache=[null]
log4j: Parsing for [org.mule] with value=[INFO].
log4j: Level token is [INFO].
log4j: Category org.mule set to INFO
log4j: Handling log4j.additivity.org.mule=[null]
log4j: Parsing for [org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog] with value=[ERROR].
log4j: Level token is [ERROR].
log4j: Category org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog set to ERROR
log4j: Handling log4j.additivity.org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog=[null]
log4j: Finished configuring.
Exception in thread "main" java.lang.IllegalArgumentException: Application name not specified.
at org.mule.tooling.server.application.ApplicationDeployer$ApplicationDeployerArguments.parse(ApplicationDeployer.java:60)
at org.mule.tooling.server.application.ApplicationDeployer.parseArguments(ApplicationDeployer.java:48)
at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:96)
有人能帮帮我吗!
好像是申请格式或Anypoint Studio版本的问题。尝试重新创建应用程序或升级到 3.6.0。