here is my java code
public static Map propertyFileReader() {
Map map=new HashMap();
You are using wrong package to refer OracleDriver
class
Change
oracle.jdbc.driver.OracleDriver
To
oracle.jdbc.OracleDriver
From oracle docs class definition
public class OracleDriver
extends oracle.jdbc.driver.OracleDriver
The Oracle JDBC driver class that implements the java.sql.Driver
interface.
Use this as Oracle Driver
oracle.jdbc.OracleDriver
instead of
oracle.jdbc.driver.OracleDriver
This answer is a "bit" late, but the accepted answer is not correct, so I post this for anybody unfortunate enough to attempt to copy/paste the code and wondering what went wrong.
The accepted answer is so far correct that
oracle.jdbc.driver.OracleDriver
is deprecated, but it is still working in 2020. The problem with the posted code is that the properties file is using semicolons and quotation marks, which are not valid. So changing the properties file from
DB_DRIVER = "oracle.jdbc.driver.OracleDriver";
DB_CONNECTION2 = "jdbc:oracle:thin:@10.2.5.23:1521:dbslic";
DB_USER = "TSR_MOBILE";
DB_PASSWORD = "TSR_MOBILE";
to
DB_DRIVER = oracle.jdbc.driver.OracleDriver
DB_CONNECTION2 = jdbc:oracle:thin:@10.2.5.23:1521:dbslic
DB_USER = SR_MOBILE
DB_PASSWORD = TSR_MOBILE
makes the error go away.