This documentation relates to uPortal 4.0
If you are using a different version, please click on "Click for all versions" on the left side of the page and select the relevant version.

MS SQL Server and MS JDBC Driver

Skip to end of metadata
Go to start of metadata
All Versions
Page not found
Table of Contents
Page not found

Step 1: Obtain the MS JDBC driver 

Since the MS SQL Server JDBC driver is not available in the central Maven repository, it must be placed into the local repository of each machine on which you wish to build uPortal.

Option: Local Maven caching repository

As an alternative to this, you could set up a maven repository for use by multiple machines.
  • Download MS JDBC driver directly from Microsift, here:
  • Follow the installation instructions, noting where the driver JAR file is located
  • Note the location of the driver JAR file and the version
  • Install the driver into the local Maven repository

    Install MS SQL Server driver
    mvn install:install-file -DartifactId=sqljdbc4 -Dversion=<version> -Dpackaging=jar -DgeneratePom=true -Dfile=<driver JAR file>
  • Again, note the groupId, artifactId and version. These will be used in Step 3.

Step 2: Configure the Database Filter

  • From the uPortal source directory, open the uPortal-4.x.x/filters/ file and add your database information
## HSQL Configuration

## Database Connection Settings (Uncomment the Maven Filters section in<servername>:<port>;databaseName=<databasename>


Step 3: Add the database driver

  1. NEW: Open uportal-db/pom.xml file, uncomment the MSSQL sqljdbc driver below and modify as needed 

  2. Add the appropriate version properties to the root pom.xml file or enter the appropriate version below
        <!-- Add any db drivers that are applicable to *any* of your environments -->
         | The following db drivers should be uncommented and/or modified as needed for server 
         | deployments.  (Add all thaat are needed.)  Don't forget to add appropriate  .version 
         | properties to the root pom.xml, or simply enter the appropriate version below.

Step 4: Test the Configuration

Running the dbtest ant target will tell you if you have configured the database connection properly.

ant dbtest


Step 5: Build and Deploy 

Following a successful test, you can execute the command below to build the database tables and copy files to your servlet container. 

Note: Executing the command "ant clean initportal" will drop and recreate the database tables and all existing data will be lost. This will result in a clean uPortal database structure. If you want to keep the contents of your existing database, use "ant clean deploy-war"

ant clean initportal

Step 6: Restart Tomcat



Additional References


Having problems with these instructions?

Please send us feedback at

  • No labels

1 Comment

  1. We have been testing uPortal 4.0.x with SQL Server 2008 R2 and SQLJDBC4 driver and can add a few points to the instructions:


    org.jasig.portal.utils.PortalDialectResolver is programmed to return an instance of org.hibernate.dialect.SQLServer2005Dialect for SQL Server v. 2008 and above. This was done when jTDS drivers (1..2.x) did not support SQL Server 2008+ - see UP-3358 - Getting issue details... STATUS .

    With jTDS 1.3.x  - and definitely with sqljdbc4.jar, org.hibernate.dialect.SQLServer2008Dialect can be used. We had to update the above class in our deployment as well - and not just set the dialect in the properties file.


    We were getting "aggregateRawEvents failed" errors due to the following "The data types time and datetime are incompatible in the greater than or equal to operator." As described in this blog - - JDBC driver needs to be told explicitly to use the time data type rather than the datetime data type with setTime/updateTime by setting the connection property "sendTimeAsDateTime=false":<servername>:<port>;databaseName=<databasename>;sendTimeAsDateTime=false