Hi all,

We are currently in the process of adding listening mode CDC support for
oracle in our siddhi-io-cdc extension using the debezium connector while
writing the extension I ran into the following error

[2019-10-30 11:49:14,019] ERROR
{io.debezium.relational.RelationalSnapshotChangeEventSource} - Failed to
initialize snapshot context. java.lang.RuntimeException:
java.sql.SQLException: No suitable driver found for
jdbc:oracle:oci:@10.100.5.219:1521/ORCLCDB

This error occurs because of  the JDBC driver jar required for the Debezium
Oracle connector is a non-OSGi bundle with SPI services when used
jartobundle.sh tool to convert it to an OSGi bundle those SPI services
won’t get copied. To solve this we tried a few quick solutions

   1.

   Creating the SPI related files inside the resources in META-INF folder -
   didn’t work
   2.

   Unzipping the OSGi converted ojdbc jar and copying the SPI related files
   to META-INF folder and compressing and creating the jar - didn’t work
   3.

   Create the ojdbc jar using icf-provider tool by registering the spi
   class name - Worked with BundleActivator Exceptions when starting the pack
   4.

   Manually loaded the class inside the extension using the Class.forname()
   method - worked without any OSGi errors at the start


In above, option #4 worked in mac OS. Then, while testing on Ubuntu the
following error appears


[2019-10-30 07:47:21,408] ERROR {io.debezium.pipeline.ErrorHandler} -
Producer failure java.lang.RuntimeException:
java.lang.UnsatisfiedLinkError:
oracle.streams.XStreamOut.XStreamOutAttachNative(JJLjava/lang/String;[BIII)V

Tried the following to solve it without any success


   1.

   Check using the jar that is created using the icf-provider
   2.

   Thought it was a remote connectivity issue created the Oracle database
   and ran the StreamingIntegrator in the same host
   3.

   Tried copying the OJDBC and Xstreams jars into JDK_HOME/jre/lib
   4.

   Tried setting the classpath to oracle lib folder by -Djava.library.path
   5.

   Tried the Debezium connector separately as a fat jar - works.


All the steps that were followed are documented in the doc[1] provided
below, Appreciate any help you can give on this.

[1] -
https://docs.google.com/document/d/1XbkFxFjmsmSQsXUb9smMusz-mwO6Ko_8QDd8L51cZOY/edit?usp=sharing
Thanks and Regards,
-- 
*Charuka Karunanayake*
Software Engineer | WSO2

E-mail: [email protected]
Mobile: +94711611848
Web: http://wso2.com

<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to