I have an standalone instance of ActiveMQ running... and I am trying to have mule read a message from the queue and simply display it in the console.
Standalone ActiveMQ is working.Below are the ActiveMQ startup lines--
[root@hydhtc32797 bin]# ./activemq
ACTIVEMQ_HOME: /usr/ActiveMQ/apache-activemq-5.2.0
ACTIVEMQ_BASE: /usr/ActiveMQ/apache-activemq-5.2.0
Loading message broker from: xbean:activemq.xml
INFO DefaultCamelContext - JMX enabled. Using InstrumentationLifecycleStrategy.
INFO BrokerService - Using Persistence Adapter: AMQPersistenceAdapter(/usr/ActiveMQ/apache-activemq-5.2.0/data)
INFO AMQPersistenceAdapter - AMQStore starting using directory: /usr/ActiveMQ/apache-activemq-5.2.0/data
INFO KahaStore - Kaha Store using data directory /usr/ActiveMQ/apache-activemq-5.2.0/data/kr-store/state
INFO AMQPersistenceAdapter - Active data files: []
INFO BrokerService - ActiveMQ 5.2.0 JMS Message Broker (localhost) is starting
INFO BrokerService - For help or more information please see: http://activemq.apache.org/
INFO KahaStore - Kaha Store using data directory /usr/ActiveMQ/apache-activemq-5.2.0/data/kr-store/data
INFO TransportServerThreadSupport - Listening for connections at: tcp://hydhtc32797.ad.infosys.com:61616
INFO TransportConnector - Connector openwire Started
INFO TransportServerThreadSupport - Listening for connections at: ssl://hydhtc32797.ad.infosys.com:61617
INFO TransportConnector - Connector ssl Started
INFO TransportServerThreadSupport - Listening for connections at: stomp://hydhtc32797.ad.infosys.com:61613
INFO TransportConnector - Connector stomp Started
INFO TransportServerThreadSupport - Listening for connections at: xmpp://hydhtc32797.ad.infosys.com:61222
INFO TransportConnector - Connector xmpp Started
INFO NetworkConnector - Network Connector default-nc Started
INFO BrokerService - ActiveMQ JMS Message Broker (localhost, ID:hydhtc32797.ad.infosys.com-54990-1247840523818-0:0) started
INFO log - Logging to org.slf4j.impl.JCLLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
INFO log - jetty-6.1.9
INFO WebConsoleStarter - ActiveMQ WebConsole initialized.
INFO /admin - Initializing Spring FrameworkServlet 'dispatcher'
INFO log - ActiveMQ Console at http://0.0.0.0:8161/admin
INFO log - ActiveMQ Web Demos at http://0.0.0.0:8161/demo
INFO log - RESTful file access application at http://0.0.0.0:8161/fileserver
INFO log - Started SelectChann...@0.0.0.0:8161
INFO TransportConnector - Connector vm://localhost Started
I am using the echo-config.xml file for the mule.I added following lines in this conf file.
<jms:activemq-connector name="jmsConnector" specification="1.1" brokerURL="tcp://localhost:61616"
connectionFactory-ref="activeMqConnectionFactory"/>
<bean id="activeMqConnectionFactory"
class="org.apache.activemq.ActiveMQConnectionFactory">
but it is showing following errors---
[root@hydhtc32797 conf]# mule -config echo-config.xml
Running in console (foreground) mode by default, use Ctrl-C to exit...
Running Mule Enterprise Edition...
--> Wrapper Started as Console
Java Service Wrapper Standard Edition 3.3.1
Copyright (C) 1999-2008 Tanuki Software, Inc. All Rights Reserved.
http://wrapper.tanukisoftware.org
Licensed to MuleSource Inc for Mule ESB Enterprise Edition
Launching a JVM...
Valid license key --> Evaluation = true, Expiration Date = Fri Aug 07 00:00:00 IST 2009, Contact Name = MuleSource Support, Contact Email Address = sup...@mulesource.com, Contact Telephone = sup...@mulesource.com, Contact Company = MuleSource, Contact Country = US, Entitlements =
Starting the Mule Server...
WrapperManager: Initializing...
INFO 2009-07-17 19:55:02,801 [WrapperListener_start_runner] org.mule.MuleServer: Mule Server initializing...
ERROR 2009-07-17 19:55:04,517 [WrapperListener_start_runner] org.mule.MuleServer: A Fatal error has occurred while the server was running: org/apache/commons/logging/LogFactory
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:145)
at org.springframework.context.support.AbstractApplicationContext.<init>(AbstractApplicationContext.java:191)
at org.springframework.context.support.AbstractRefreshableApplicationContext.<init>(AbstractRefreshableApplicationContext.java:76)
at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.<init>(AbstractRefreshableConfigApplicationContext.java:51)
at org.springframework.context.support.AbstractXmlApplicationContext.<init>(AbstractXmlApplicationContext.java:50)
at org.mule.config.spring.MuleApplicationContext.<init>(MuleApplicationContext.java:56)
at org.mule.config.spring.MuleApplicationContext.<init>(MuleApplicationContext.java:52)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createApplicationContext(SpringXmlConfigurationBuilder.java:74)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:69)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.config.builders.AutoConfigurationBuilder.autoConfigure(AutoConfigurationBuilder.java:112)
at org.mule.config.builders.AutoConfigurationBuilder.doConfigure(AutoConfigurationBuilder.java:58)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:177)
at org.mule.MuleServer.initialize(MuleServer.java:351)
at org.mule.MuleServer.run(MuleServer.java:257)
at org.mule.MuleServer.start(MuleServer.java:244)
at org.mule.module.boot.MuleServerWrapper.start(MuleServerWrapper.java:48)
at org.tanukisoftware.wrapper.WrapperManager$12.run(WrapperManager.java:2979)
ERROR 2009-07-17 19:55:04,567 [WrapperListener_start_runner] org.mule.MuleServer:
********************************************************************************
* A Fatal error has occurred while the server was running: *
* org/apache/commons/logging/LogFactory (java.lang.NoClassDefFoundError) *
* *
* The error is fatal, the system must shutdown *
* Server started: 1/1/70 5:30 AM *
* Server shutdown: 7/17/09 7:55 PM *
********************************************************************************
I am also attaching the echo-conf.xml.... Please reply ASAP..................!!!!!!!!
2) You config is referring to 2.1 namespace but your are saying that your are running 2.2.1. can you verify the version of Mule?
3) Use the below config for your test sample
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.1";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:spring="http://www.springframework.org/schema/beans";
xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.1";
xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.1";
xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.1";
xmlns:xm="http://www.mulesource.org/schema/mule/xml/2.1";
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.mulesource.org/schema/mule/core/2.1
http://www.mulesource.org/schema/mule/core/2.1/mule.xsd
http://www.mulesource.org/schema/mule/stdio/2.1
http://www.mulesource.org/schema/mule/stdio/2.1/mule-stdio.xsd
http://www.mulesource.org/schema/mule/vm/2.1
http://www.mulesource.org/schema/mule/vm/2.1/mule-vm.xsd
http://www.mulesource.org/schema/mule/jms/2.1
http://www.mulesource.org/schema/mule/jms/2.1/mule-jms.xsd
http://www.mulesource.org/schema/mule/xml/2.1
http://www.mulesource.org/schema/mule/xml/2.1/mule-xml.xsd";>
<jms:activemq-connector name="jmsConnector" specification="1.1" brokerURL="tcp://localhost:61616"/>
<model name="echoSample">
<service name="EchoUMO">
<inbound>
<inbound-endpoint queue="FOO.BAR"/>
</inbound>
<outbound>
<pass-through-router>
<stdio:outbound-endpoint system="OUT"/>
</pass-through-router>
</outbound>
</service>
</model>
</mule>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns="http://www.mulesource.org/schema/mule/core/2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:stdio="http://www.mulesource.org/schema/mule/stdio/2.2"
xmlns:vm="http://www.mulesource.org/schema/mule/vm/2.2"
xmlns:jms="http://www.mulesource.org/schema/mule/jms/2.2"
xmlns:xm="http://www.mulesource.org/schema/mule/xml/2.2"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.mulesource.org/schema/mule/core/2.2
http://www.mulesource.org/schema/mule/core/2.2/mule.xsd
http://www.mulesource.org/schema/mule/stdio/2.2
http://www.mulesource.org/schema/mule/stdio/2.2/mule-stdio.xsd
http://www.mulesource.org/schema/mule/vm/2.2
http://www.mulesource.org/schema/mule/vm/2.2/mule-vm.xsd
http://www.mulesource.org/schema/mule/jms/2.2
http://www.mulesource.org/schema/mule/jms/2.2/mule-jms.xsd
http://www.mulesource.org/schema/mule/xml/2.2
http://www.mulesource.org/schema/mule/xml/2.2/mule-xml.xsd">
<jms:activemq-connector name="jmsConnector" specification="1.1"
brokerURL="tcp://localhost:61616"/>
<model name="echoSample">
<service name="EchoUMO">
<inbound>
<jms:inbound-endpoint queue="FOO.BAR"/>
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
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-2.5.xsd">
<bean id="activeMqConnectionFactory" class="org.activemq.ActiveMQConnectionFactory">
<property name="brokerXmlConfig"
value="classpath:/org/mule/test/activemq-config.xml"/>
<!-- More properties you want set on ActiveMQConnectionFactory -->
</bean>
</beans>
are that above lines should be included in the mule config????????
HTH
A
--
Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
See our full schedule of Mule and Android courses:
http://www.ricston.com/courses/schedules/
email: _antoin...@ricston.com <mailto:antoin...@ricston.com> |
blog: blog.ricston.com <http://blog.ricston.com> | web: ricston.com
<http://www.ricston.com/>
If you look at the wiki, all information about ActiveMQ is listed here:
http://www.mulesource.org/display/MULE2USER/ActiveMQ+Integration
Going back to the problem you have - Puneet pointed out that perhaps the
issue is the CLASSPATH. Do you know if you have an environment variable
on your machine that is called CLASSPATH? If you do, what is its value?
HTH
A
--
Antoine Borg, Senior Consultant | Tel: +32 28 504 696
ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM
See our full schedule of Mule and Android courses:
http://www.ricston.com/courses/schedules/
email: _antoin...@ricston.com <mailto:antoin...@ricston.com> |
blog: blog.ricston.com <http://blog.ricston.com> | web: ricston.com
<http://www.ricston.com/>
---------------------------------------------------------------------