AnsweredAssumed Answered

A file path that is implicitly relative to the current working directory is not allowed in the database URL

Question asked by fatema on Feb 3, 2015
Latest reply on Feb 9, 2015 by jbarrez
hi,

I am trying to install it in Windows 7 and while I was trying to connect to H2 (jdbc:h2:tcp://localhost/activiti) I am getting the following error.
please assist.

H2 Database URLsEmbeddedThe URL jdbc:h2:~/test means the database is stored in the user home directory in files starting with 'test'. Absolute locations like jdbc:h2:/data/db/test are supported. In embedded mode, the database runs in the same process as the application. Only one process may access a database at any time. Databases are automatically created if they don't exist. Warning: if no path is used (for example jdbc:h2:test), then the database is stored in the current working directory (the directory where the application was started). URLs of the form jdbc:h2:data/test are relative to the current working directory. It is recommended to use locations relative to ~ or absolute locations.
Remote (client/server)The URL jdbc:h2:tcp://localhost/~/test means connect over TCP/IP to the H2 TCP server running on this computer, and open a database called test in the user home directory. The server must be started first. Any number of clients can connect to the same database. The same location rules as for embedded databases apply.
In-MemoryThe URL jdbc:h2:mem:test means open an in-memory database named 'test'. Data is not persisted, and lost when the last connection to the database is closed. Multiple threads can access the same database, but data is only visible within the same process.
For more information, see Database URL Overview.


A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:tcp://localhost/activiti". Use an absolute path, ~/name, ./name, or the baseDir setting instead. [90011-185] 90011/90011 (Help)
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:tcp://localhost/activiti". Use an absolute path, ~/name, ./name, or the baseDir setting instead. [90011-185]
    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.getName(ConnectionInfo.java:398)
    at org.h2.engine.Engine.openSession(Engine.java:45)
    at org.h2.engine.Engine.openSession(Engine.java:167)
    at org.h2.engine.Engine.createSessionAndValidate(Engine.java:145)
    at org.h2.engine.Engine.createSession(Engine.java:128)
    at org.h2.server.TcpServerThread.run(TcpServerThread.java:149)
    at java.lang.Thread.run(Unknown Source)

    at org.h2.engine.SessionRemote.done(SessionRemote.java:622)
    at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:141)
    at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:446)
    at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:327)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:108)
    at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:92)
    at org.h2.Driver.connect(Driver.java:72)
    at org.h2.server.web.WebServer.getConnection(WebServer.java:750)
    at org.h2.server.web.WebApp.test(WebApp.java:895)
    at org.h2.server.web.WebApp.process(WebApp.java:221)
    at org.h2.server.web.WebApp.processRequest(WebApp.java:170)
    at org.h2.server.web.WebThread.process(WebThread.java:137)
    at org.h2.server.web.WebThread.run(WebThread.java:93)
    at java.lang.Thread.run(Unknown Source)

Outcomes