I'm trying to use the Java JTDS driver to connect to my database in Scala . However, whenever I try to use it I get an error that the version(of java?) is wrong.
java.lang.UnsupportedClassVersionError: net/sourceforge/jtds/jdbcx/JtdsDataSource : Unsupported major.minor version 51.0
object DaoDriverAdaptor {
import java.sql.{DriverManager, Connection}
private def loadDriver() {
try {
Class.forName("net.sourceforge.jtds.jdbcx.JtdsDataSource")
} catch {
case e: Exception => {
println("ERROR: Driver not available: " + e.getMessage)
throw e
}
}
}
- Scala version : 2.9.2
- Java Version : 1.6
- Using jtds 1.3.0
- Output of java -version:
java version "1.6.0_35" Java(TM) SE Runtime Environment (build 1.6.0_35-b10-428-11M3811) Java HotSpot(TM) 64-Bit Server VM (build 20.10-b01-428, mixed mode)