Below is my code which I am trying to connect.
public Connection Connect() throws SQLException{
try
{
DriverManager.registerDriver(new oracle.jdbc.OracleDriver());
OracleDataSource ods = new OracleDataSource();
ods.setURL("jdbc:oracle:thin:TSOFT1/TSOFT1@10.184.132.130:1521/FCUTILS");
con = ods.getConnection();
return con;
}catch(Exception ex){
ex.printStackTrace();
con.close();
return null;
}
}
I tried to search an answer for this but nothing worked.