Failed to find Spring bean

193 views
Skip to first unread message

mgl...@gmail.com

unread,
Aug 4, 2014, 2:35:12 AM8/4/14
to camunda-...@googlegroups.com
We are seeing an intermittent issue where everything works for a time and then we get an error saying that Camunda is unable to locate a Spring bean. We are using Camunda v7.1.0-FINAL and Spring v3.2.6.

Here is an example error:

SEVERE: exception during timer execution
org.camunda.bpm.engine.ProcessEngineException: Unknown property used in expression: ${dayOfWeekService}. Cause: Cannot resolve identifier 'dayOfWeekService'
at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:55)
at org.camunda.bpm.engine.impl.bpmn.behavior.ServiceTaskDelegateExpressionActivityBehavior.execute(ServiceTaskDelegateExpressionActivityBehavior.java:87)

This bean was found and the process executed successfully each day for a week or so and then we got this error. This one specifically relates to a timer but I have seen it in a number of beans (JavaDelegate beans and straight Spring beans).

Has anyone seen this type of behavior before and, if so, found a way to resolve it.

Thanks,
Mike

galen...@gmail.com

unread,
Aug 4, 2014, 11:40:53 AM8/4/14
to camunda-...@googlegroups.com, mgl...@gmail.com
Hi,

I'm not sure if this is what you are seeing, but I struggled with this error message for quite some time. In the end it turned out it was how the process definition was getting deployed/registered. There is a certain way that process definitions can get deployed that causes the process to be executable, but not "switch" context to a ProcessApplication. If your process application is the app holding your Spring context, and the process doesn't switch contexts to the process application, then camunda will not know anything about the bean (since it doesn't know about the Spring application context).

This may or may not be what you are seeing, but it might be worth investigating.

Thanks,
Galen

See:

https://groups.google.com/forum/#!topic/camunda-bpm-users/Rnb2kIDgzR4

webcyberrob

unread,
Aug 4, 2014, 2:07:35 PM8/4/14
to camunda-...@googlegroups.com, mgl...@gmail.com, galen...@gmail.com
Hi Galen,

cold you elaborate on what you mean by ' switch contexts to the process application'...In particular,what if I am using a shared engine in a Tomcat environment?

regards

Rob

galen...@gmail.com

unread,
Aug 4, 2014, 7:19:02 PM8/4/14
to camunda-...@googlegroups.com, mgl...@gmail.com, galen...@gmail.com
Hi Rob,

What I mean is that if there is no ProcessApplication registered with the shared engine, and you need that ProcessApplication because that's where your beans are Spring-registered, then you will run into trouble. In other words, I think what is happening is that the camunda code will run as the camunda web app. If, however, the PA is registered correctly, then when you launch a process via TaskList, it will identify the PA (different web app than Camunda), then run the code as that web app. Switching to the "context" of the other (PA) web app is what I mean.

I think Daniel could better answer what's really going on beneath the covers, and how this switching really works. I've just observed this from a very high level, mostly because I prefix the logging from my various web apps will different strings, and I can see what is coming from what web app. As I don't fully understand how this switching occurs, I'll defer to other people on this forum.

Thanks,
Galen

Reply all
Reply to author
Forward
0 new messages