简体   繁体   中英

Getting exception while querying Oracle using Hibernate?

Am getting the following exception while executing a select query in my GWT application.

2013-01-15 19:36:34,407  WARN [org.hibernate.util.JDBCExceptionReporter] [btpool0-0] (JDBCExceptionReporter.java:100) - SQL Error: 28001, SQLState: 99999
2013-01-15 19:36:34,407 ERROR [org.hibernate.util.JDBCExceptionReporter] [btpool0-0] (JDBCExceptionReporter.java:101) - ORA-28001: the password has expired
ORA-02063: preceding line from LOCAL

Unable to figure out the reason. Could some one help me to resolve this issue?

Oracle Version : 11g

Hibernate Version : 3.4.0

thanks in advance.

The error message says, the password has expired. You need to check your credentials and the credentials in your properties file or db.xml file. Can you log in with your credentials from command line?

If you are using windows, try this. This is used to reset the password:

set ORACLE_HOME=<YOUR_ORACLE_HOME>;
set ORACLE_SID=<SID>
Sqlplus / as sysdba
startup ;

After database started up ;

SQL > alter user <USERNAME> identified by <password >

The issue is one of two things:

1) Your password has expired, you need to update it.

2) The system thinks your password is expired, you need to update it.

This can be solved quite easily if you open SQL Developer and do the following:

Right click on the connection -> Change password

If you are running multiple databases (such as a test and production) change the password in all places, this may sound off, but there are other questions that have this same problem resolution.

source

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM