Maven and Hsqldb: org.hsqldb.HsqlException: Client driver version greater than '2.1.0.0' is required. HSQLDB server version is '2.3.4' (on mac)

醉酒当歌 提交于 2019-12-11 04:28:57

问题


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:


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.



来源:https://stackoverflow.com/questions/40586646/maven-and-hsqldb-org-hsqldb-hsqlexception-client-driver-version-greater-than

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!