Uploaded image for project: 'OpenIDM'
  1. OpenIDM
  2. OPENIDM-10908

jdbcUrl in datasource.jdbc-default.json is invalid for workflow and usecase examples

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: OpenIDM 5.0.1.0
    • Fix Version/s: OpenIDM 5.0.1.0
    • Component/s: _Samples
    • Environment:
      OpenIDM version "5.0.1.0-SNAPSHOT" (revision: 8d690ed) jenkins-OpenIDM - 5.0.x - postcommit-209 origin/sustaining/5.0.x
      Repo: orientdb

      Description

       

      When I try to run openidm with workflow or usecase/usecase2 example with orientdb repo I get this error/warning in log:

       

      WARNING: Configuration invalid and could not be parsed, can not start JDBC repository: 
      com.zaxxer.hikari.pool.HikariPool$PoolInitializationException: Failed to initialize pool: A file path that is implicitly relative to the current working directory is not allowed in the database URL "jdbc:h2:file:&{idm.install.dir}/db/activiti/database;MVCC=FALSE;DB_CLOSE_DELAY=0". Use an absolute path, ~/name, ./name, or the baseDir setting instead. [90011-192]
      at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:516)
      at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:118)
      at com.zaxxer.hikari.HikariDataSource.<init>(HikariDataSource.java:71)
      at org.forgerock.openidm.datasource.jdbc.impl.HikariCPDataSourceFactory.newInstance(HikariCPDataSourceFactory.java:45)
      at org.forgerock.openidm.datasource.jdbc.impl.JDBCDataSourceService$2.<init>(JDBCDataSourceService.java:157)
      at org.forgerock.openidm.datasource.jdbc.impl.JDBCDataSourceService.initDataSourceService(JDBCDataSourceService.java:153)
      at org.forgerock.openidm.datasource.jdbc.impl.JDBCDataSourceService.activate(JDBCDataSourceService.java:186)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.felix.scr.impl.inject.BaseMethod.invokeMethod(BaseMethod.java:224)
      at org.apache.felix.scr.impl.inject.BaseMethod.access$500(BaseMethod.java:39)
      at org.apache.felix.scr.impl.inject.BaseMethod$Resolved.invoke(BaseMethod.java:617)
      at org.apache.felix.scr.impl.inject.BaseMethod.invoke(BaseMethod.java:501)
      at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:302)
      at org.apache.felix.scr.impl.inject.ActivateMethod.invoke(ActivateMethod.java:294)
      at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:297)
      at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:108)
      at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:906)
      at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:879)
      at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:748)
      at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:674)
      at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:429)
      at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:431)
      at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:273)
      at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:2074)
      at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:2042)
      at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:141)
      at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:109)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: 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:&{idm.install.dir}/db/activiti/database;MVCC=FALSE;DB_CLOSE_DELAY=0". Use an absolute path, ~/name, ./name, or the baseDir setting instead. [90011-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.getName(ConnectionInfo.java:400)
      at org.h2.engine.Engine.openSession(Engine.java:49)
      at org.h2.engine.Engine.openSession(Engine.java:176)
      at org.h2.engine.Engine.createSessionAndValidate(Engine.java:154)
      at org.h2.engine.Engine.createSession(Engine.java:137)
      at org.h2.engine.Engine.createSession(Engine.java:27)
      at org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:349)
      at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:118)
      at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:102)
      at org.h2.Driver.connect(Driver.java:72)
      at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:95)
      at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:101)
      at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:316)
      at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:506)
      ... 30 more
      

       

       

      Steps to reproduce:

      1. Run openidm with sample workflow "./startup.sh -p samples/workflow"

          Expected result: Openidm is started without any error/warning in log

          Actual result: Openidm is started with couple of error/warning in log.  

      Please look at PR below. 

      https://stash.forgerock.org/projects/OPENIDM/repos/openidm-sustaining/pull-requests/463/diff#openidm-zip/src/main/resources/samples/usecase/conf/datasource.jdbc-default.json

      https://stash.forgerock.org/projects/OPENIDM/repos/openidm-sustaining/pull-requests/463/diff#openidm-zip/src/main/resources/samples/workflow/conf/datasource.jdbc-default.json

      I found that jdbcUrl is invalid. Now we have this:

       

      "jdbcUrl" : "jdbc:h2:file:&{idm.install.dir}/db/activiti/database;MVCC=FALSE;DB_CLOSE_DELAY=0",
      

       

      If I try to update jdbcUrl this way, it works as expected.

       

      "jdbcUrl" : "jdbc:h2:file:&{launcher.install.location}/db/activiti/database;MVCC=FALSE;DB_CLOSE_DELAY=0",

       

        Attachments

          Activity

            People

            • Assignee:
              patrickdiligent patrick diligent
              Reporter:
              jakub.janoska Jakub Janoska [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: