Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IO Exception: "/root/test outside /opt/h2/DB

currently I installed the H2 database, but when I the launch the program and I try to access it from my browser (http://localhost:8082/login.do), I get this error:

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)

How I can fixe this ?

like image 920
pi-2r Avatar asked Oct 28 '25 07:10

pi-2r


1 Answers

Just add a single "." before the name of your database. For example this is the jdbc url for my database: jdbc:h2:tcp://localhost:9101/~/test and I'll change it to this to work: jdbc:h2:tcp://localhost:9101/~./test. I've read in a forum that this bug relates to H2.

like image 81
Vahid F Avatar answered Oct 29 '25 21:10

Vahid F



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!