Forum Discussion

FICO's avatar
FICO
Community Manager
16 years ago

How to identify location of %22Evaluation error%22 ?.pdf

How to identify location of "Evaluation error" ?

Hello,

My component hags on evaluation error (below). As Blase jars are obfuscated, stack strace tells me very few about error location. Is there a way to find out vhere is the problem ?

------------------------------------------------

Please see attached to see stack trace.

7 Replies

  • FICO's avatar
    FICO
    Community Manager

    Hi,

     I used to face these kind of errors when i access a value from a null object. For eg: I have a class say Student and i have two variables name and score in Student. In a rule i access the score from the Student class to take a decision while accessing if the Student class is itself null and when i say Student.score it gives the run time exception like you have mentioned.

     So the point is check whether required inputs are passed to the rules engine.

    Regards,

    Kishore

  • FICO's avatar
    FICO
    Community Manager

    Hi,

    It looks like you have a start function, which contains a try/catch statement. Inside that try/catch statement, you are calling something, either a ruleset, ruleflow or another function. I would look for deep property expressions inside that nested call.

    If you have several invocations inside the try/catch statement, use debug statements to narrow down the possible function/ruleset/ruleflow calls. 

    HTH, 

    Jostein 

  • FICO's avatar
    FICO
    Community Manager

    Thanks guys for answers! I'll try to narrow dawn function calls.

     Jostein, you are rigth, my entry point is a function and it has a try catch block.The block contains a couple of function calls inluding posting of an object to the external event channel and execution of agent.

  • FICO's avatar
    FICO
    Community Manager
    You can try remote debugging your blaze project to see where the null pointer exception is occurring. Please refer to product documentation on how to remote debug a blaze project from an external call.
  • FICO's avatar
    FICO
    Community Manager

    When rules component is deployed locally on my machine i see no exception on execution. This exception appears only on production machine...

    I found that this exception is thrown at the end of try block after call "writeToLog()" :

    try {

        //some function call

        events().postEvent(aParams);

        notifyUserDefinedEvent("validateDocument : before executeAgent");     executeAgent();     writeToLog("validateDocument() _opData[id=" aOperationData.id "]"); } catch an Exception with {  }
  • FICO's avatar
    FICO
    Community Manager

    Are you sure that aOperationData <> null? Does the writeToLog function call itself throw an exception, or do you know that it executes propertly?

    Regards,

    Jostein

  • FICO's avatar
    FICO
    Community Manager

    aOperationData is checked before to be not null.

    blaze function writeToLog() performs just one call :

    {

       RulesUtils.writeToLog(msg);

    }

    RulesUtils.writeToLog() is implemented in java :

        public static void writeToLog(Object o) {

            if (null == o) { return; }         synchronized (log) {                         if (log.isDebugEnabled()) {                 try {                     log.debug(FormatterHelper.formatBraces(o.toString()));                 } catch (Exception e) {                     log.debug(o);                 }             }         }     }