cancel
Showing results for 
Search instead for 
Did you mean: 

Mapped Statements collection does not contain value for...

esteem
Champ in-the-making
Champ in-the-making
i just use activiti5.7 + mybatis 3.04,and wen i run tests by
maven,i got errors:
### Error querying database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for org.activiti.persistence.selectJobsByConfiguration
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for org.activiti.persistence.selectJobsByConfiguration
   at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:80)
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:72)
   at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:182)
   at org.activiti.engine.impl.persistence.entity.JobManager.findJobsByConfiguration(JobManager.java:122)
   at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.removeObsoleteTimers(BpmnDeployer.java:169)
   at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:132)
   at org.activiti.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:37)
   at org.activiti.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:39)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:58)
   at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:30)
   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.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
   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.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:43)
   at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:106)
   at com.taobao.ad.ido.process.engine.impl.ProcessRuntimeImpl.deployProcess(ProcessRuntimeImpl.java:111)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
   at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
   at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
   at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
   at $Proxy26.deployProcess(Unknown Source)

i found someone also encounter such problem : http://forums.activiti.org/en/viewtopic.php?f=6&t=1852&start=0

i check the mapper and sources ,found:
JobManager:

public List<Job> findJobsByConfiguration(String jobHandlerType, String jobHandlerConfiguration) {
    Map<String, String> params = new HashMap<String, String>();
    params.put("handlerType", jobHandlerType);
    params.put("handlerConfiguration", jobHandlerConfiguration);
    return getDbSqlSession().selectList("org.activiti.persistence.selectJobsByConfiguration", params);
  }

but our Job.xml :
<mapper namespace="org.activiti.engine.impl.persistence.entity.JobEntity"> ….

so ,i think this is the key point. hope this issue can be fix in future release
8 REPLIES 8

frederikherema1
Star Contributor
Star Contributor
We have extensive coverage for those queries. Are you using myBatis 3.0.4?

esteem
Champ in-the-making
Champ in-the-making
yes , mybatis is 3.0.4 , and mybatis-spring 1.0.1

frederikherema1
Star Contributor
Star Contributor
Can you perhaps provide us with a maven-project that contains a failing-testcase that shows the issue?

esteem
Champ in-the-making
Champ in-the-making
HI:
   sorry for my reply not in time. The maven project you can find in the attachment. You should run mvn  test in your cmd. Then you can get the error. But when import the project into eclispe and run the test SampleProcessTest.testBDUnAppealUnfreeze() ,the test will success.

esteem
Champ in-the-making
Champ in-the-making
HI:
   i just change the sorce code ,modify the Mapper . it works. i think this is a bug. hope this can be fix in future

frederikherema1
Star Contributor
Star Contributor
Can you attach a patch for the fox you did?

esteem
Champ in-the-making
Champ in-the-making
sorry for replay not in time .
how can i submit my patch. should i get a codehaus account ?

esteem
Champ in-the-making
Champ in-the-making
i have seen this bug has been fixed.

GetPropertiesCmd.java
JobManager.java