我是靠谱客的博主 尊敬铃铛,这篇文章主要介绍H2数据库连接报错:unexpected status 16777216 / 16842752,现在分享给大家,希望可以做个参考。

我有问题:Connection is broken: "unexpected status 16843008" 当尝试从JetBrains的IDEA数据库刷新H2,通过TCP连接:jdbc:h2:tcp://localhost:9092/~/dbnameh2.version=1.4.190

@Bean(initMethod = "start", destroyMethod = "stop")
public Server h2Server() throws SQLException {
    return Server.createTcpServer("-tcp", "-tcpAllowOthers", "-tcpPort", "9092");
}

只有在降级h2版本时问题才解决:

    <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>1.3.176</version>
    </dependency>

确保在应用程序和客户端(例如IDEA数据库)端使用相同的h2驱动程序版本。

这也为InMemory工作(春季启动服务器:spring.datasource.url=jdbc:h2:mem:dbname和TCP客户端:tcp://localhost:9092/mem:dbname

看到。从DbVisualizer连接到H2服务器

 

转载:https://stackoverflow.com/questions/24803279/grails-accessing-h2-tcp-server-hangs

 

最后

以上就是尊敬铃铛最近收集整理的关于H2数据库连接报错:unexpected status 16777216 / 16842752的全部内容,更多相关H2数据库连接报错:unexpected内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(128)

评论列表共有 0 条评论

立即
投稿
返回
顶部