I am having some difficulty creating a jdbc connection when I try to specify the username/password in the URL. For example, if I have the following code in a try/catch:
String url = "jdbc:oracle:thin:jts_db_user/********@gpdv6.sandia.gov:1525/gpdv6..world";
Connection conn = DriverManager.getConnection(url);
I get an exception: "java.sql.SQLException: Invalid Oracle URL specified"
However, if I omit the user/name and password from the URL and pass it to the "getConnection" method as follows:
String url = "jdbc:oracle:thin:@gpdv6.sandia.gov:1525/gpdv6..world";
Connection conn = DriverManager.getConnection(url, "jts_db_user", "*******");
I get a valid connection object (and can execute SQL commands against it).
I am using "ojdbc8.jar".
Why am I not able to get a connection when I pass the username/password in the URL?