0
votes

I am trying to get iReport 2.0.4 connected to MS SQL database but I keep getting UnsupportedOperationException.

I run the following version of jre:

java version "1.6.0_19"

Java(TM) SE Runtime Environment (build 1.6.0_19-b04)

Java HotSpot(TM) 64-Bit Server VM (build 16.2-b04, mixed mode)

I have set up sqldbc4.jar in the classpath of iReport 2.0.4

enter image description here

When I attempt to connect I get the following error:

Message: 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.

enter image description here

Can anyone please provide tips how to resolve this issue?

1
As I commented on another question, iReport 2 is really old. You might want to check if there is also an sqljdbc.jar driver-file on the application classpath (eg included in the application itself). Also make sure you have the JDBC 4 driver, and not the JDBC 4.1 driver from Microsoft. - Mark Rotteveel
@Mark Rotteveel - Thanks so much. Your suggestions has resolved the issue. The sqljdbc.jar and sqljdbc4.jar were included in the application itself. Removing the jar files fixed the issue. In terms of the version, I actually need to use this old version due to compatibility reasons. - BustedSanta

1 Answers

2
votes

You can try jtds driver for SQL Server