I am trying to create simple Java 1.7 project for Spring with HSQL DB. I downloaded latest version of HSQL DB and created a simple file based DB.
In java project I am using latest version of Spring, HSQL and related jar. But while running program I am getting error
Exception in thread "main" java.lang.UnsupportedClassVersionError: JVMCFRE003 bad major version; class=org/hsqldb/jdbcDriver, offset=6
My file is
<!-- Spring framework -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.8.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>4.3.8.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/cglib/cglib -->
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>3.2.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-dbcp2 -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.1.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hsqldb/hsqldb -->
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.4.0</version>
What should be change in jars ?
HSQLDB 2.4.0 has been compiled with JDK 8 and cannot be used with JDK 7 or earlier.
You need to specify version 2.3.5 for a version that has been compiled with JDK 6. This version lacks the new JDBC features introduced in Java 8 but is compatible with version 2.4.0 in other respects.