Cannot load JDBC driver class 'com.orsyp.driver.FakeSQLServerDriver'
search cancel

Cannot load JDBC driver class 'com.orsyp.driver.FakeSQLServerDriver'

book

Article ID: 441217

calendar_today

Updated On:

Products

CA Automic Dollar Universe

Issue/Introduction

After a change in the unienv.bat related to the JDBC driver used to connect to the External Database (MS SQL on this case), the UVMS fails to start with the following error in uvserver.log:

|ERROR| main | org.hibernate.engine.jdbc.spi.SqlExceptionHelper | Cannot load JDBC driver class 'com.orsyp.driver.FakeSQLServerDriver'

On unistart.log you observe a similar error related to the JDBC driver:

java.security.PrivilegedActionException: com.orsyp.InitializationException: Cannot initialize UVMS
Caused by: com.orsyp.InitializationException: Cannot initialize UVMS
Caused by: com.orsyp.InitializationException: A problem occurred while initializing the server.
Caused by: com.orsyp.InitializationException: Failed initializing server: Could not open JPA EntityManager for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection
Caused by: org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection
Caused by: org.hibernate.exception.GenericJDBCException: Unable to acquire JDBC Connection
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.orsyp.driver.FakeSQLServerDriver'
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.orsyp.driver.FakeSQLServerDriver

Environment

UVMS 7.x with External Database on Windows

Cause

Wrong value for the variable JDBC_JAR_PATH_ORSYP in the file (<uvms_folder>\data\unienv.bat) as it was pointing to a folder instead of a jar file as seen below:

set JDBC_JAR_PATH_ORSYP="C:\PROGRA~1\MICROS~2"

Resolution

Update the value for the variable JDBC_JAR_PATH_ORSYP in the file (<uvms_folder>\data\unienv.bat) so that it points to the jar file that corresponds to your Java version, like for example:

set JDBC_JAR_PATH_ORSYP="C:\Program Files\Microsoft SQL Server\mssql-jdbc-9.2.0.jre8.jar"

Then start UVMS again, this time it will start correctly.

Additional Information

Please note that support with TLS connection to MS SQL Server is only available from UVMS 7.01.01 and superior as explained here

Else, please use a driver up to version 9.4