After applying 14.4 CP1 or CP2 the Identity Portal service does not start with the following error message
In the Identity Portal log we have the error:
-----------------------------------
WARN [org.jboss.jca.core.connectionmanager.pool.strategy.PoolBySubject] (ServerService Thread Pool -- 80) IJ000604: Throwable while attempting to get a new connection: null: javax.resource.ResourceException: IJ031084: Unable to create connection
...
Caused by: javax.resource.ResourceException: IJ031083: Wrong driver class [oracle.jdbc.OracleDriver] for this connection URL [jdbc:sqlserver://XX.XXX.XX.XX:YYYY;databaseName=DB_IDENTITYPORTAL]
at org.jboss.jca.adapters.jdbc.local.LocalManagedConnectionFactory.createLocalManagedConnection(LocalManagedConnectionFactory.java:323)
... 75 more
-----------------------------------
Identity Portal 14.4 (Virtual Appliance or Standalone)
The root cause is the wrong database driver that was set in the Identity Portal standalone.xml file
As we can see below the driver is incorrect, since the database is SQL Server
<datasource jndi-name="java:jboss/datasources/jdbc/sigmadb" pool-name="sigma-ds" enabled="true" use-ccm="false">
<connection-url>jdbc:sqlserver://XX.XXX.XX.X:YYYY;databaseName=DB_IDENTITYPORTAL</connection-url>
<driver>oracle</driver>
To solve it we need to change the driver property from oracle to sqlserver
In a Standalone version, just search for "sigma-ds" datasource and change the driver property as follow
From
<driver>oracle</driver>
To
<driver>sqlserver</driver>
In a Virtual Appliance environment, we need to use the jboss-cli to change this property.
If you already have the JBoss user to connect to the jboss-cli, skip to step #2
If you do not have a user to connect to the jboss-cli, you need to create it before running the commands
1. Create the JBoss admin user
sudo /opt/CA/wildfly-portal/bin/add-user.sh
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): a
Username : <username like jbossadmin>
What groups do you want this user to belong to? (Please enter a comma separated list, or leave blank for none)[ ]:
Press Enter to leave blank
About to add user 'jbossadmin' for realm 'ManagementRealm'
Is this correct yes/no? yes
Added user 'jbossadmin' to file '/opt/CA/wildfly-portal/standalone/configuration/mgmt-users.properties'
Added user 'jbossadmin' to file '/opt/CA/wildfly-portal/domain/configuration/mgmt-users.properties'
Added user 'jbossadmin' with groups to file '/opt/CA/wildfly-portal/standalone/configuration/mgmt-groups.properties'
Added user 'jbossadmin' with groups to file '/opt/CA/wildfly-portal/domain/configuration/mgmt-groups.properties'
Is this new user going to be used for one AS process to connect to another AS process?
e.g. for a slave host controller connecting to the master or for a Remoting connection for server to server EJB calls.
yes/no? no
2. Run the commands
Navigate to /opt/CA/wildfly-portal/bin/
execute ./jboss-cli.sh
type: connect
Enter credentials
Run the command one by one
/subsystem=datasources/data-source=sigma-ds/:read-attribute(name=driver-name)
/subsystem=datasources/data-source=sigma-ds/:write-attribute(name=driver-name,value=sqlserver)
reload
exit
now restart the Identity Portal
restart_ip