Maven and Hsqldb: org.hsqldb.HsqlException: Client

2019-07-22 13:51发布

What I want to do

  • How to get maven/eclipse to point to 2.3.2 jar instead?
  • Connect to the HSQL db via Java/jdbc (I assume I should be able to do this once I have solved the above)

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.

How my Eclipse package explorer looks

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)
  • Have been able to create tables using GUI Database manager
  • 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

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).

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

1条回答
Bombasti
2楼-- · 2019-07-22 14:09

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.

查看更多
登录 后发表回答