Error starting Harweb: JRE 1.6 is not supported by this driver. Use the sqljdbc4.jar class library.

Document ID : KB000049408
Last Modified Date : 14/02/2018
Show Technical Document Details

Description:

Environment is:
Java 1.6.x
Apache Tomcat 5.5.x
SQL Server 2008
SCM 12.1.x

Installation of Harweb was successful but when trying to start Tomcat after installation I get this error:

SEVERE: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0. java.lang.UnsupportedOperationException: Java Runtime Environment (JRE) version 1.6 is not supported by this driver. Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.

at com.microsoft.sqlserver.jdbc.SQLServerConnection.<init>(SQLServerConnection.java:304)
...

How do I resolve this problem?

Solution:

During installation of Harweb, the sqljdbc.jar file from your SQL Server JDBC install directory is copied to %CATALINAHOME%\webapps\harweb\WEB-INF\lib. The file that was originally named sqljdbc.jar is the JDBC 2.0 driver. To provide the JDBC 4.0 driver to Harweb, do the following:

  1. Download the JDBC 4.0 driver from the Microsoft website and extract the file to a local directory.
  2. Rename the original sqljdbc.jar file inside that folder to sqljdbc2.jar
  3. Rename the sqljdbc4.jar file inside that folder to sqljdbc.jar
  4. Copy the sqljdbc.jar file to the %CATALINAHOME%\webapps\harweb\WEB-INF\lib folder REPLACING the copy that was originally there.
  5. Restart Tomcat.