Database H2错误[90011-187]
我正在尝试在linux中创建一个数据库,其中:Database H2错误[90011-187],database,h2,Database,H2,我正在尝试在linux中创建一个数据库,其中: 它不在用户主页中 不需要客户端通知数据库文件的整个服务器路径 需要与bin目录不同,以防止核心转储失败 文档中说,您可以使用如下url: jdbc:h2:file:data/sample 但是这个简单的url不起作用,会出现以下错误: Exception in thread "main" org.h2.jdbc.JdbcSQLException: A file path that is implicitly relative to the cu
jdbc:h2:file:data/sample
但是这个简单的url不起作用,会出现以下错误:
Exception in thread "main" org.h2.jdbc.JdbcSQLException: A file path
that is implicitly relative to the current working directory is not
allowed in the database URL
"jdbc:h2:file:db/datadb;TRACE_LEVEL_FILE=3". Use an absolute path,
~/name, ./name, or the baseDir setting instead. [90011-187]
观察:我知道您可以使用“.”,但在这种情况下,客户端的url是什么?文档是错误的。我会更新的
jdbc:h2:file:data/sample
应该是:
jdbc:h2:file:./data/sample
许多用户遇到问题,因为他们使用了类似于jdbc:h2:test的东西,然后没有找到数据库文件,或者在其他目录中运行应用程序时创建了第二个数据库。这就是为什么在版本1.4.x中,现在相对路径只在使用
时起作用,就像在jdb:h2:./test中一样
顺便说一下,您已经问了这个问题。文档是错误的。我会更新的
jdbc:h2:file:data/sample
应该是:
jdbc:h2:file:./data/sample
许多用户遇到问题,因为他们使用了类似于jdbc:h2:test的东西,然后没有找到数据库文件,或者在其他目录中运行应用程序时创建了第二个数据库。这就是为什么在版本1.4.x中,现在相对路径只在使用
时起作用,就像在jdb:h2:./test中一样
顺便说一下,您已经问了这个问题。文档是错误的。我会更新的
jdbc:h2:file:data/sample
应该是:
jdbc:h2:file:./data/sample
许多用户遇到问题,因为他们使用了类似于jdbc:h2:test的东西,然后没有找到数据库文件,或者在其他目录中运行应用程序时创建了第二个数据库。这就是为什么在版本1.4.x中,现在相对路径只在使用
时起作用,就像在jdb:h2:./test中一样
顺便说一下,您已经问了这个问题。文档是错误的。我会更新的
jdbc:h2:file:data/sample
应该是:
jdbc:h2:file:./data/sample
许多用户遇到问题,因为他们使用了类似于jdbc:h2:test的东西,然后没有找到数据库文件,或者在其他目录中运行应用程序时创建了第二个数据库。这就是为什么在版本1.4.x中,现在相对路径只在使用
时起作用,就像在jdb:h2:./test中一样
顺便说一下,你问了这个问题