cancel
Showing results for 
Search instead for 
Did you mean: 

Fail in stress test

alexisgc
Champ in-the-making
Champ in-the-making
Hi all,
I've run a stress test for a basic flow in activiti, this flow start when a message arrives to a RabbitMQ queue.
For this stress test I put 30,000 elements in a queue and then run mi JBoss server with the activiti process to consume the messages.

In only 26,757 cases the flow end satisfactorily but in the other 3,243 the flow is executed only before the last task (I'm sure the flow execute at least the serviceTask "Save E", I attach an image of the flow).

This is the error:

[size=85]
org.activiti.engine.ActivitiException: Error while evalutaing expression
   at org.activiti.engine.impl.el.JuelExpression.getValue(JuelExpression.java:50)
   at org.activiti.engine.impl.bpmn.ServiceTaskExpressionActivityBehavior.execute(ServiceTaskExpressionActivityBehavior.java:39)
   at org.activiti.engine.impl.pvm.runtime.AtomicOperationActivityExecute.execute(AtomicOperationActivityExecute.java:40)
   at org.activiti.engine.impl.pvm.runtime.ExecutionImpl.performOperation(ExecutionImpl.java:521)
   at org.activiti.engine.impl.pvm.runtime.ExecutionImpl.start(ExecutionImpl.java:362)
   at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:66)
   at org.activiti.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:29)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:22)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:37)
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
   ……
   ……
   at sun.reflect.GeneratedMethodAccessor946.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
   at org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter.invokeListenerMethod(MessageListenerAdapter.java:434)
   at org.springframework.amqp.rabbit.listener.adapter.MessageListenerAdapter.onMessage(MessageListenerAdapter.java:341)
   at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:534)
   at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)
   at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$001(SimpleMessageListenerContainer.java:52)
   at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$1.invokeListener(SimpleMessageListenerContainer.java:97)
   at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.invokeListener(SimpleMessageListenerContainer.java:528)
   at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:479)
   at org.springframework.amqp.rabbit.listener.AbstractMessageListenerContainer.executeListener(AbstractMessageListenerContainer.java:452)
   at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.doReceiveAndExecute(SimpleMessageListenerContainer.java:411)
   at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.receiveAndExecute(SimpleMessageListenerContainer.java:396)
   at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer.access$200(SimpleMessageListenerContainer.java:52)
   at org.springframework.amqp.rabbit.listener.SimpleMessageListenerContainer$AsyncMessageProcessingConsumer.run(SimpleMessageListenerContainer.java:473)
   at java.lang.Thread.run(Thread.java:619)
Caused by: org.activiti.engine.impl.javax.el.ELException: java.lang.NoClassDefFoundError: validationRules/ValidateField
   at org.activiti.engine.impl.javax.el.BeanELResolver.invoke(BeanELResolver.java:481)
   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.el.JuelExpression.getValue(JuelExpression.java:44)
   … 34 more
Caused by: java.lang.NoClassDefFoundError: validationRules/ValidateField
   at ASMAccessorImpl_327190961303161430230.getValue(Unknown Source)
   at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:66)
   at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:96)
   at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:37)
   ……
   ……
   at java.lang.reflect.Method.invoke(Method.java:597)
   at org.activiti.engine.impl.javax.el.BeanELResolver.invoke(BeanELResolver.java:479)
   … 41 more
Caused by: java.lang.ClassNotFoundException: validationRules.ValidateField from BaseClassLoader@895684….
[/size]

Someone could help me resolve this error?.
Thank you in advance.

Alexis Gamarra Cano
4 REPLIES 4

frederikherema1
Star Contributor
Star Contributor
Seems to be something wrong with classloading:
java.lang.NoClassDefFoundError: validationRules/ValidateField

Are all dependencies of your custom java code present in JBoss?

alexisgc
Champ in-the-making
Champ in-the-making
Thanks for your reply frederikheremans,

Well I think this isn't a dependency problem because if this is a dependency error would not have been possible to run the flow in 26,757 cases.

I think the message: "org.activiti.engine.ActivitiException: Error while evalutaing expression" indicates that some expression language don't have a good response when is overloaded. Maybe I'm wrong (I hope so) but I don't have any other idea that can cause this error.

Alexis Gamarra Cano

trademak
Star Contributor
Star Contributor
Hi Alexis,

Could you attach the full diagram code (the .activiti file at least) to this post?
That makes it a bit easier to understand your process flow implementation.

Best regards,

alexisgc
Champ in-the-making
Champ in-the-making
Thanks for your reply Tijs,

This is is my bmpn20 file, I've attached the diagram code in my first post (that's the full diagram).
I had to change some names to avoid compromising corporate data where I work.


<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn"
targetNamespace="http://www.activiti.org/bpmn2.0">

<process name="Process" id="myProcess">
  <startEvent id="theStart" name="" />

  <sequenceFlow id="flow1" name="" sourceRef="theStart"
   targetRef="saveE" />

  <serviceTask id="saveE" name="Save E"
   activiti:expression="${myService.saveE(bpo,usage)}"
   activiti:resultVariableName="bpo" />

  <sequenceFlow id="flow2" name="" sourceRef="saveE"
   targetRef="buildBPO" />

  <serviceTask id="buildBPO" name="Build BPO Object"
   activiti:expression="${myService.buildBPO(bpo)}"
   activiti:resultVariableName="bpo" />

  <sequenceFlow id="flow3" name="" sourceRef="buildBPO"
   targetRef="validateBPO" />

  <serviceTask id="validateBPO" name="Validate BPO Object"
   activiti:expression="${myService.validateBPO(bpo)}"
   activiti:resultVariableName="bpo" />

  <sequenceFlow id="flow4" name="" sourceRef="validateBPO"
   targetRef="saveError" />
  <exclusiveGateway gatewayDirection="Diverging" id="saveError"
   name="" />

  <sequenceFlow id="flowsp" name="" sourceRef="saveError"
   targetRef="subError">
   <conditionExpression>${bpo.isError==true}</conditionExpression>
  </sequenceFlow>

  <subProcess id="subError">
   <startEvent id="subProcessStart" name="" />

   <!– Create the Incidence –>
   <sequenceFlow id="flowsp0" name="" sourceRef="subProcessStart"
    targetRef="createIncidenceTransactional" />
   <serviceTask id="createIncidenceTransactional" name="Save U"
    activiti:expression="${myService.createIncidenceTransactional(bpo)}"
    activiti:resultVariableName="bpo" />

   <!– Obtaining all the parameters –>
   <sequenceFlow id="flowsp1" name="" sourceRef="createIncidenceTransactional"
    targetRef="saveParameterProcedureValue" />
   <serviceTask id="saveParameterProcedureValue" name="Save Parameter Procedure Values"
    activiti:expression="${myService.saveParameterProcedureValue(bpo)}"
    activiti:resultVariableName="bpo" />
   
   <!– Wait for a Operator problem's resolution –>
   <sequenceFlow id="flowsp2" name=""
    sourceRef="saveParameterProcedureValue" targetRef="errorFixed" />
   <userTask id="errorFixed" name="Error Fixed">
   </userTask>

   <sequenceFlow id="flowsp3" name="" sourceRef="errorFixed"
    targetRef="subProcessEnd" />
   <endEvent id="subProcessEnd" name="" />
  </subProcess>

  <sequenceFlow id="flow5" name="" sourceRef="subError"
   targetRef="buildBPO" />

  <sequenceFlow id="flow6" name="" sourceRef="saveError"
   targetRef="calculateC">
   <conditionExpression>${bpo.isError==false}</conditionExpression>
  </sequenceFlow>

  <serviceTask id="calculateC" name="Calculate C"
   activiti:expression="${myService.calculateC(bpo)}"
   activiti:resultVariableName="bpo" />

  <sequenceFlow id="flow7" name="" sourceRef="calculateC"
   targetRef="saveS" />

  <serviceTask id="saveS" name="Save S"
   activiti:expression="${myService.saveSFromBPO(bpo)}"
   activiti:resultVariableName="bpo" />

  <sequenceFlow id="flow8" name="" sourceRef="saveS"
   targetRef="theEnd" />

  <endEvent id="theEnd" name="" />

</process>

</definitions>

Thanks for your help!,

Alexis Gamarra Cano