Connect WSO2 ESB with WSO2 MB

Introduction

WSO2 Enterprise Service Bus (WSO2 ESB) and WSO2 Message Broker (WSO2 MB) plays very important role in opensource Enterprise Application Integration. With WSO2 ESB, WSO2 MB can be used for 2 different tasks.

1. JMS Endpoint

2. Message Store

In here I’m talkng about connecting WSO2 ESB with WSO2 MB 1.0.2 as a JMS endpoint. It will also shows how WSO2 ESB exhibits Message Broker EAI pattern. Basically it does is decoupling messages from sender and receiver. Senders message is put into a Message Broker and any receiver who interested in those messages can consume. In following example you can see how WSO2 ESB  works with WSO2 Message Broker (WSO2 MB version 1.0.2) Queue to do that. If you want to add more receivers you can use Topics provided in WSO2 MB in a similar way.

Prerequisites

Setting up WSO2 MB

<Ports>
<Offset>1</Offset>
...
  • Change default virtual host to “carbon” inside wso2mb-1.0.2/repository/conf/advancedqpid-virtualhosts.xml file.
<virtualhosts>
 <default>carbon</default>
...
  • Start WSO2 MB by executing wso2server.sh (or wso2server.bat in Windows) file in wso2mb-1.0.2/bin

Setting up WSO2 ESB

  • Copy geronimo-jms_1.1_spec-1.1.0.wso2v1.jar and qpid-client-0.11.0.wso2v2.jar from wso2mb-1.0.2/client-lib to wso2esb-4.5.1/repository/components/lib
  • Enable jms transport Receivers and Senders by uncomment related sections as given below in file wso2esb-4.5.1/repository/conf/axis2/axis2.xml
<transportReceiver name="jms" class="org.apache.axis2.transport.jms.JMSListener">
 <!--Only Enabled settings related to Queue since the sample here only uses a queue-->
 <parameter name="myQueueConnectionFactory" locked="false">
 <parameter name="java.naming.factory.initial" locked="false">org.apache.qpid.jndi.PropertiesFileInitialContextFactory</parameter>
 <parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
 <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
 <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
 </parameter>
 <parameter name="default" locked="false">
 <parameter name="java.naming.factory.initial" locked="false">org.apache.qpid.jndi.PropertiesFileInitialContextFactory</parameter>
 <parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter>
 <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">QueueConnectionFactory</parameter>
 <parameter name="transport.jms.ConnectionFactoryType" locked="false">queue</parameter>
 </parameter>
</transportReceiver>
.........
<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/>
  • Set wso2esb-4.5.1/repository/conf/jndi.properties file as follows.
.....
#Need change QueueConnection factory as follows
connectionfactory.QueueConnectionFactory = amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5673'

# register some queues in JNDI using the form
# queue.[jndiName] = [physicalName]
destination.myqueue=destinationMyQueue; {create:always}

# register some topics in JNDI using the form - Commented since this sample is not going to use Topics
# topic.[jndiName] = [physicalName]
#topic.MyTopic = example.MyTopic
  • Now start WSO2 ESB by executing wso2server.sh (wso2server.bat in Windows) inside wso2esb-4.5.1/bin
  • Change the configuration of ESB to the following.
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://ws.apache.org/ns/synapse">
 <proxy name="StockQuoteProxy"
 transports="http"
 startOnLoad="true"
 trace="disable">
 <description/>
 <target>
 <!-- Send message to WSO2 MB -->
 <endpoint>
 <address uri="jms:/myqueue?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.qpid.jndi.PropertiesFileInitialContextFactory&amp;java.naming.provider.url=repository/conf/jndi.properties&amp;transport.jms.DestinationType=queue"/>
 </endpoint>
 <inSequence>
 <property name="OUT_ONLY" value="true"/>
 <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
 <property name="transport.jms.ContentTypeProperty"
 value="Content-Type"
 scope="axis2"/>
 </inSequence>
 <outSequence>
 <property name="TRANSPORT_HEADERS" scope="axis2" action="remove"/>
 <send/>
 </outSequence>
 </target>
 </proxy>
 <sequence name="fault">
 <log level="full">
 <property name="MESSAGE" value="Executing default "fault" sequence"/>
 <property name="ERROR_CODE" expression="get-property('ERROR_CODE')"/>
 <property name="ERROR_MESSAGE" expression="get-property('ERROR_MESSAGE')"/>
 </log>
 <drop/>
 </sequence>
 <sequence name="main">
 <log/>
 <drop/>
 </sequence>
</definitions>

The JMS URL is made up of:

jms:/myqueue

Look for a JNDI entry “myqueue”(see jndi properties above)

?   Separator indicating extra attributes

transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory

Look up ConnectionFactory in JNDI with name QueueConnectionFactory

&            Separator (this will convert to ‘&’)

java.naming.factory.initial=org.apache.qpid.jndi.PropertiesFileInitialContextFactory

Use the Qpid properties-based JNDI

&             Another separator

java.naming.provider.url=repository/conf/jndi.properties

Look in repository/conf/jndi.properties for the JNDI properties file

Now you  can send messages from sample/axis2Clint as follows to the ESB proxy and they will get stored in WSO2 MB.

ant stockquote -Dtrpurl=http://localhost:8280/services/StockQuoteProxy -Dsymbol=WSO2

The stored message can be consumed by any consumer who is keen on destinationMyQueue of WSO2 MB.

References

[1] WSO2 ESB – http://wso2.com/products/enterprise-service-bus/

[2] WSO2 MB – http://wso2.com/products/message-broker/

[3] Introduction to Message Broker – http://pzf.fremantle.org/2011/04/introduction-to-wso2-message-broker_05.html

[4] Pub/Sub in SOA – http://wso2.org/library/articles/2011/12/wso2-esb-example-pubsub-soa

Advertisements

21 thoughts on “Connect WSO2 ESB with WSO2 MB

  1. WSO2 has launched the latest version of WSO2 MB 2.0.1. So above configuration needs few more changes as follows.
    In setting up MB you need to change ‘connectionString’ to : localhost:9161 in wso2mb-1.0.2/repository/conf/advancedqpid-virtualhosts.xml file.

    In setting up ESB you have to clear previous geronimo-jms_1.1_spec-1.1.0.wso2v1.jar and qpid-client-0.11.0.wso2v2.jar files from both /repository/components/lib & /repository/components/dropins
    Then copy; andes-client-0.13.wso2v4.jar
    geronimo-jms_1.1_spec-1.1.0.wso2v1.jar
    FROM wso2mb-2.0.1/client-lib TO wso2esb/repository/components/lib folder.

    Comment the ESB previous jms transport reciver in axis2.xml
    and uncomment the jms transport receiver for MB 2.x.x in the same file.

    Change the following lines in jndi.properties as follows:
    …….
    connectionfactory.QueueConnectionFactory = amqp://admin:admin@clientID/carbon?brokerlist=’tcp://localhost:5673′

    # register some queues in JNDI using the form
    # queue.[jndiName] = [physicalName]
    queue.myQueue=destinationMyQueue

    In your ESB configuration endpoint should be changed as follows:

    Now you have configured WSO2 MB 2.0.1 as a endpoint for WSO2 ESB.

  2. Hi Buddhima,
    Awesome post, it realy help me, im was doing wrong…

    im trying to use a JMS Message Store, but im getting no erros and my messages dosnt get the queue…

    can u show, how to use a JMS Message Store?

    thank´s a lot man

  3. yeah im following this one, indeed this start everything,

    u talk about de .jars we need and about uncomment some files…

    i guess, everything u guys say i did…

    Message Store in Memory its working, part 1from wso2post, but JMS, dosnt.

    im using the same exalmple, just change the store and processor.

    My MessageStore look like this;

    org.apache.qpid.jndi.PropertiesFileInitialContextFactory
    repository/conf/jndi.properties
    JMSMS
    1.1
    false

    Processor:

    4000
    SendToMessageRateDisplayService

    my JNDI file at ESB_HOME/repository/conf

    # register some connection factories
    # connectionfactory.[jndiname] = [ConnectionURL]
    connectionfactory.TopicConnectionFactory = amqp://admin:admin@carbon/carbon?brokerlist=’tcp://localhost:5672′;
    connectionfactory.QueueConnectionFactory = amqp://admin:admin@carbon/carbon?brokerlist=’tcp://localhost:5672′;

    # register some queues in JNDI using the form
    # queue.[jndiName] = [physicalName]
    queue.JMSMS=JMSMS;

    my Queue list at MB
    JMSMS
    JMSMS;

    1. Hi Johanes,
      I’m not aware of the version of WSO2 MB you are using.
      So if it’s MB 2.0.1 or later , it uses Andes instead of Qpid. So “org.apache.qpid.jndi.PropertiesFileInitialContextFactory” should be changed as “org.apache.andes.jndi.PropertiesFileInitialContextFactory” (same thing mentioned in axis2.xml too)

      Another mistake is incorrect port number. ‘tcp://localhost:5672’ is wrong. This default value should be increased by the offset you set. Eg: if offset of WSO2 MB is 1, then ‘tcp://localhost:5673’.

      Thanks !

  4. Hi Buddhima,

    yes im using MB 2.0.0

    hell yeah its working now!!! i should use this config: “org.wso2.andes.jndi.PropertiesFileInitialContextFactory”

    about the mb port its realy 5672, i didnt change MB config, i did it on ESB 😉

    thank you so much!

  5. Hi Buddhima,

    I followed your article. I m using esb 4.5.1 and mb 2.0.0.

    Still m not able to make it work.

    I have kept mb on port 9443 and esb on 9445.

    But my esb starts at 8245 and m getting exception.

    Posting logs:

    TID: [0] [ESB] [2013-03-01 10:28:48,888] ERROR {org.wso2.carbon.event.core.internal.builder.EventBrokerHandler} – Can not create the event broker {org.wso2.carbon.event.core.internal.builder.EventBrokerHandler}
    org.wso2.carbon.event.core.exception.EventBrokerConfigurationException: Can not connect to the remote Qpid Service
    at org.wso2.carbon.event.core.internal.delivery.jms.QpidJMSDeliveryManagerFactory.getDeliveryManger(QpidJMSDeliveryManagerFactory.java:120)
    at org.wso2.carbon.event.core.internal.CarbonEventBrokerFactory.getEventBroker(CarbonEventBrokerFactory.java:71)
    at org.wso2.carbon.event.core.internal.builder.EventBrokerBuilder.createEventBroker(EventBrokerBuilder.java:56)
    at org.wso2.carbon.event.core.internal.builder.EventBrokerHandler.startEventBroker(EventBrokerHandler.java:56)
    at org.wso2.carbon.event.core.internal.builder.EventBrokerBuilderDS.activate(EventBrokerBuilderDS.java:72)
    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:601)
    at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:252)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:346)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:588)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:196)
    at org.eclipse.equinox.internal.ds.Resolver.getEligible(Resolver.java:328)
    at org.eclipse.equinox.internal.ds.SCRManager.serviceChanged(SCRManager.java:221)
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:104)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:451)
    at org.wso2.carbon.core.init.CarbonServerManager.initializeCarbon(CarbonServerManager.java:513)
    at org.wso2.carbon.core.init.CarbonServerManager.removePendingItem(CarbonServerManager.java:290)
    at org.wso2.carbon.core.init.PreAxis2ConfigItemListener.bundleChanged(PreAxis2ConfigItemListener.java:118)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:847)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
    Caused by: org.apache.axis2.AxisFault: Connection refused: connect
    at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
    at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:197)
    at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:450)
    at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:277)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    at org.wso2.carbon.event.client.stub.generated.authentication.AuthenticationAdminServiceStub.login(AuthenticationAdminServiceStub.java:345)
    at org.wso2.carbon.event.core.internal.delivery.jms.QpidJMSDeliveryManagerFactory.getDeliveryManger(QpidJMSDeliveryManagerFactory.java:100)
    … 31 more
    Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:75)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:337)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:198)
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
    at java.net.Socket.connect(Socket.java:579)
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:607)
    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:601)
    at org.apache.commons.httpclient.protocol.ReflectionSocketFactory.createSocket(ReflectionSocketFactory.java:140)
    at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:130)
    at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
    at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
    at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
    at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
    at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
    at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:621)
    at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:193)
    … 40 more
    TID: [0] [ESB] [2013-03-01 10:28:50,300] INFO {org.wso2.carbon.ui.internal.CarbonUIServiceComponent} – Mgt Console URL : https://10.224.188.94:8245/carbon/ {org.wso2.carbon.ui.internal.CarbonUIServiceComponent}
    TID: [0] [ESB] [2013-03-01 10:29:44,316] WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} – Waiting for required OSGi services: org.wso2.carbon.mediation.initializer.services.SynapseEnvironmentService, {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent}
    TID: [0] [ESB] [2013-03-01 10:30:44,317] WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} – Waiting for required OSGi services: org.wso2.carbon.mediation.initializer.services.SynapseEnvironmentService, {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent}
    TID: [0] [ESB] [2013-03-01 10:31:44,317] WARN {org.wso2.carbon.core.internal.StartupFinalizerServiceComponent} – Waiting for required OSGi services:

    why is it taking qpid instead of andes?

    please help.
    thanks.

    1. Hi Naveen,
      Please make sure that to clear previous geronimo-jms_1.1_spec-1.1.0.wso2v1.jar and qpid-client-0.11.0.wso2v2.jar files from both /repository/components/lib & /repository/components/dropins (If you tried with previous versions of WSO2 MB) and put necessary files as mentioned in my first comment.
      Hope you have made necessary Axis2 configurations correctly.
      Andes is derived from Qpid project. Thus Qpid specific things may still exist.
      Normally we start MB with a offset and point ESB which runs on default port to it, opposite to what you’ve done.
      Not sure about the problem with port. (May be ESB Management Console url)
      I forwarded your question to a member of MB team (Hasitha Abeykoon), and he gave those suggestions.
      This link will tell you more about configuring WSO2 ESB with WSO2 MB: http://abeykoon.blogspot.com/2012/12/configuring-wso2-esb-451-with-wso2-mb.html
      🙂

  6. Hi Buddhima,
    I have used two instances of WSO2 ESB 4.6 at port number 9443(esb1) and 9446(esb2) and also using Message Broker 2.0.1 at 9444. I am using this url as my tutorial :http://wso2.org/library/articles/2013/03/configuring-wso2-esb-wso2-message-broker. I have done the Queue to queue send recieve example using the above link. And everything is working fine. But the problem is when i post any message to esb1, it gets reflected to esb2 since esb2 is working as my subscriber. I want that message store should store that message passed on from esb1 and based on some event it should provide esb2 the messages sent by esb1. How to do this?

    1. Hi Roy,
      Did you have a look at Topics? Isn’t that the solution for your problem?
      Depending on the content of messages, ESB1 could direct messages to different Topics in MB. Then you can configure ESB2 to the required Topic and it’ll get only the required messages.
      Hope this will help you Roy 🙂

  7. Yes this is the approach that i have taken but the problem is i want to store my messages to message store and process it via message processor at the reciever side i.e esb2 but i am unable to implement the message store successfully to the proxy that has been provided in the url that i specified. I am struck at that part only. Not able to passs the message from esb1 to message store of esb2.

  8. Hi,
    I have two scenario’s that i have to achieve:
    Scenario:!
    Client 1 Sends the message to ESB -> ESB consumes the message and stores it into the queue -> End of Scenario1;
    This is done.
    Second Scenario is :
    Client 2 sends a request to ESB to get messages -> ESB gets the messages from the queue defined for Client 2 -> ESB sends back a pack of message that were present in the queue

    I am unable to do the second scenario?
    Please help me on this

    1. Hi Roy,
      As far as I can see, 2nd scenario is impossible to accomplish according to the proposed way.
      WSO2 ESB currently has only 2 ways of taking off messages from a Message store;
      1. Through a JMS proxy
      2. Using a Message Processor
      Non of them is able to trigger from a message.
      But, a possible way might be to write a Service to take messages from message store (hope you’re talking about MB, if so follow creating MB clients to read messages) and aggregate them (ESB aggregate mediator only aggregates response messages).
      So, you can expose the above Service to ESB through an Endpoint, and create a filter which sends only a certain type of messages to that Endpoint. Response of that Endpoint should be aggregated message (a pack of message that were present in the queue).
      Keep in mind that ESB is mainly for Message Mediation. Other services are optional.
      In here I expressed my personal opinion about the question you asked. You can contact WSO2 ESB team for more information.
      Thanks !

  9. How to achieve this scenario :
    I have message in MB’s queue. I have a proxy in which i have used a wsdl that has two operation
    OpenSession and ReadMessage. So at first i access the OpenSesssion, it returns me SessionID as response. I copy that SessionID. Now i access the ReadMessage Operation where in i am passing the sessionID as request and in return this operation will get the message from queue and show as response.
    Waiting for your help on this.
    Thanks in advance

    1. Hi Roy,
      Hope “I have a proxy in which i have used a wsdl that has two operation” means you have a service and its WSDL is used as proxy’s WSDL.
      There are 2 approaches.
      1. Using Send mediator you can first send the message to service to take SessionID, then by specifying a Receiving Sequence, you can do access ReadMessage. You may need some other mediators too. (Send mediator: http://docs.wso2.org/wiki/display/ESB460/Send+Mediator)
      2. Consider about Routing Slip EAI pattern (http://docs.wso2.org/wiki/display/IntegrationPatterns/Routing+Slip).
      Hope those will help you 🙂

  10. but didn’t get how i can get message from queue of MB at my ReadMessage Operation.
    Basicallyy i am using filter mediators to check which operation has been invoked. If filter for OpenSession is true then it will provide me session Id as response and if filter for ReadMessage is true then it will fetch message from queue. So at this filter i am unable to write a code that can fetch data from queue of messagebroker.Please help me. Badly need to know how i can get message from queue on ReadMessage Filter when it is true.

  11. Hi Buddhima,

    Iam using WSO2 ESB 4.7.0 and WSO2 MB 2.2.0, ihave followed your post and configured my ESB and MSB.

    when am testing my proxy am facing an error as shown below

    JMSOutTransportInfo Could not get an initial context using {java.naming.provider.url=repository/conf/jndi.properties, java.naming.factory.initial=org.apache.qpid.jndi.PropertiesFileInitialContextFactory, transport.jms.DestinationType=queue, transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory}
    javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hash table. [Root exception is java.lang.ClassNotFoundException: class org.apache.qpid.jndi.PropertiesFileInitialContextFactory not found]
    at org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextDataHolder.java:816)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:305)
    at javax.naming.InitialContext.init(InitialContext.java:240)
    at javax.naming.InitialContext.(InitialContext.java:214)
    at org.apache.axis2.transport.jms.JMSOutTransportInfo.loadConnectionFactoryFromProperties(JMSOutTransportInfo.java:126)
    at org.apache.axis2.transport.jms.JMSOutTransportInfo.createJMSSender(JMSOutTransportInfo.java:330)
    at org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:125)
    at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
    at org.apache.axis2.description.OutOnlyAxisOperationClient.executeImpl(OutOnlyAxisOperation.java:297)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
    at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:481)
    at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:57)
    at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:342)
    at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:329)
    at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:59)
    at org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServiceMessageReceiver.java:183)
    at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
    at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:337)
    at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:169)
    at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:679)
    Caused by: java.lang.ClassNotFoundException: class org.apache.qpid.jndi.PropertiesFileInitialContextFactory not found
    at org.wso2.carbon.context.internal.CarbonContextDataHolder.classForName(CarbonContextDataHolder.java:1530)
    at org.wso2.carbon.context.internal.CarbonContextDataHolder.access$800(CarbonContextDataHolder.java:108)
    at org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextDataHolder.java:812)
    … 24 more

    Please help me on this,

    Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s