JMS不使用mule esb中的activemq

时间:2014-01-03 10:56:51

标签: activemq mule mule-studio

我正在使用mulestudio。 我希望使用mule studio在jms队列中插入值。但是我已经完成了所有必需的更改但是队列没有在activemq中创建 我使用activemq-5.8.0版本,即使我添加了jar文件 我的配置是

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

    <mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:jms="http://www.mulesoft.org/schema/mule/jms" 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/http http://www.mulesoft.org/schema/mule/http/current/mule-http.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/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd">
    <jms:activemq-connector name="jmsConnector"  
        brokerURL="tcp://localhost:61616"

        maxRedelivery="30"
        disableTemporaryReplyToDestinations="true"

        acknowledgementMode="CLIENT_ACKNOWLEDGE"

        persistentDelivery="true" doc:name="Active MQ" password="admin" username="admin" validateConnections="true">
    </jms:activemq-connector>    <flow name="Acivemqdemo_flow" doc:name="Acivemqdemo_flow">
            <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8087" doc:name="HTTP"/>
            <jms:outbound-endpoint queue="queue" connector-ref="jmsConnector" doc:name="JMS">
                <jms:transaction action="NONE"/>
            </jms:outbound-endpoint>
        </flow>
</mule>

我按照文档完成但无法获得预期的队列 我的错误日志是

INFO  2014-01-03 16:20:09,890 [main] org.mule.lifecycle.AbstractLifecycleManager: Starting connector: jmsConnector
INFO  2014-01-03 16:20:09,911 [main] org.mule.lifecycle.AbstractLifecycleManager: Starting model: _muleSystemModel
INFO  2014-01-03 16:20:09,912 [main] org.mule.construct.FlowConstructLifecycleManager: Starting flow: Acivemqdemo_flow
INFO  2014-01-03 16:20:09,913 [main] org.mule.processor.SedaStageLifecycleManager: Starting service: Acivemqdemo_flow.stage1
INFO  2014-01-03 16:20:09,919 [main] org.mule.transport.http.HttpConnector: Registering listener: Acivemqdemo_flow on endpointUri: http://localhost:8087
INFO  2014-01-03 16:20:09,924 [main] org.mule.transport.service.DefaultTransportServiceDescriptor: Loading default response transformer: org.mule.transport.http.transformers.MuleMessageToHttpResponse
INFO  2014-01-03 16:20:09,938 [main] org.mule.lifecycle.AbstractLifecycleManager: Initialising: 'null'. Object is: HttpMessageReceiver
INFO  2014-01-03 16:20:09,940 [main] org.mule.transport.http.HttpMessageReceiver: Connecting clusterizable message receiver
ERROR 2014-01-03 16:20:09,942 [main] org.mule.exception.DefaultSystemExceptionStrategy: 
********************************************************************************
Message               : Address already in use (java.net.BindException)
Code                  : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. Address already in use (java.net.BindException)
  java.net.PlainSocketImpl:-2 (null)
2. Address already in use (java.net.BindException) (org.mule.transport.ConnectException)
  org.mule.transport.http.HttpConnectionManager:73 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/transport/ConnectException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
java.net.BindException: Address already in use
    at java.net.PlainSocketImpl.socketBind(Native Method)
    at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:353)
    at java.net.ServerSocket.bind(ServerSocket.java:336)
    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************

INFO  2014-01-03 16:20:09,944 [main] org.mule.exception.DefaultSystemExceptionStrategy: Exception caught is a ConnectException, attempting to reconnect...
INFO  2014-01-03 16:20:09,944 [main] org.mule.lifecycle.AbstractLifecycleManager: Stopping connector: connector.http.mule.default
INFO  2014-01-03 16:20:09,945 [main] org.mule.lifecycle.AbstractLifecycleManager: Stopping: 'null'. Object is: HttpMessageReceiver
ERROR 2014-01-03 16:20:09,946 [main] org.mule.transport.http.HttpConnector: null
java.lang.NullPointerException
    at org.mule.transport.http.HttpConnector.disconnect(HttpConnector.java:542)
    at org.mule.transport.http.HttpMessageReceiver.doDisconnect(HttpMessageReceiver.java:52)
    at org.mule.transport.AbstractTransportMessageHandler.disconnect(AbstractTransportMessageHandler.java:251)
    at org.mule.transport.AbstractConnector.disconnect(AbstractConnector.java:1656)
    at org.mule.exception.AbstractSystemExceptionStrategy.handleReconnection(AbstractSystemExceptionStrategy.java:97)
    at org.mule.exception.AbstractSystemExceptionStrategy.handleException(AbstractSystemExceptionStrategy.java:59)
    at org.mule.exception.AbstractSystemExceptionStrategy.handleException(AbstractSystemExceptionStrategy.java:77)
    at org.mule.lifecycle.AbstractLifecycleManager.invokePhase(AbstractLifecycleManager.java:148)
    at org.mule.construct.FlowConstructLifecycleManager.fireStartPhase(FlowConstructLifecycleManager.java:95)
    at org.mule.construct.AbstractFlowConstruct.start(AbstractFlowConstruct.java:140)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225)
    at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276)
    at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155)
    at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126)
    at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80)
    at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120)
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94)
    at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90)
    at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72)
    at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64)
    at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:255)
    at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:147)
    at org.mule.module.launcher.application.ApplicationWrapper.start(ApplicationWrapper.java:107)
    at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:48)
    at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:127)
INFO  2014-01-03 16:20:09,948 [main] org.mule.transport.http.HttpConnector: Disconnected: HttpConnector
{
  name=connector.http.mule.default
  lifecycle=stop
  this=4f980c26
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=true
  connected=true
  supportedProtocols=[http]
  serviceOverrides=<none>
}

INFO  2014-01-03 16:20:09,948 [main] org.mule.transport.http.HttpMessageReceiver: Connecting clusterizable message receiver
ERROR 2014-01-03 16:20:09,948 [main] org.mule.retry.notifiers.ConnectNotifier: Failed to connect/reconnect: HttpConnector
{
  name=connector.http.mule.default
  lifecycle=stop
  this=4f980c26
  numberOfConcurrentTransactedReceivers=4
  createMultipleTransactedReceivers=true
  connected=false
  supportedProtocols=[http]
  serviceOverrides=<none>
}
. Root Exception was: null. Type: class java.lang.NullPointerException
ERROR 2014-01-03 16:20:09,951 [main] org.mule.exception.DefaultSystemExceptionStrategy: null
INFO  2014-01-03 16:20:09,958 [main] org.mule.module.management.agent.WrapperManagerAgent: This JVM hasn't been launched by the wrapper, the agent will not run.
INFO  2014-01-03 16:20:09,969 [main] org.mule.module.management.agent.JmxAgent: Attempting to register service with name: Mule.acivemqjms:type=Endpoint,service="Acivemqdemo_flow",connector=connector.http.mule.default,name="endpoint.http.localhost.8087"
INFO  2014-01-03 16:20:09,969 [main] org.mule.module.management.agent.JmxAgent: Registered Endpoint Service with name: Mule.acivemqjms:type=Endpoint,service="Acivemqdemo_flow",connector=connector.http.mule.default,name="endpoint.http.localhost.8087"
INFO  2014-01-03 16:20:09,970 [main] org.mule.module.management.agent.JmxAgent: Registered Connector Service with name Mule.acivemqjms:type=Connector,name="connector.http.mule.default.1"
INFO  2014-01-03 16:20:09,970 [main] org.mule.module.management.agent.JmxAgent: Registered Connector Service with name Mule.acivemqjms:type=Connector,name="jmsConnector.1"
INFO  2014-01-03 16:20:09,972 [main] org.mule.module.launcher.application.DefaultMuleApplication: Reload interval: 3000
INFO  2014-01-03 16:20:09,974 [main] org.mule.DefaultMuleContext: 
**********************************************************************
* Application: acivemqjms                                            *
* OS encoding: UTF-8, Mule encoding: UTF-8                           *
*                                                                    *
* Agents Running:                                                    *
*   Clustering Agent                                                 *
*   JMX Agent                                                        *
**********************************************************************
INFO  2014-01-03 16:20:09,974 [main] org.mule.module.launcher.MuleDeploymentService: 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Started app 'acivemqjms'                                 +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

你会为此提供帮助吗?如何使用来自mule的消息给我任何示例文档

3 个答案:

答案 0 :(得分:0)

骡子应用程序无法启动它无法连接到http端口8087 这很可能是因为你已经有一个实例在运行。

按照计算顺序尝试:

  • 点击控制台窗口中的红色按钮
  • 重启eclipse studio
  • 或者如果您需要关闭eclipse工作室,请检查您是否有任何运行除activemq以外的java进程
希望有所帮助。

答案 1 :(得分:0)

在Ubuntu中使用此方法终止进程并释放端口。

fuser -k 80/tcp

将80替换为您需要释放的端口号。

在Mac中,使用netstat查找并终止PID。

答案 2 :(得分:0)

在您的异常java.net.BindException: Address already in use中,您的入站地址,端口似乎已被某个其他端点使用,或者由其他一些Mule端点或任何其他外部应用程序使用。
解决方法是,如果其他应用程序使用了端口或地址,请检查一次 要检查,请使用命令netstat以下列方式从命令提示符检查端口: - Command line for looking at specific port