java—h2数据库中存在问题可能已经在使用中

sh7euo9m  于 2021-07-03  发布在  Java
关注(0)|答案(1)|浏览(545)

我正在尝试用h2database和spring boot运行应用程序。每次我在独立的tomcat中重新部署应用程序时。结果是说构建失败了:

Database may be already in use: "/root/NCRWalmart/walmart-pos-wits-common-configuration/src/main/wits_orch.mv.db". Possible solutions: close all other connection(s); use the server mode [90020-182]

我通过h2database的官方网站,尝试了不同的解决方案,但没有任何效果。我尝试在属性文件中使用以下url:

spring.datasource.url=jdbc:h2:file:${spring.config.location}/wits_orch;DB_CLOSE_ON_EXIT=true;FILE_LOCK=SOCKET;

有什么解决办法吗?

yc0p9oo0

yc0p9oo01#

您可能有另一个进程同时运行同一h2示例。试试这样的 ps -ef | grep h2 ,它将显示所有使用h2*.jar的进程

相关问题