AnsweredAssumed Answered

Activiti Default H2 JDBC Connection String Is not longer valid

Question asked by juacosta on Oct 9, 2014
Latest reply on Oct 17, 2014 by jbarrez
I am using Activiti v5.16.3 and H2 v1.4.181 to run my JUnit test suite.

My test suite is using "ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration()". After I upgraded the H2 DB engine to v1.4.181 calling the the method fails to connect. It seems H2 has changed the URL from "jdbc:h2:tcp://localhost/activiti" to "jdbc:h2:tcp://localhost/~/activiti" and the exception thrown indicates it is now required to specify either a relative of fully qualified path.

have you seen this? are there any patches you recommend applying?

Here is in example of the error:

09 Oct 2014 16:57:26,731 [main] DEBUG org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl:563 - initializing datasource to db: jdbc:h2:tcp://localhost/activiti
09 Oct 2014 16:57:26,781 [main] DEBUG org.apache.ibatis.logging.LogFactory:124 - Logging initialized using 'class org.apache.ibatis.logging.slf4j.Slf4jImpl' adapter.
09 Oct 2014 16:57:26,790 [main] DEBUG org.apache.ibatis.datasource.pooled.PooledDataSource:304 - PooledDataSource forcefully closed/removed all connections.
09 Oct 2014 16:57:26,900 [main] ERROR org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl:657 - Exception while initializing Database connection
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-181]
   at org.h2.message.DbException.getJdbcSQLException(
   at org.h2.message.DbException.get(
   at org.h2.message.DbException.get(
   at org.h2.engine.ConnectionInfo.getName(
   at org.h2.engine.Engine.openSession(
   at org.h2.engine.Engine.openSession(
   at org.h2.engine.Engine.createSessionAndValidate(
   at org.h2.engine.Engine.createSession(