Oracle Password Reset using CONNECTION_PROPERTY_SET_NEW_PASSWORD [message #656196] |
Wed, 28 September 2016 01:23 |
|
chrisjonesapps
Messages: 1 Registered: September 2016
|
Junior Member |
|
|
Hi All, I am new to this forum so I am hoping that you can help. I am writing a swing app which logs on to the Oracle database from user input. All of this is fine, however, I want the ability for users to change their password once this has expired. I have the following but cannot seem to get this to work as it returns expired password even though I am sending the property through in the new connection using a thin client. Please see below:
if(ex.getErrorCode() == 28001){
try {
conStr.loginReset(); //Opens jpanel for new password
Properties pr = new Properties();
pr.put(OracleConnection.CONNECTION_PROPERTY_SET_NEW_PASSWORD, conStr.resetlogininformation.get("resetPassword"));//new password
pr.put("password",conStr.resetlogininformation.get("pass"));//expired password
pr.put("user",conStr.resetlogininformation.get("user"));//user name
conn = (OracleConnection) DriverManager.getConnection(conStr.resetATG(),pr);
} catch (SQLException ex1) {
Logger.getLogger(CPCFunctions.class.getName()).log(Level.SEVERE, null, ex1);
System.out.println("" + ex);
}
Has anyone had any joy with this?
|
|
|