Connecting to H2 server from DbVisualizer

烂漫一生 提交于 2019-12-05 03:15:28
  • Latest H2 stable release: 1.3.176.
  • Latest dbVisualizer H2 driver: 1.3.176.

Probably you are using a the beta release of H2 (1.4.x) with some bug in the client/server communication (mismatching versions should not be a problem because the client and server negotiate which protocol version to use) try using the latest beta release from H2 or use the latest stable release of H2.

Check the version of h2 JDBC driver you are using in DBVisualizer. Specifically, check if matches the version you are using with your server. While it normally shouldn't matter that the versions match, there were issues with H2 a while back that would cause these sorts of errors when using mismatched versions.

If that does not help, you might want to also report exactly which version of H2 you are using on both client and server.

I had the same issue. I had H2 installed from http://h2database.com and grails app was throwing:

[localhost-startStop-1] ERROR StackTrace  - Full Stack Trace:
org.h2.jdbc.JdbcSQLException: Connection is broken: "java.net.ConnectException: Connection refused: connect: localhost" [90067-176]

As it turned out my H2 server version was 1.4.196 and I had 1.3.176 loaded as grails dependency. I had update BuildConfig.groovy to make it work:

dependencies {
    ...
    test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"
    runtime "com.h2database:h2:1.4.196"
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!