We have a use case to connect to oracle database and subscribe to Advanced
Queuing (https://docs.oracle.com/cd/A58617_01/server.804/a58241/ch_aq.htm).
Below is the java snippet to establish this connection from a java client.
We can run this in eclipse and consume message from the advanced queue.
**************
            Class.forName("oracle.jdbc.driver.OracleDriver");
            connection = DriverManager.getConnection("
jdbc:oracle:thin:@xxx-yyy.zzz.com:1521/DB1","user", "pwd");
            connection.setAutoCommit(true);
            Class.forName("oracle.AQ.AQOracleDriver");
            aqSession = AQDriverManager.createAQSession(connection);
            System.out.println("AQ Session --->" + aqSession);
********************

We have created a custom processor in Nifi. This processor is getting the
connection string using getConnection function of Standard DBCP service.
The problem is, the connection object that is retrieved from eclipse versus
what is returned from DBCP service is different. We have made sure we are
referring to the same jar both in eclipse and Nifi (ojdbc7.jar)
It fails @  aqSession = AQDriverManager.createAQSession(connection);
The connection object that comes from DBCP is not what is expected by
AQDriverManager.

Any help is greatly appreciated.

Thanks
Anil

Reply via email to