[UCS] Could not create datasource

Hello and thanks for the time you’ll take to read this,

So i’m trying to install an universal contact server (UCS) and when i start it, i get the error :
Initialization of UCS DAP Failed, reason ‘Could not create datasource’.

I checked the configuration of my DAP and the login/password are correct (same for the DB name and ID)
So i have no ideas where this error is comming from.

If anyone has an idea please let me know.

Database used : Oracle 11g

Thanks ! :slight_smile:

Permissions on that user?
You can create the DB manually as well by running the scripts at the install folder

Enviado de meu E6633 usando o Tapatalk

I created the tables by running the script in the install folder and i was using the user my UCS is using(through the DAP).
So the rights should be alright ?

Try to check if your UCS instance is configured to be running under specific account with sufficient privileges (for example under “default” account or similiar one)

Are you using JDBC DAP or a normal DAP with DB server?

i’m using JDCB with role : Main

Thanks for your answer

Yes in genesys administrator the application has has the user default with Full control.
It’s the one the UCS should be using.

Don’t think Genesys user will impact DB access…no sense
Now, about JDBC or DAP, UCS uses JDBC…
I do remember also creating tables manually…will test to see if it creates them automatically. What does doc says about this point?

Enviado de meu E6633 usando o Tapatalk

i’ll give more details :

14:47:06.664 Std 21136 [Ucs-Main] Using ‘7200’ for transaction timeout to be consistent with query and long query timeout.
14:47:06.665 Std 29997 [Ucs-Main] JDBC debug is on
14:47:06.666 Std 29997 [Ucs-Main] Checking DB schema for ‘DAP_UCS’ with role ‘Main’
14:47:07.037 Std 05066 Initialization of UCS DAP failed, reason ‘Could not create datasource’
14:47:07.041 Std 29997 [Ucs-Main] Recoverable error from SQL layer:Could not create datasource, trying again in 10000ms
java.sql.SQLException: Could not create datasource
at com.genesyslab.icc.util.DataAccessPointUtils.configureDataSource(DataAccessPointUtils.java:195)
at com.genesyslab.icc.contactserver.ContactServerEngine.initDataSources(ContactServerEngine.java:881)
at com.genesyslab.icc.contactserver.ContactServerEngine.initInstance(ContactServerEngine.java:539)
at com.genesyslab.icc.contactserver.ContactServerEngine$4.run(ContactServerEngine.java:1404)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLException: Unable to open a test connection to the given database. JDBC url = jdbc:oracle:thin:@xxxxxxxxxx:XXXX:xxxx, username = xxxxxx. Terminating connection pool (set lazyInit to true if you expect to start your database after your app). Original Exception: ------
java.sql.SQLRecoverableException: IO Error: Got minus one from a read call, connect lapse 0 ms., Authentication lapse 0 ms.
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:794)
at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:688)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)

I already created my tables, i checked that previously , and i listed all of them, the doc just ask to run the scripts.

Do you have an oracle client on the UCS host? If you do, you can check if the parameters to access the database are correct and the database is accessible by the UCS host using TNSPing tool as following:

tnsping <user>/<password>@<database host>:<database port>/<oracle_sid> 10

The error “Got minus one from a read call” usually means that the JDBC Driver could not read the database (maybe the port which you specified is not open, or the ORACLE_SID name is incorrect). So the commandline above could give you a hint if it is not open or if it is something else. Only works if you have Oracle Client installed on that host.

Edit: if you are running UCS in Linux, also check if the user that your UCS is running (usually the same user as LCA) has the correct Java version on the PATH variable, and if the ojdbcX.jar is on the CLASSPATH variable (where X depends on your JRE version).

I think that might be the reason, i tried to use tnsping on another host(which has an oracle database on it) to connect to the other database(UCS) and nothing happens then i get a failed to resolve name but that’s it.

I used the command ./tnsping user/pwd@host:port/XE 10

XE is my SID i checked that with

ps -ef|grep pmon

I changed my user’s PATH variable to :

PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/genesys/bin:/usr/java/jre1.8.0_171-i586/bin/java:/home/genesys/bin
JAVA_HOME=/usr/java/jre1.8.0_171-i586/bin/java

So it should be fine on this side.

What i find strange is that i can connect on the database(UCS) using sqlplus, and i created the tables.

But thanks for the answer, i think i’m little bit closer to a solution !

Just out of curiosity, what was the exact command line you used for connecting with sqlplus?

I used this one and it’s working now ( i used DBServer Port instead of DB Port )


sqlplus 'user/pass@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=hostname.network)(Port=1521))(CONNECT_DATA=(SID=remote_SID)))' 

But UCS still not working sadly

Not quite sure if it is related, but the variable JAVA_HOME shoud point to the root install directory of JDK (not the JRE binary).

Edit: also, the ojdbc driver full path (including the filename and extension) should be in the CLASSPATH variable. E.g.:
export CLASSPATH=/usr/lib/ojdbc8.jar

Ok so , yes i was missing JDBC Drivers , but do i need to put them in the DB Host or the UCS host i’m not quite sure , thanks.
( so same for the path )

On the UCS host

PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/genesys/bin:/home/genesys/bin:/usr/java/jre1.8.0_171-i586/bin/java
PWD=/opt/genesys/GCTI/bin/UCS_P
JAVA_HOME=/usr/java/jdk1.8.0_171-amd64/
LANG=en_US.UTF-8
HISTCONTROL=ignoredups
SHLVL=1
HOME=/home/genesys
LOGNAME=genesys
CLASSPATH=/usr/lib/ojdbc6.jar

this is what i have now (UCS Host), but i still get the error, i tried both jdk and jde for the PATH
I might be missing on something but, do i just have to put the jdbc path in the bash_profile as done above, or i have to put the file in the java directory ?

It is up to you. You could put the ojdbc8.jar (should match your Java version) on the /usr/java/hre1.8.0_171-i586/lib/ext (for example) and set it in your classpath. It should be in the bash_profile. If you are starting UCS by the Genesys Management Layer (SCI, GAX or GA), you must also restart LCA on the UCS host after setting it in the bash_profile. If you are starting it directly via command line, you should execute


source ~/.bash_profile

in order for your current session get those variables.

Ok finally i found , it , i had to install jdbc 8 , then delete complety my DAP because it automatically linked to the DB Server (port 4040) and create a new one configured with the port of my DB, then set the host
( Genesys Administrator automatically put the DB Server port if you choose the host first in the DAP application )

big thanks to hsujdik !