gpt4 book ai didi

java - IO 异常 : "/root/test outside/opt/h2/DB

转载 作者:行者123 更新时间:2023-11-30 06:08:40 29 4
gpt4 key购买 nike

目前我安装了 H2 数据库,但是当我启动该程序并尝试从我的浏览器 (http://localhost:8082/login.do) 访问它时,我收到此错误:

IO Exception: "/root/test outside /opt/h2/DB" [90028-192] 90028/90028 (Aide) org.h2.jdbc.JdbcSQLException: IO Exception: "/root/test outside /opt/h2/DB" [90028-192]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:179)
at org.h2.message.DbException.get(DbException.java:155)
at org.h2.engine.ConnectionInfo.setBaseDir(ConnectionInfo.java:182)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:114)
at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:102)
at org.h2.Driver.connect(Driver.java:72)
at org.h2.server.web.WebServer.getConnection(WebServer.java:735)
at org.h2.server.web.WebApp.login(WebApp.java:955)
at org.h2.server.web.WebApp.process(WebApp.java:211)
at org.h2.server.web.WebApp.processRequest(WebApp.java:170)
at org.h2.server.web.WebThread.process(WebThread.java:133)
at org.h2.server.web.WebThread.run(WebThread.java:89)
at java.lang.Thread.run(Thread.java:745)

我该如何解决这个问题?

最佳答案

只需添加一个“.”在您的数据库名称之前。例如,这是我的数据库的 jdbc url:jdbc:h2:tcp://localhost:9101/~/test 我将把它改成这样:jdbc:h2 :tcp://localhost:9101/~./test.我在论坛上读到这个错误与 H2 有关。

关于java - IO 异常 : "/root/test outside/opt/h2/DB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39423660/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com