getting error trying to integrate Solace with Mulesoft using Solace JMS feature.

I have set all the properties required for the integration. But still I am getting below error
** Cannot instantiate class: com.solacesystems.jndi.SolJNDIInitialContextFactory
java.lang.RuntimeException: org.mule.runtime.api.lifecycle.InitialisationException:
org.mule.runtime.api.lifecycle.InitialisationException:
Cannot instantiate class: com.solacesystems.jndi.SolJNDIInitialContextFactory.
**
I have kept all jars as below in pom.xml
• Commons-lang-.jar
• Commons-logging-.jar
• Geronimo-jms_1.1_spec-.jar
• Sol-common-.jar
• Sol-jcsmp-.jar
• Sol-jms-.jar

Answers

  • amackenzie
    amackenzie Member, Employee Posts: 268 Solace Employee

    It looks like the JARs you mention are not in the Mulesoft classpath. Is there a /lib folder where they are supposed to go within Mulesoft? You need those JARs, yes, but they also must be somewhere that Mulesoft can find them which is specific to the JMS app.

  • Kinjal Shah
    Kinjal Shah Member Posts: 10

    But I am getting this error with mule version 4.3 and with mule 3.9 things are working fine

  • dwille_axway
    dwille_axway Member Posts: 7

    @Kinjal Shah - Not sure if it will help with the Mule integration, but I documented the JMS integration with the Axway APIM here: https://solace.community/discussion/242/solace-and-axway-amplify-api-management-apim-via-jms-part-3
    Some of the configuration may be transferable.

  • himanshu
    himanshu Member, Employee Posts: 67 Solace Employee
    edited May 2020 #5

    Hi @Kinjal Shah - I am not an expert in Mulesoft but I tried establishing a connection with my PubSub+ broker and it worked. In your JMS config > General > Required Libraries section, click on Configure and select Add Maven dependency.

    There, paste this:

    <dependency>
       <groupId>com.solacesystems</groupId>
       <artifactId>sol-jms</artifactId>
       <version>10.2.1</version>
    </dependency>
    

    Don't change anything else. Click Finish. That should do it.