CA Web Viewer java.sql.SQLException No suitable driver found

book

Article ID: 40882

calendar_today

Updated On:

Products

CA Output Management Document Viewer CA Output Management Web Viewer

Issue/Introduction

While running the configtool, the connection to the database failed.  The following error was found in the ConfigTool.log (located for example in CA_OM_Web_Viewer\util\logs or CA_OM_Web_Viewer/util/logs)

Loaded: sqljdbc4.jar
java.sql.SQLException: No suitable driver found.....

 

 

Cause

The [JDBC URL] was not entered correctly in the configtool.
  1. For example:
    When prompted for 

    [JDBC URL]Recommended value: jdbc:sqlserver://serverName:1433;databaseName=webview
    The current value: //serverName:1433;databaseName=webview
    Enter a new value or press [Enter] to use the current value:
    Database JDBC URL:
     
           And  you press enter.

Environment

MS SQL Server

Resolution

The resolution to this problem is in Cumulative Build 194 and higher.  It will no longer be necessary to use the workaround below which is copying the recommended value into the Database JDBC URL.

How to locate the latest build (maintenance) for CA Output Management Web Viewer 12.1?

Workaround for builds lower than Cumulative Build 194:
  1. While you can hit enter for all the other prompts, it is important not to do it for this prompt.  The current value is empty by default when you run the configtool.
  2. Copy or type the Recommended value (if correct) into the Database JDBC URL: 
    Database JDBC URL:
    jdbc:sqlserver://serverName:1433;databaseName=webview
    NOTE that jdbc:sqlserver: is a required part of the URL.  1433 is the default port for SQL Server.  Specify a different port if yours is different. 
  3. The required format for Web Viewer is
    jdbc:sqlserver://serverName:portNumber;databaseName=name of database

Additional Information

From the Microsoft Developer Network
Building the Connection URL
SQL Server 2012
The general form of the connection URL is 
jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]
where: 
•jdbc:sqlserver:// (Required) is known as the sub-protocol and is constant. 
•serverName (Optional) is the address of the server to connect to. This could be a DNS or IP address, or it could be localhost or 127.0.0.1 for the local computer. If not specified in the connection URL, the server name must be specified in the properties collection. 
•instanceName (Optional) is the instance to connect to on serverName. If not specified, a connection to the default instance is made.
 •portNumber (Optional) is the port to connect to on serverName. The default is 1433. If you are using the default, you do not have to specify the port, nor its preceding ':', in the URL.