AnsweredAssumed Answered

Missing table 'ACT_RU_JOB' with h2 database issue with 5.16.x

Question asked by dharmesh on Oct 16, 2014
Latest reply on Oct 24, 2014 by osilva
My unit tests give me below error when i execute test suite with h2 database. Please note it works fine with Postgres.


Caused by: org.h2.jdbc.JdbcSQLException: Table "ACT_RU_JOB" not found; SQL statement:
select
       RES.*           
    from ACT_RU_JOB RES   
       LEFT OUTER JOIN ACT_RU_EXECUTION PI ON PI.ID_ = RES.PROCESS_INSTANCE_ID_
    where (RES.RETRIES_ > 0)
      and (RES.DUEDATE_ is null or RES.DUEDATE_ <= ?)
      and (RES.LOCK_OWNER_ is null or RES.LOCK_EXP_TIME_ <= ?)
     and (
            (RES.EXECUTION_ID_ is null)
           or
           (PI.SUSPENSION_STATE_ = 1)
      ) 
    LIMIT ? OFFSET ? [42102-166]
   at org.h2.message.DbException.getJdbcSQLException(DbException.java:329) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.message.DbException.get(DbException.java:169) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.message.DbException.get(DbException.java:146) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.command.Parser.readTableOrView(Parser.java:4757) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.command.Parser.readTableFilter(Parser.java:1084) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.command.Parser.parseSelectSimpleFromPart(Parser.java:1690) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.command.Parser.parseSelectSimple(Parser.java:1797) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.command.Parser.parseSelectSub(Parser.java:1684) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.command.Parser.parseSelectUnion(Parser.java:1527) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.command.Parser.parseSelect(Parser.java:1515) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.command.Parser.parsePrepared(Parser.java:405) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.command.Parser.parse(Parser.java:279) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.command.Parser.parse(Parser.java:251) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.command.Parser.prepareCommand(Parser.java:217) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.engine.Session.prepareLocal(Session.java:415) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.engine.Session.prepareCommand(Session.java:364) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1111) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:71) ~[h2-1.3.166.jar:1.3.166]
   at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:266) ~[h2-1.3.166.jar:1.3.166]
   at org.apache.commons.dbcp.DelegatingConnection.prepareStatement(DelegatingConnection.java:281) ~[commons-dbcp-1.4.jar:1.4]
   at org.apache.commons.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.prepareStatement(PoolingDataSource.java:313) ~[commons-dbcp-1.4.jar:1.4]
   at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source) ~[na:na]
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_51]
   at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_51]
   at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:240) ~[spring-jdbc-4.0.6.RELEASE.jar:4.0.6.RELEASE]
   at com.sun.proxy.$Proxy72.prepareStatement(Unknown Source) ~[na:na]
   at org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:72) ~[mybatis-3.2.5.jar:3.2.5]
   at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:82) ~[mybatis-3.2.5.jar:3.2.5]
   at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:54) ~[mybatis-3.2.5.jar:3.2.5]
   at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:70) ~[mybatis-3.2.5.jar:3.2.5]
   at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:56) ~[mybatis-3.2.5.jar:3.2.5]
   at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:259) ~[mybatis-3.2.5.jar:3.2.5]
   at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:132) ~[mybatis-3.2.5.jar:3.2.5]
   at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105) ~[mybatis-3.2.5.jar:3.2.5]
   at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81) ~[mybatis-3.2.5.jar:3.2.5]
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104) ~[mybatis-3.2.5.jar:3.2.5]
   … 18 common frames omitted

Outcomes