Tuesday, April 23, 2013

Weblogic Server Not Starting Due to Expired Database Accounts



If you are unable to start your weblogic server and you are getting the following errors, it is being caused by your oracle accounts expiring and the fix is quite easy.

Errors

####<Apr 23, 2013 9:09:16 AM MST> <Error> <Deployer> <localhost.osbsoavm> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <0000JsrdyCXFw000jzwkno1HTf7V000002> <1366733356615> <BEA-149205> <Failed to initialize the application 'wlsbjmsrpDataSource' due to error weblogic.application.ModuleException: .
weblogic.application.ModuleException:
 .........
Caused By: weblogic.common.ResourceException: weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: ORA-28001: the password has expired

<BEA-280061> <The persistent store "JDBCStore-0" could not be deployed: weblogic.store.PersistentStoreException: Can't find JDBC DataSource wlsbjmsrpDataSource: javax.naming.NameNotFoundException: Unable to resolve 'wlsbjmsrpDataSource'. Resolved ''; remaining name 'wlsbjmsrpDataSource'
weblogic.store.PersistentStoreException: Can't find JDBC DataSource wlsbjmsrpDataSource: javax.naming.NameNotFoundException: Unable to resolve 'wlsbjmsrpDataSource'. Resolved ''; remaining name 'wlsbjmsrpDataSource'


Fix 

            1. Check to see if any of the accounts are expired
                           select username, profile, account_status, expiry_date from dba_users;
2. If no accounts are expired, you can skip to step 7
3.  Dynamically create SQL that will unexpired the expired accounts.  You can unexpired the 
     account by resetting the password.   NOTE: You will need to substitute <password> for the password you are using for your user.
                            select 'ALTER USER ' || username || ' identified by <password>;'
                            from dba_users where account_status like 'EXPIRED%' and username != 'XS$NULL';
                  4. Execute the SQL generated in Step 3
                  5.  Dynamically create SQL that will unlock the locked accounts.
                             select 'ALTER USER ' || username || ' account unlock;' from dba_users where 
                             account_status like 'LOCKED%' and username != 'XS$NULL';
6.  Execute the SQL generated in Step 5
7. Modify the profile assigned to the accounts that you don’t want to expire so the 
    PASSWORD_LIFE_TIME is set to UNLIMITED.  This will keep them from expiring 
    again.  In my case, I needed to update the DEFAULT profile.
alter profile DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED ;

3 comments:

  1. Hi Jared
    i encounter the same problem in our Web Logic Server.
    but my big problem is I don't know previous password from my database (Repository)
    so i can't active my users with previous password.
    can you tell me how can i register new password in my web logic server?
    sorry for my amateur question, i'm beginner in Web Logic.

    ReplyDelete
  2. The password for the expired accounts will not be stored in Weblogic. The easiest fix would be to log into the Oracle database as sys or system and change the passwords of the expired accounts. When you are logged in as one of these users you don't have to know the old password. Hope this helps.

    ReplyDelete
  3. Thanks Jared this saved my time and effort ....

    ReplyDelete