WA Agent for Database with MS SQL database connection error Unsupported major.minor version 52.0
search cancel

WA Agent for Database with MS SQL database connection error Unsupported major.minor version 52.0

book

Article ID: 190670

calendar_today

Updated On:

Products

CA Workload Automation AE - Business Agents (AutoSys) CA Workload Automation AE - System Agent (AutoSys) CA Workload Automation AE - Scheduler (AutoSys) Workload Automation Agent Autosys Workload Automation

Issue/Introduction

The WA Agent for Database is unable to connect to MS SQL server.
Logs may show these errors.

XX/XX/2019 00:00:XX.XXX UTC 1 DatabasePlugin.database Internal Thread.CybRMIExternalPluginBaseManager.processWob[:609] - java.lang.UnsupportedClassVersionError: com/microsoft/sqlserver/jdbc/SQLServerDriver : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Unknown Source)
......

Or
XX/XX/2019 00:00:XX.XXX UTC 1 main.MainThread.CybDatabasePluginDriver.runApplication[:108] - java.sql.SQLException: Network error IOException: Connection refused: connect 
at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:417)
at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:185)
 
 

Environment

Release : 11.X to 12.0

Component : CA Workload Automation System Agent

OS: Windows

Database: MS SQL

Cause

The "Unsupported major.minor version 52.0" error means that JDBC driver will only work with JRE 8. If the WA Agent is very old pre 11.3 SP5 or uses JRE 1.7 then latest SQL JDBC driver will not work.

Resolution

Upgrade the agent to 12.0 or above.  If agent is using JRE 8, then use jre8 jar, then make sure to install JRE 8 specific JAR.  The MS SQL JDBC package will come with JARS, for different JRE versions.  

E.g.

mssql-jdbc-12.10.0.jre11.jar
mssql-jdbc-12.10.0.jre13.jar
mssql-jdbc-12.10.0.jre8.jar

Unzip the package downloaded from Microsoft and the above jars are located under: sqljdbc_12.10\enu\jars directory.  

Note: The actual 12.10 version may differ as Microsoft may release newer versions.

Use the "mssql-jdbc-X.y.z.jre8.jar" jar with the WA Agent.  The jar should be placed in <agent_install>/jars/ext directory.  Remove or delete any other JDBC jar(s), do not rename them.  Restart of agent is required for agent to load the drivers.