NoSuchBeanDefinitionException during process execution in BPMS

Solution Unverified - Updated -

Issue

  • The process execution fails with NoSuchBeanDefinitionException (as shown below) even though the bean context xml exists inside the same dependent jar.
org.jbpm.workflow.instance.WorkflowRuntimeException: [sample:21 - Script Task 1:2] -- No bean named 'myBean' is defined
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.executeAction(NodeInstanceImpl.java:188)
    at org.jbpm.workflow.instance.node.ActionNodeInstance.internalTrigger(ActionNodeInstance.java:48)
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155)
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerNodeInstance(NodeInstanceImpl.java:337)
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:296)
    at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:66)
    at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:43)
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:155)
    at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
    at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:226)
    at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:362)
    at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:194)
    at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:176)
    at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:168)
    at org.drools.core.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1575)
    at org.drools.core.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:366)
    at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:121)
    at org.drools.core.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:40)
    at org.drools.core.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
    at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)
    at org.drools.persistence.SingleSessionCommandService$TransactionInterceptor.execute(SingleSessionCommandService.java:533)
    at org.drools.core.command.impl.AbstractInterceptor.executeNext(AbstractInterceptor.java:41)
    at org.drools.persistence.jpa.OptimisticLockRetryInterceptor.execute(OptimisticLockRetryInterceptor.java:73)
    at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:377)
    at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:232)
    at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)
    at com.sample.SpringDependencyTest.testProcess(SpringDependencyTest.java:33)
...
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'myBean' is defined
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:529)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1095)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:277)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1093)
    at com.sample.client.CheckServiceClient.getFeasibilityService(CheckServiceClient.java:32)
    at org.jbpm.Process_org$u46$jbpm$u46$sample909675094.action0(Process_org$u46$jbpm$u46$sample909675094.java:11)
    at org.jbpm.Process_org$u46$jbpm$u46$sample909675094Action0Invoker.execute(Process_org$u46$jbpm$u46$sample909675094Action0Invoker.java:14)
    at org.jbpm.workflow.instance.impl.NodeInstanceImpl.executeAction(NodeInstanceImpl.java:182)
    ... 51 more

How to fix this issue ?

Environment

  • Red Hat JBoss BPM Suite (BPMS)
    • 6.0.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In