Acitiviti Startup Error
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2014 12:19 AM
Whenever I am starting up acitiviti, I am getting the below error thus leading to hanging tomcat.
14/05/26 00:08:25 ERROR interceptor.CommandContext: Error while closing command context
org.activiti.engine.ActivitiException: Error parsing XML
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:247)
at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:91)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:39)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.resolveProcessDefinition(DeploymentManager.java:92)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.findDeployedLatestProcessDefinitionByKey(DeploymentManager.java:66)
at org.activiti.engine.impl.jobexecutor.TimerStartEventJobHandler.execute(TimerStartEventJobHandler.java:42)
at org.activiti.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:80)
at org.activiti.engine.impl.persistence.entity.TimerEntity.execute(TimerEntity.java:62)
at org.activiti.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:68)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61)
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:31)
at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:46)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.activiti.engine.ActivitiException: Invalid destination 'sid-F5FD3564-C8DA-4418-B32C-BCA054BE03B7' of sequence flow 'sid-05FE012E-173D-457C-BCC3-D8BF28B45859'
at org.activiti.engine.impl.bpmn.parser.BpmnParse.createSequenceFlow(BpmnParse.java:2051)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.processFlowElements(BpmnParse.java:555)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.transformProcess(BpmnParse.java:478)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.transformProcessDefinitions(BpmnParse.java:428)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:245)
14/05/26 00:08:25 ERROR interceptor.CommandContext: Error while closing command context
org.activiti.engine.ActivitiException: Error parsing XML
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:247)
at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:91)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.deploy(DeploymentManager.java:39)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.resolveProcessDefinition(DeploymentManager.java:92)
at org.activiti.engine.impl.persistence.deploy.DeploymentManager.findDeployedLatestProcessDefinitionByKey(DeploymentManager.java:66)
at org.activiti.engine.impl.jobexecutor.TimerStartEventJobHandler.execute(TimerStartEventJobHandler.java:42)
at org.activiti.engine.impl.persistence.entity.JobEntity.execute(JobEntity.java:80)
at org.activiti.engine.impl.persistence.entity.TimerEntity.execute(TimerEntity.java:62)
at org.activiti.engine.impl.cmd.ExecuteJobsCmd.execute(ExecuteJobsCmd.java:68)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61)
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:31)
at org.activiti.engine.impl.jobexecutor.ExecuteJobsRunnable.run(ExecuteJobsRunnable.java:46)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.activiti.engine.ActivitiException: Invalid destination 'sid-F5FD3564-C8DA-4418-B32C-BCA054BE03B7' of sequence flow 'sid-05FE012E-173D-457C-BCC3-D8BF28B45859'
at org.activiti.engine.impl.bpmn.parser.BpmnParse.createSequenceFlow(BpmnParse.java:2051)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.processFlowElements(BpmnParse.java:555)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.transformProcess(BpmnParse.java:478)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.transformProcessDefinitions(BpmnParse.java:428)
at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:245)
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2014 02:19 AM
Hi,
It seems the process definition has wrong reference on the sequence flow 'sid-05FE012E-173D-457C-BCC3-D8BF28B45859'.
Regards
Martin
Caused by: org.activiti.engine.ActivitiException: Invalid destination 'sid-F5FD3564-C8DA-4418-B32C-BCA054BE03B7' of sequence flow 'sid-05FE012E-173D-457C-BCC3-D8BF28B45859'
It seems the process definition has wrong reference on the sequence flow 'sid-05FE012E-173D-457C-BCC3-D8BF28B45859'.
Regards
Martin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-26-2014 04:01 AM
@martin.grofcik But I get this error whenever I restart my tomcat. After 2-3 restarts all timer entity error gets cleared and it starts working fine.
For deleting existing model & deployment, I am using the following code.
<java>
public String deleteModel(String modelName, String processName) {
RepositoryService repositoryService = ProcessEngines.getDefaultProcessEngine().getRepositoryService();
RuntimeService runtimeService = ProcessEngines.getDefaultProcessEngine().getRuntimeService();
HistoryService historyService = ProcessEngines.getDefaultProcessEngine().getHistoryService();
List<Model> models = repositoryService.createModelQuery().modelName(modelName).list();
if (models != null && models.isEmpty()) {
return "Model Not Found";
}
for (Model model : models) {
List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery().
processDefinitionKey(processName).list();
for (ProcessDefinition processDefinition : processDefinitions) {
try {
List<HistoricProcessInstance> historicProcessInstances = historyService.createHistoricProcessInstanceQuery().processDefinitionKey(processName).list();
for (HistoricProcessInstance historicProcessInstance : historicProcessInstances) {
runtimeService.deleteProcessInstance(historicProcessInstance.getId(), "Model Deleted");
historyService.deleteHistoricProcessInstance(historicProcessInstance.getId());
}
} catch (Exception e) {
LOGGER.error("Error deleting model", e);
}
try {
repositoryService.deleteDeployment(processDefinition.getDeploymentId(), true);
} catch (Exception e) {
LOGGER.error("Error deleting model", e);
}
}
try {
repositoryService.deleteModel(model.getId());
} catch (Exception e) {
LOGGER.error("Error deleting model", e);
}
}
return "Deleted Successfully";
}
</java>
Is there some issue in the above code which is leading to the current exceptions.
For deleting existing model & deployment, I am using the following code.
<java>
public String deleteModel(String modelName, String processName) {
RepositoryService repositoryService = ProcessEngines.getDefaultProcessEngine().getRepositoryService();
RuntimeService runtimeService = ProcessEngines.getDefaultProcessEngine().getRuntimeService();
HistoryService historyService = ProcessEngines.getDefaultProcessEngine().getHistoryService();
List<Model> models = repositoryService.createModelQuery().modelName(modelName).list();
if (models != null && models.isEmpty()) {
return "Model Not Found";
}
for (Model model : models) {
List<ProcessDefinition> processDefinitions = repositoryService.createProcessDefinitionQuery().
processDefinitionKey(processName).list();
for (ProcessDefinition processDefinition : processDefinitions) {
try {
List<HistoricProcessInstance> historicProcessInstances = historyService.createHistoricProcessInstanceQuery().processDefinitionKey(processName).list();
for (HistoricProcessInstance historicProcessInstance : historicProcessInstances) {
runtimeService.deleteProcessInstance(historicProcessInstance.getId(), "Model Deleted");
historyService.deleteHistoricProcessInstance(historicProcessInstance.getId());
}
} catch (Exception e) {
LOGGER.error("Error deleting model", e);
}
try {
repositoryService.deleteDeployment(processDefinition.getDeploymentId(), true);
} catch (Exception e) {
LOGGER.error("Error deleting model", e);
}
}
try {
repositoryService.deleteModel(model.getId());
} catch (Exception e) {
LOGGER.error("Error deleting model", e);
}
}
return "Deleted Successfully";
}
</java>
Is there some issue in the above code which is leading to the current exceptions.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-27-2014 04:30 AM
> After 2-3 restarts all timer entity error gets cleared and it starts working fine.
This is because after 3 retries, the timer will be put in the 'exception state' and it will not be triggered anymore.
Martin is correct, your process references are wrong. When booting up, the job executor tries 3 times to execute it, fails, and stops.
This is because after 3 retries, the timer will be put in the 'exception state' and it will not be triggered anymore.
Martin is correct, your process references are wrong. When booting up, the job executor tries 3 times to execute it, fails, and stops.