Unable to get managed connection for jdbc

Document ID : KB000107829
Last Modified Date : 27/07/2018
Show Technical Document Details
Issue:
After some time after installation, and without evident reason, CA Identity Governance Jboss Service fails to start , not allowing access to the admin UI
Eurekify.log shows the following:

06:59:57,035 INFO  [STDOUT] (AlertMonitor) 
06:59:57,035 [AlertMonitor] 
ERROR com.workpoint.monitor.support.AlertMonitorThread  - Exception caught while removing monitor rmi://MyServrName:1577/Alert_WPDS_-71ad1fbb:164cddcda80:-7fee
com.workpoint.server.ejb.WorkPointEJBException: Unable to get managed connection for jdbc/WPDS; 
- nested throwable: (javax.resource.ResourceException: Unable to get managed connection for jdbc/WPDS)
Environment:
Identity Governance , applicable to any release
Oracle 12c Database
JBOSS 6.4 EAP
Jasper server 6.2 

 
Cause:
By default Oracle users are created with an expiration policy set to 180 days. If not changed, the users used during the installation of CA Identity Governance , e.g. ystem, WPDS, gvm_datawarehouse, will eventually get their password expired and this error will be seen in logs:

Oracle User Password Expired , ORA-28001: the password has expired

Trouble Shooting Steps :

1. Please open the eurekify.log file located at \CA\RCM\Server\eurekify-jboss\server\eurekify\log folder 
and do a search for this Pattern "Unable to get managed connection for jdbc"
Each jdbc is assosiated to a Datasource will indicate the username and password you need to Reset to Resolve the Expired Password condition.

a) if do you see something like this :
com.workpoint.server.ejb.WorkPointEJBException: Unable to get managed connection for jdbc/WPDS; 
- nested throwable: (javax.resource.ResourceException: Unable to get managed connection for jdbc/WPDS)

You need to review  the Username/Password used on \CA\RCM\Server\eurekify-jboss\server\eurekify\deploy\wp-ds.xml file ,  where you will see something like this 

 <jndi-name>jdbc/WPDS</jndi-name>
         <connection-url>jdbc:oracle:thin:@MyServerName:1521/IGDB</connection-url>
         <driver-class>oracle.jdbc.OracleDriver</driver-class>
         <user-name>WPDS</user-name>
         <password>system</password>


b) if do you see something like this :

06:59:57,887 WARN  [org.hibernate.cfg.SettingsFactory] (main) Could not obtain connection metadata
org.jboss.util.NestedSQLException: Unable to get managed connection for jdbc/eurekifyDS; 
- nested throwable: (javax.resource.ResourceException: Unable to get managed connection for jdbc/eurekifyDS)
...
06:59:57,840 INFO  [org.hibernate.connection.DatasourceConnectionProvider] (main) Using datasource: jdbc/eurekifyDS
06:59:57,855 WARN  [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] (main) Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: ORA-28001: the password has expired


You need to review  the Username/Password used on \CA\RCM\Server\eurekify-jboss\server\eurekify\deploy\eurekify_sdb.xml file ,  where you will see something like this :

  <jndi-name>jdbc/eurekifyDS</jndi-name>
         <connection-url>jdbc:oracle:thin:@MyServerName:1521/IGDB</connection-url>
         <driver-class>oracle.jdbc.OracleDriver</driver-class>
         <user-name>eurekify_sdb</user-name>
         <password>system</password>


c)  if do you see something like this : 

Using datasource: jdbc/eurekifyReportdbDS
06:59:57,887 WARN  [org.hibernate.cfg.SettingsFactory] (main) Could not obtain connection metadata
org.jboss.util.NestedSQLException: Unable to get managed connection for jdbc/eurekifyReportdbDS; 
- nested throwable: (javax.resource.ResourceException: Unable to get managed connection for jdbc/eurekifyReportdbDS)

You need to review the Username/Password used on \CA\RCM\Server\eurekify-jboss\server\eurekify\deploy\reportdb-ds.xml file 

you will see something like this :

<jndi-name>jdbc/eurekifyReportdbDS</jndi-name>
 <connection-url>jdbc:oracle:thin:@MyServerName:1521/IGDB</connection-url>
        <driver-class>oracle.jdbc.OracleDriver</driver-class>
        <user-name>gvm_datawarehouse</user-name>
        <password>system</password>

** where IGDB is the IG Database Name and gvm_datawarehouse is the default IG username.

2. Once Identified the Username which Password is Expired , the Next Step is to change the expired password for the affected users to resolve.
 
Resolution:
Need to Change the Expired Password (Oracle DB) :

a) using cmd  , connect to the specific Oracle database name :

ie :
   sqlplus system/system@IGDB

** where IGDB is the database name 

b) To alter the password expiry policy for a specific user profile in Oracle first check which profile the user is using:

   select profile from DBA_USERS where username = '<username>';

c) If you want to previously check the limit you may use:

   select resource_name,limit from dba_profiles where profile='<profile_name>';

d) Then you can change the limit to never expire using:

   alter profile <profile_name> limit password_life_time UNLIMITED;

ie : ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;

4. To change user password you can use the following command as example :

alter user gvm_datawarehouse identified by system;
alter user WPDS identified by system;
alter user eurekify_sdb identified by system;

*** where "system" will be the password for the above users.

5. Once done , start the IG services and check the eurekify.log file for messages.


 
Additional Information:
https://docs.oracle.com/database/121/SQLRF/statements_2010.htm#SQLRF00813