cancel
Showing results for 
Search instead for 
Did you mean: 

Failed to execute CommandLineRunner

krishan_deo
Champ in-the-making
Champ in-the-making
Hi
I am getting following error when I am executing simple activiti program with spring boot. Please help I am new in activiti..

java.lang.IllegalStateException: Failed to execute CommandLineRunner
   at org.springframework.boot.SpringApplication.runCommandLineRunners(SpringApplication.java:680)
   at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:695)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:952)
   at org.springframework.boot.SpringApplication.run(SpringApplication.java:941)
   at com.bizruntime.activiti.SpringBootWithActiviti.main(SpringBootWithActiviti.java:25)
Caused by: org.activiti.engine.ActivitiObjectNotFoundException: no processes deployed with key 'oneTaskProcess'
   at org.activiti.engine.impl.persistence.deploy.DeploymentManager.findDeployedLatestProcessDefinitionByKey(DeploymentManager.java:81)
   at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:79)
   at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:37)
   at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47)
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40)
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35)
   at org.activiti.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:69)
   at com.bizruntime.activiti.SpringBootWithActiviti$1.run(SpringBootWithActiviti.java:37)
   at org.springframework.boot.SpringApplication.runCommandLineRunners(SpringApplication.java:677)
   … 5 common frames omitted
11 REPLIES 11

hari
Star Contributor
Star Contributor
Hi,

Did you notice, It says no processes deployed with key 'oneTaskProcess'. I guess you are trying to start/ perform some action on a process with name oneTaskProcess which has not yet been deployed into activiti.

krishan_deo
Champ in-the-making
Champ in-the-making
Hi Hari,
Thanks for respond, yeah I noticed that task is not deployed but I am not able to uderstand why not deployed that task

vasile_dirla
Star Contributor
Star Contributor
Can you create a unit test for this?
will be useful if you could provide it so the community will see the process file (xml) and how you are trying to deploy it.

btw: where did you put the xml file (/resources/processes/) ? or in other location ?

krishan_deo
Champ in-the-making
Champ in-the-making
I put my my file on /resources/processes/ location and I m deploying with @EnableAutoConfiguration with Spring Boot

vasile_dirla
Star Contributor
Star Contributor
Will be nice if you will provide here a zip with a simple project which will show this behaviour, so we can have a look on it.
(rename it to TXT if will not allow you to upload as zip)

krishan_deo
Champ in-the-making
Champ in-the-making
Hi

vasile_dirla
Star Contributor
Star Contributor
just add this in your pom file:
<code>
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.3.3.RELEASE</version>
</parent>
</code>

krishan_deo
Champ in-the-making
Champ in-the-making
Now this error is comming in pom.xml

Missing artifact org.springframework.boot:spring-boot-starter-parent:jar:1.3.3.RELEASE

vasile_dirla
Star Contributor
Star Contributor
As you can see this error is not Activiti related Smiley Happy
http://lmgtfy.com/?q=Missing+artifact+org.springframework.boot%3Aspring-boot-starter-parent%3Ajar%3A...

hope this will help you.