org.wso2.andes.jndi." /> org.wso2.andes.jndi." /> org.wso2.andes.jndi."/>

Not able to configure JMS queue in WSO2 IoT server : missing documentation

142 views Asked by At

I am using the following setting in JMS queue receiver using the settings given here

 <property name="java.naming.factory.initial">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</property>
    <property name="java.naming.provider.url">repository/conf/jndi.properties</property>
    <property name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</property>
    <property name="transport.jms.UserName">admin</property>

I am getting the following error

Caused by: javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hash table. [Root exception is java.lang.ClassNotFoundException: class org.wso2.andes.jndi.PropertiesFileInitialContextFactory not found]
    at org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextDataHolder.java:491)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
    at javax.naming.InitialContext.init(InitialContext.java:244)
    at javax.naming.InitialContext.<init>(InitialContext.java:216)
    at org.wso2.carbon.event.output.adapter.jms.internal.util.JMSConnectionFactory.<init>(JMSConnectionFactory.java:84)

Can someone please point me to right direction.

2

There are 2 answers

0
Amarjit Dhillon On BEST ANSWER

The issue has been solved. Please find the answer on my blog post.

0
Riverchimp On

The exception gives us a big hint on what is causing the issue.

Root exception is java.lang.ClassNotFoundException: class org.wso2.andes.jndi.PropertiesFileInitialContextFactory not found

It looks like it is missing a library. The guide mentions copying over the andes-client jar which contains the PropertiesFileInitialContextFactory class.

WSO2 ESB needs some libraries to communicate with WSO2 Message Broker. They are available in [MB_HOME]/client-lib folder. Following libraries should be copied to [ESB_HOME]/repository/components/lib folder.

andes-client-0.13.wso2v3

geronimo-jms_1.1_spec-1.1.0.wso2v1