cancel
Showing results for 
Search instead for 
Did you mean: 

Problem calling historyService.createHistoricDetailQuery()

wolpert
Champ in-the-making
Champ in-the-making
Folks-

  Using activiti 5.4, I'm getting an error when I try to generate a createHistoricDetailQuery() request. Specific code calling is this:

historyService.createHistoricDetailQuery().activityInstanceId(instance.getId()).orderByTime().desc().list()

though I've tried different ways to call it, all with the same response. Any clues to guide me?

Exception trace is below:


org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error evaluating expression [historyService.createHistoricDetailQuery().activityInstanceId(instance.getId()).orderByTime().desc().list()] on line [114]:
### Error querying database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for org.activiti.persistence.selectByteArrayById_postgres
### The error may involve org.activiti.persistence.selectHistoricDetailsByQueryCriteria_postgres-Inline
### The error occurred while setting parameters
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for org.activiti.persistence.selectByteArrayById_postgres

   at mnt_Fast_wolpert_repo_PhaseThree_code_nuke_grails_app_views_processInstance_show_gsp$_run_closure2_closure40.doCall(mnt_Fast_wolpert_repo_PhaseThree_code_nuke_grails_app_views_processInstance_show_gsp:105)

   at mnt_Fast_wolpert_repo_PhaseThree_code_nuke_grails_app_views_processInstance_show_gsp$_run_closure2.doCall(mnt_Fast_wolpert_repo_PhaseThree_code_nuke_grails_app_views_processInstance_show_gsp:83)

   at mnt_Fast_wolpert_repo_PhaseThree_code_nuke_grails_app_views_processInstance_show_gsp$_run_closure2.doCall(mnt_Fast_wolpert_repo_PhaseThree_code_nuke_grails_app_views_processInstance_show_gsp)

   at mnt_Fast_wolpert_repo_PhaseThree_code_nuke_grails_app_views_processInstance_show_gsp.run(mnt_Fast_wolpert_repo_PhaseThree_code_nuke_grails_app_views_processInstance_show_gsp:144)

   at java.lang.Thread.run(Thread.java:662)

Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for org.activiti.persistence.selectByteArrayById_postgres
### The error may involve org.activiti.persistence.selectHistoricDetailsByQueryCriteria_postgres-Inline
### The error occurred while setting parameters
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for org.activiti.persistence.selectByteArrayById_postgres

   at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)

   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:61)

   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:53)

   at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:171)

   at org.activiti.engine.impl.db.DbHistorySession.findHistoricDetailsByQueryCriteria(DbHistorySession.java:113)

   at org.activiti.engine.impl.HistoricDetailQueryImpl.executeList(HistoricDetailQueryImpl.java:82)

   at org.activiti.engine.impl.AbstractQuery.execute(AbstractQuery.java:126)

   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)

   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)

   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)

   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)

   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)

   at org.activiti.engine.impl.AbstractQuery.list(AbstractQuery.java:102)

   at org.activiti.engine.query.Query$list.call(Unknown Source)

   at mnt_Fast_wolpert_repo_PhaseThree_code_nuke_grails_app_views_processInstance_show_gsp$_run_closure2_closure40_closure55.doCall(mnt_Fast_wolpert_repo_PhaseThree_code_nuke_grails_app_views_processInstance_show_gsp:105)

   … 5 more

Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for org.activiti.persistence.selectByteArrayById_postgres

   at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:462)

   at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:349)

   at org.apache.ibatis.executor.resultset.FastResultSetHandler.getNestedQueryMappingValue(FastResultSetHandler.java:343)

   at org.apache.ibatis.executor.resultset.FastResultSetHandler.getPropertyMappingValue(FastResultSetHandler.java:235)

   at org.apache.ibatis.executor.resultset.FastResultSetHandler.applyPropertyMappings(FastResultSetHandler.java:221)

   at org.apache.ibatis.executor.resultset.FastResultSetHandler.getRowValue(FastResultSetHandler.java:196)

   at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleRowValues(FastResultSetHandler.java:145)

   at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSet(FastResultSetHandler.java:121)

   at org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSets(FastResultSetHandler.java:98)

   at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:40)

   at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:55)

   at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:41)

   at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:94)

   at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:72)

   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:59)

   … 18 more
11 REPLIES 11

wolpert
Champ in-the-making
Champ in-the-making
Found it…

http://svn.codehaus.org/activiti/activiti/tags/activiti-5.4/modules/activiti-engine/src/test/java/or...

So I'm not doing anything different… still could use pointers for where to look.

jbarrez
Star Contributor
Star Contributor
All our test cases run on all the databases we support, hence why I'm so certain.

The error is really strange - as the mapped statement has nothing to do with your query … I'm actually puzzled :s