Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#339 Error when submitting null value within method params

open
nobody
Parsing (77)
5
2012-06-12
2012-06-12
Anonymous
No

Hi,

I am using Beanshell Scripting within JBoss 6.0 and JBPM. I think this is bean shell version 1.3. When I call a method and a parameter is null then I got follow error:

2012-06-12 10:23:15,907 ERROR [org.jbpm.graph.def.GraphElement] (http-0.0.0.0-8080-1:) action threw exception: script evaluation failed: org.jbpm.graph.def.DelegationException: script evaluation failed
at marabu.pegasos.server.bpm.core.engine.graph.action.ExtendedScript.eval(ExtendedScript.java:97)
at org.jbpm.graph.action.Script.eval(Script.java:75)
at org.jbpm.graph.action.Script.execute(Script.java:64)
....
at java.lang.Thread.run(Thread.java:662)
Caused by: Sourced file: inline evaluation of: `` if( !(newSapDocNo.equals(oldSapDocNo) && newSapFiscalYear.equals(oldSapFisc . . . '' unknown error: null : at Line: 2 : in file: inline evaluation of: `` if( !(newSapDocNo.equals(oldSapDocNo) && newSapFiscalYear.equals(oldSapFisc . . . '' : if ( ! ( newSapDocNo .equals ( oldSapDocNo ) && newSapFiscalYear .equals ( oldSapFiscalYear ) ) ) {

at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at bsh.Interpreter.eval(Unknown Source)
at marabu.pegasos.server.bpm.core.engine.graph.action.ExtendedScript.eval(ExtendedScript.java:83)
... 421 more

The error occur in "newSapDocNo.equals(oldSapDocNo)" when oldSapDocNo is null. I have many scripts with the same occurence. When I first test the variable to null and do not call the method it works. But this makes no sense cause I have tool methods that checks for null or empty values. So it must be possible to call a method with a null value as param.

I also tried it with the latest version 2.0b02 but I get the same error. Is it not allowed to submit null values in method params or is it a bug?

Kind regards,

Marco.

Discussion