IMAG_PACKAGE set in the file is invalid

Document ID : KB000122263
Last Modified Date : 04/12/2018
Show Technical Document Details
Issue:
It is possible to configure an External DataSource in the vAPP using a properties file in the format below

IMAG_PACKAGE=IP or IM
DB_TYPE=MSSQL or ORACLE
DATASOURCE_NAME=my-ds
DB_URL=jdbc:sqlserver://<host>:<port>
or
jdbc:sqlserver://<host>:<port>\;DatabaseName=<database name>
or
jdbc:oracle:thin:@<host>:<port>:<sid>
or
jdbc:oracle:thin:@//<host>:<port/<service name>
DB_USER=<username>
DB_PASSWORD=<password>

See product documentation for more information.
https://docops.ca.com/ca-identity-suite/14-2/en/virtual-appliance/configuring-virtual-appliance#ConfiguringVirtualAppliance-AddanExternalDataSource

However, when executing the command addJBossDatasource <DS FILE NAME> to deploy the data source it can fail with the error.

[ERROR] the parameter "IMAG_PACKAGE" set in the file <DS FILE NAME>  is invalid ("IM 

Example:
[ERROR] the parameter "IMAG_PACKAGE" set in the file "/opt/CA/VirtualAppliance/custom/IdentityManager/dataSources/database.txt" is invalid ("IM 

 
Environment:
CA Identity Suite 14.x vAPP
Cause:
This issue is caused by problems during file creation. 
For example: If the file was created in Windows notepad.exe and copied across to the vAPP using WinSCP (or similar) the file will fail.
Resolution:
If you edit the <DS FILE NAME> using the WinSCP Editor or Linux vi etc., remove the first line (IMAG_PACKAGE=IM) and then retype the line and save the file, when you execute the addJBossDatasource command it should now work fine.