I am creating a java scheduled task in OIM. Part of the code is to access OIM database via JDBC. My code below:
String URL = "jdbc:oracle:thin:@10.10.171.160:1523:IAMDB";
String USER = "username";
String PASS = "password";
Class.forName("oracle.jdbc.driver.OracleDriver");
connection = DriverManager.getConnection(URL, USER, PASS);
I'm getting error in line 6
java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection
I tried accessing the database in SQL Developer using the same credentials and it's working
- Hostname: 10.10.171.160
- Port: 1523
- ServiceName: IAMDB
You can use jdbc Data Source configured on your WL server.
}