failed: connection is not valid aborting using addjbossDatasource

Document ID : KB000122198
Last Modified Date : 30/11/2018
Show Technical Document Details
Question:
Running addjbossDatasource identity-portal as discussed in:

https://docops.ca.com/ca-identity-suite/14-1/EN/administrating/administrating-ca-identity-suite-virtual-appliance-vapp

It fails with the below:

INFO] Adding IdentityManager datasources on host 10.114.224.148 
Adding external datasource from file /opt/CA/VirtualAppliance/custom/IdentityManager/dataSources/identity-portal on 10.114.224.148... 
[OK] successfully configured external datasource from file "/opt/CA/VirtualAppliance/custom/IdentityManager/dataSources/identity-portal" on 10.114.224.148 (return code: 0) 
================================================================================= 
[INFO] Successfully created security-domain: identity-portal 
[INFO] Successfully created datasource: identity-portal 
[WARN] The datasource was created successfully but the connection to the database failed: Connection is not valid 
[WARN] The datasource was created successfully but the connection to the database failed: Connection is not valid - Aborting... 
Answer:
This was caused by special characters used in the database password.  You must escape each special character.  Example below.

If password is 123$456#789 

This is entered as: 

DATASOURCE_NAME=identity-portal 
DB_URL=jdbc:oracle:thin:@//rjolnxf89.internal.timbrasil.com.br:1521/IDMQ01 
DB_USER=SIDM001 
DB_PASSWORD=123\$456\#789 

This works. 

[INFO] Adding IdentityManager datasources on host 10.114.224.147 
Adding external datasource from file /opt/CA/VirtualAppliance/custom/IdentityManager/dataSources/identity-portal on 10.114.224.147... 
[OK] successfully configured external datasource from file "/opt/CA/VirtualAppliance/custom/IdentityManager/dataSources/identity-portal" on 10.114.224.147 (return code: 0) 
================================================================================= 
[INFO] Successfully created security-domain: identity-portal 
[INFO] Successfully created datasource: identity-portal 
===============================================