连接数据库的问题谢谢指点
Driver oracle.jdbc.driver.OracleDriver
URL jdbc:oracle:thin:@127.0.0.1:1521:ORCL
username scott
password tiger
在连接oracle数据库时报
java.sql.SQLException: ORA-28001: the password has expired
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:277)
at oracle.jdbc.driver.T4CTTIoauthenticate.receiveOauth(T4CTTIoauthenticate.java:784)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:361)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:413)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:164)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:752)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:171)
at com.huiyin.veims.utils.DBUtils.getDBConnection(DBUtils.java:41)
at com.huiyin.veims.utils.DBUtils.main(DBUtils.java:143)
我用 alter user scott account unlock; 解锁了scott用户
请问怎么解决,谢谢!
------解决方案--------------------给scott重设一个密码
------解决方案--------------------密码过期,重新给oracle中ORCL库设置一个密码,更改相应的连接密码就可以了