Maven和Hsqldb:org.hsqldb。HsqlException:客户端驱动程序版本大于“2.1.0.0”。HSQLDB服务器版本是“2.3.4”(在mac上)

时间:2021-03-23 07:01:00

What I want to do

我想做什么

  • How to get maven/eclipse to point to 2.3.2 jar instead?
  • 如何让maven/eclipse转而指向2.3.2 jar ?
  • Connect to the HSQL db via Java/jdbc (I assume I should be able to do this once I have solved the above)
  • 通过Java jdbc /jdbc连接到HSQL db(我假设一旦我解决了上面的问题,我应该能够做到这一点)

My settings

我的设置

It seems that my hsql server is using 2.3.4. However I do not see why my local Eclipse (the client) is using 2.1.0.0. I have set up maven and it seems to be pointing to the 2.3.2 jar.

我的hsql服务器似乎使用了2.3.4。但是我不明白为什么我的本地Eclipse(客户端)使用2.1.0.0。我设置了maven,它似乎指向2.3.2 jar。

How my Eclipse package explorer looks

我的Eclipse package explorer看起来怎么样

Other things I have checked / done

其他我检查过/做过的事情

  • Updated my path variables in my bash_profile (export HSQL_HOME=/Users/user/hsqldb; export PATH=$PATH:$HSQL_HOME/lib)
  • 更新bash_profile中的路径变量(export HSQL_HOME=/Users/user/hsqldb;导出路径= $路径:$ HSQL_HOME / lib)
  • Have been able to create tables using GUI Database manager
  • 是否能够使用GUI数据库管理器创建表?
  • I have looked at this similar question but it doesn't tell me how to resolve / check which jar version my client jar is using
  • 我曾研究过这个类似的问题,但它没有告诉我如何解析/检查我的客户端jar正在使用哪个jar版本

The solution

解决方案

As mentioned by fredt, upgrade to 2.3.4 by making the following change to my pom.xml. Also went to build path to make sure that there is no other hsqldb jars being pointed at (or if any where being pointed at, they were 2.3.4).

正如fredt所提到的,通过对my pen .xml进行以下更改,将其升级到2.3.4。还构建了path,以确保没有其他的hsqldb jar被指向(如果有的话,它们是2.3.4)。

  <properties>
    <hsqldb.version>2.3.4</hsqldb.version>
  </properties>

1 个解决方案

#1


2  

The message is misleading. It is meant to say "greater than 2.3.3 is required". Change your Maven settings in pom.xml to require HSQLDB 2.3.4. In general you should use the same version jar for driver and server.

消息是一种误导。它的意思是“大于2.3.3是必需的”。更改pom中的Maven设置。需要HSQLDB 2.3.4的xml。一般情况下,您应该为驱动程序和服务器使用相同的版本jar。

#1


2  

The message is misleading. It is meant to say "greater than 2.3.3 is required". Change your Maven settings in pom.xml to require HSQLDB 2.3.4. In general you should use the same version jar for driver and server.

消息是一种误导。它的意思是“大于2.3.3是必需的”。更改pom中的Maven设置。需要HSQLDB 2.3.4的xml。一般情况下,您应该为驱动程序和服务器使用相同的版本jar。