cancel
Showing results for 
Search instead for 
Did you mean: 

Could not lookup beanmanager in jndi in weblogic

vinothkumar_j2e
Champ in-the-making
Champ in-the-making
hi,

I have conditional flow with expression  ${ instanceVaraiable.getCanSkipPool()}  returns boolean.

instanceVariable (JAVA BEAN with get & set methods) is set during the process flow.  When control reaches the conditional flow , i get below error and instance is not getting created . What needs to be done to resolve this issue ?

org.activiti.engine.ActivitiException: Error while evaluating expression: ${ instanceVariable.getCanSkipPool()}
        at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:59)
        at org.activiti.engine.impl.el.UelExpressionCondition.evaluate(UelExpressionCondition.java:37)
        at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:97)
        at org.activiti.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:54)

Caused by: org.activiti.engine.ActivitiException: Could not lookup beanmanager in jndi. If no jndi is avalable, set the beanmanger to the 'localInstance' property of this class.
        at org.activiti.cdi.impl.util.BeanManagerLookup.lookupBeanManagerInJndi(BeanManagerLookup.java:60)
        at org.activiti.cdi.impl.util.BeanManagerLookup.getBeanManager(BeanManagerLookup.java:33)
        at org.activiti.cdi.impl.el.CdiResolver.getBeanManager(CdiResolver.java:59)
        at org.activiti.cdi.impl.el.CdiResolver.getWrappedResolver(CdiResolver.java:63)
        at org.activiti.cdi.impl.el.CdiResolver.invoke(CdiResolver.java:109)
        at org.activiti.engine.impl.javax.el.CompositeELResolver.invoke(CompositeELResolver.java:397)
        at org.activiti.engine.impl.juel.AstMethod.invoke(AstMethod.java:91)
        at org.activiti.engine.impl.juel.AstMethod.eval(AstMethod.java:75)
        at org.activiti.engine.impl.juel.AstEval.eval(AstEval.java:50)
        at org.activiti.engine.impl.juel.AstNode.getValue(AstNode.java:26)
        at org.activiti.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
        at org.activiti.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:33)
        at org.activiti.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:37)
        at org.activiti.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:25)
        at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:48)
4 REPLIES 4

frederikherema1
Star Contributor
Star Contributor
The "instanceVariable" is serialized, stored in the DB and deserialized again when needed. Possibly the context the bean needs is not serialized and will be de-serialized as "null" or something like that.

Either make a custom variable type (extending SerializableType) that initialized the correct context for the "instanceVariable" POJO before passing it on the the engine. For an example, see org.activiti.engine.impl.variable.JPAEntityVariableType. Another option is to make the POJO smart enough to initialize the right context when it's used for the first time and still store it as you do now.

instanceVariable  class is already implementing java.io.Serializable interface. Can you please elaborate what you mean by "initialize the right context when it's used for the first time" ? Problem is with the attributes inside the InstanceVariable classes are not initilized is that the problem?

I am able to access the "instanceVariable" in next serviceTask . Issue is seems to be with expression set in the conditional flow. If i set ${false} , no issues instance get created. Why is the conditional expression is not loading the instancevariable

I removed all the engine table and re-created engine again . Not getting above error anymore. Looks like i was accessing wrong variable  or Serializable data was corrupt.  Thanks everyone.

frederikherema1
Star Contributor
Star Contributor
Is the "instance variable" set on the execution/process when the conditional flow is reached? If not, this is the issue.

I didn't see you were using activiti-CDI, so ignore the comments above.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.