I am running the following code but I am getting the error about the name of the Oracle class. I have set the classpath environment variable with the oracle jar file but it doesn't work. Somebody could help me? I have no idea what else to do. I really appreciate any help
This is the error : Caused by: java.sql.SQLException: Cannot load JDBC driver class 'oracle.jdbc.driver.OracleDriver'
import apache_beam as beam
from apache_beam.options.pipeline_options import PipelineOptions
from apache_beam.io.jdbc import ReadFromJdbc
import os;
os.environ["JAVA_HOME"] = "/home/jupyter/env/java/jre1.8.0_291"
os.environ["PATH"] = "/home/jupyter/env/java/jre1.8.0_291/bin"
os.environ["ORACLE_HOME"] = "/home/jupyter/env/instantclient_21_1/"
os.environ["CLASSPATH"] = "/home/jupyter/env/ojdbc6-11.2.0.4.jar"
with beam.Pipeline(options=PipelineOptions()) as p:
result = (p
| 'Read from jdbc' >> ReadFromJdbc(
fetch_size=None,
table_name='log_table',
driver_class_name='oracle.jdbc.driver.OracleDriver',
jdbc_url='jdbc:oracle:thin://xx.x.xxx.xxx:xxxx/xxxxx',
username='xxxxxxxx',
password='xxxxxxxx',
))