Monday 29 February 2016

ADMIN server failed to start because of Internal Exception: java.sql.SQLException: ORA-28001: the password has expired for SOA Schemas

========================================================================
Applies To:
BPEL/OSB - 12.1.3
WLS - 12.1.3
Oracle DB - Enterprise Edition - Version 11.2.0.3
========================================================================
Problem:
ADMIN server failed to start because of Internal Exception: java.sql.SQLException: ORA-28001: the password has expired for SOA Schemas

Error:
Caused By: oracle.security.jps.JpsException: oracle.security.jps.service.policystore.PolicyStoreException: javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: ORA-28001: the password has expired

Error Code: 28001
        at oracle.security.jps.internal.config.OpssCommonStartup.start(OpssCommonStartup.java:211)
        at oracle.security.jps.wls.JpsWlsStartup.start(JpsWlsStartup.java:80)
        at oracle.security.jps.JpsStartup.start(JpsStartup.java:186)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.startJPS(CommonSecurityServiceManagerDelegateImpl.java:1499)
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.loadOPSSPolicy(CommonSecurityServiceManagerDelegateImpl.java:1422)
        at weblogic.security.service.CommonSecurityServiceManagerDelegateImpl.preInitialize(CommonSecurityServiceManagerDelegateImpl.java:1090)
        at weblogic.security.service.SecurityServiceManager.preInitialize(SecurityServiceManager.java:925)
        at weblogic.security.PreSecurityService.start(PreSecurityService.java:139)
        at weblogic.server.AbstractServerService.postConstruct(AbstractServerService.java:78)
        at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
========================================================================
Cause: 
Passwords used by SOA (with it’s different users) to access the Database have expired. This is the designed behaviour.
java.sql.SQLException: ORA-28001: the password has expired
========================================================================
Resolution:
1.Log in to SQLPLUS with system as sysdba

2.Execute the following sql command to see all the schemas that are used in your repository and account status,
SET linesize 120
SET pagesize 1000 
col owner FORMAT a20 
col comp_name FORMAT a40 
col version FORMAT a12

SELECT username, profile, account_status, expiry_date, default_tablespace from DBA_USERS where username IN (SELECT owner FROM schema_version_registry);
You should change the passwords of all schemas whose password is expired.

3.Change the SOA schema db password using below command,
ALTER USER user_name identified BY new_password;

Would like to suggest to set new password same as old so that we need not to do DS password update on console.

4.Set password expiry to unlimited using below command,
ALTER PROFILE default LIMIT PASSWORD_LIFE_TIME UNLIMITED;

It will set password expiry to default for all users under the default profile. In case you want to apply this just for some specific users, you can create a dedicated security profile and associate users with this profile,

CREATE PROFILE <profile_name_here> LIMIT PASSWORD_LIFE_TIME UNLIMITED;
ALTER USER <user_name_here> PROFILE <profile_name_here>;

5.Check the changes by logging to DB using SOA schema/password.

6.Log in to weblogic console and go to "Domain Structure/Services/Data Source" to change password in Connection Pool tab for required schema. You can ignore this step if you have set new password same as old.

7.Restart server.