Camunda Spring shared container is not working

It seems that the Spring framework examples for shared container is not working as expected.

ntext: no processes deployed with key ‘loanApproval’: processDefinition is null
org.camunda.bpm.engine.exception.NullValueException: no processes deployed with key ‘loanApproval’: processDefinition is null

I have confirmed that the loanApproval.bpmn process key are correct (I’ve updated it with “loanApproval”)

loanApproval.bpmn ::
<bpmn2:process id=“loanApproval” name=“loanApproval”

Hi @Brandon,

which example are we talking about exactly?

Cheers,
Askar

https://docs.camunda.org/get-started/spring/shared-process-engine/#alternative-configuration-using-shared-process-engine

I have updated the process key to “loadApproval” same as Started class “runtimeService.startProcessInstanceByKey(“loanApproval”);”

I am running vanilla tomcat 7.6 from camunda.

Hi @Brandon,

is loadApproval a typo?

Cheers,
Askar

Hi

I have double check in the code, there are no typo:

Starter.class - public void afterPropertiesSet()
runtimeService.startProcessInstanceByKey(“loanApproval”);

loanApproval.bpmn:
<bpmn2:process id=“loanApproval” name=“loanApproval” isExecutable=“true”>

It still not deploying the process definition

HI @Brandon,

could you attach your process definition file here please.

Cheers,
Askar

loanApproval.bpmn (2.9 KB)

hi @aakhmerov

I did not generate a business key. What I did is download the spring framework sample (shared container) and update the loanApproval.bpmn and run it in vanilla tomcat.

The sample is here:camunda-get-started-spring-Bonus.zip
https://github.com/camunda/camunda-get-started-spring/archive/Bonus.zip

Hi @Brandon,

yes I’ve realized that, and deleted my question already :slight_smile:
I can start your process definition fine in a unit test. Could you please may be publish your project on github? Looks like your process definition is not getting deployed for some reason.

Cheers,
Askar

hi @aakhmerov

I tried running the embedded application it is OK running fine. But as soon as I modify to use shared runtime, it hit the same problem. process definition is null

Hi @Brandon,

I think you should delete processes.xml, since you declare SpringProcessApplication in your context. You have to decide for one of those, not use both of them.

Cheers,
Askar

1 Like

hi @aakhmerov

thanks for the pointer. i guess the doc site need to be updated.

Yes @Brandon,

thanks for pointing out, I have created a ticket for it CAM-7570.

Cheers,
Askar

hi @aakhmerov,

Just tried out your suggestion, deleted the processes.xml but i still have the same issue.

init method failed; nested exception is org.camunda.bpm.engine.exception.NullValueException: no processes deployed with key ‘loanApproval’: processDefinition is null

Hey @Brandon,

could you try to extend you implement your own process application and start process instance there instead of starter bean?

Here is an example https://github.com/camunda/camunda-bpm-examples/blob/master/deployment/spring-servlet-pa-jboss/src/main/java/org/camunda/bpm/example/spring/servlet/pa/SpringServletProcessApplication.java

Cheers,
Askar.

Hello,

Today,i have tried to integrate the spring framework with camunda follwing the camunda docs

ended up the same error as follows,
org.camunda.bpm.engine.exception.NullValueException: no processes deployed with key ‘loanApproval’: processDefinition is null

could you please help?

There is a general misunderstanding on the tutorial side. If you are using camunda modeler to design model, you need to type processId instead of bpmn file name here. That’s why most people confusing this.

@EventListener
private void processPostDeploy(PostDeployEvent event) {
    runtimeService.startProcessInstanceByKey(**"Process_0ot7fe4"**)
}

Was anyone able to resolve this issue? I’m also receiving — no deployed process definition found with id ‘loanApproval’: processDefinition is null. I followed https://github.com/camunda/camunda-get-started-spring

Thanks.

I try to replace the file name with processId but I receive the same error.

Debuging at ProcessDefinitionManager#findLatestProcessDefinitionByKey(…) the select query didn’t return any result neither using the file name neither the processId.