调试Web项目的时候出现异常:
- java.sql.SQLException: ORA-28001: the password has expired
连接Oracle,以Oracle用户登陆,输入以下命令
- select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';
- PROFILE
- ------------------------------------------------------------
- RESOURCE_NAME
- ------------------------------------------------------------
- RESOURCE_TYPE
- ----------------
- LIMIT
- ------------------------------------------------------------
- DEFAULT
- PASSWORD_LIFE_TIME
- PASSWORD
- 180
- ------------------------------------------------------------
输入命令:
- alter profile default limit password_life_time unlimited;
- commit;
- select * from dba_profiles where profile='DEFAULT' and resource_name='PASSWORD_LIFE_TIME';
- PROFILE
- ------------------------------------------------------------
- RESOURCE_NAME
- ------------------------------------------------------------
- RESOURCE_TYPE
- ----------------
- LIMIT
- ------------------------------------------------------------
- DEFAULT
- PASSWORD_LIFE_TIME
- PASSWORD
- UNLIMITED
- ------------------------------------------------------------
改变密码的命令
- alter user XXXUSER identified by Welcome1;
- alter user XXXUSER identified by oracle account unlock;
再次调试,问题解决
from: http://blog.csdn.net/android_robot/article/details/7598345