1 Reply Latest reply on Dec 6, 2012 7:38 PM by 977834

    Java: Change password using OCI


      I try to change an expired password from Java. That's not possible with thin client, I know, but should work with "thick", i.e. OCI. So far, I have this:

      1. Properties props = new Properties();
      2. props.put("user", "my username");
      3. props.put("password", "my old password");
      4. props.put("OCINewPassword", "my new password");
      5. String ociUrl = "jdbc:oracle:oci:@...";
      6. Connection connection = DriverManager.getConnection(ociUrl, props);

      But I'm getting a "java.sql.SQLException: ORA-01017: invalid username/password; logon denied".

      The client's OS is Windows 7. Oracle instant client (11.2) is installed an on the Path. The database is Oracle 11.2

      And "my old password" is correct, for sure! If I comment out line 4, connecting works, and I'm getting a oracle.jdbc.driver.T2CConnection (whereas in "thin"-mode, I get a T4CConnection).

      Any help or hint is much appreciated.



      Edited by: Stefan on 04.12.2012 02:40, changed title

      Edited by: Stefan on 04.12.2012 03:27, typo

      Crossposted at Java: Change password using OCI