wso2 / product-sp

An open source, cloud-native streaming data integration and analytics product optimized for agile digital businesses
https://wso2.com/analytics-and-stream-processing/
Apache License 2.0
120 stars 132 forks source link

Error starting Siddhi App in WSO2 Stream Processor: javax/jms/JMSContext #1061

Open nelsonandredias opened 4 years ago

nelsonandredias commented 4 years ago

Description:

I'm trying to use a queue from Tibco EMS as a source of the Siddhi application.

For that, I used the documentation about ActiveMQ as a reference and generated successfully the OSGi-converted jar for the tibjms.jar.

Within this step I was able to Register the InitialContextFactory:

C:\PROGRA~1\WSO2\STREAM~1\446521~1.0\bin>icf-provider.bat com.tibco.tibjms.naming.TibjmsInitialContextFactory C:/DevTools/tibjms.jar C:/DevTools/ JAVA_HOME environment variable is set to C:\Program Files\Java\jdk1.8.0_151 CARBON_HOME environment variable is set to C:\PROGRA~1\WSO2\STREAM~1\446521~1.0\bin.. Feb 18, 2020 10:46:05 PM org.wso2.carbon.tools.spi.ICFProviderTool execute INFO: Executing 'jar uf C:\DevTools\tibjms\tibjms.jar -C C:\DevTools\tibjms \internal\CustomBundleActivator.class' Feb 18, 2020 10:46:05 PM org.wso2.carbon.tools.spi.ICFProviderTool addBundleActivatorHeader INFO: Running jar to bundle conversion Feb 18, 2020 10:46:06 PM org.wso2.carbon.tools.converter.utils.BundleGeneratorUtils convertFromJarToBundle INFO: Created the OSGi bundle tibjms_1.0.0.jar for JAR file C:\DevTools\tibjms\tibjms.jar Then, I created the OSGI-converted jars for the remaining tibco ems jars:

jms-2.0.jar tibemsd_sec.jar tibjmsadmin.jar tibjmsapps.jar tibjmsufo.jar tibrvjms.jar At this point, I copied all the OSGI jars to the "/lib" directory and the original jars to the "/samples/sample-clients/lib" directory.

Next, I send a couple messages to the queue "queue.sample" a testing message with the textbody "hello queue".

Then, I created the following Siddhi application to use the EMS queue a source:

@App:name('TIBCOQueueSource') @App:description('Use EMS que as SP source')

@source(type = 'jms', destination = "queue.sample", factory.initial = "com.tibco.tibjms.naming.TibjmsInitialContextFactory", provider.url = "tcp://127.0.0.1:7222", @map(type = 'text')) define stream inputStream (name string);

@info(name='query_name') from inputStream select name insert into outputStream;

from outputStream#log("logger") select * insert into tmp; Finally, when I run or launch an event simulator I got the following error in the logs:

[2020-02-18 22:59:31,006] ERROR {org.wso2.siddhi.core.SiddhiAppRuntime} - Error starting Siddhi App 'TIBCOQueueSource', triggering shutdown process. javax/jms/JMSContext

So, based on this discription am I doing something wrong? Am i missing any step of the process?

Tks in advance for all the help

Affected Product Version: SP 4.4.0