Problem in parsing when using jep function in jBoss

14 views
Skip to first unread message

jose carlos Dias

unread,
Sep 21, 2017, 6:49:15 PM9/21/17
to Jep Java Users
Hello

We used the jep-java-3.4 version a few years ago.
To date we have generated our application for use in Tomcat and we have no problem with its use.

Now we need to make our application available to jBoss (7.1 or 6.4 eap) even though it generates .war correctly,
when using some functions written for Jep, we received the following message:

15: 06: 02,477 ERROR [arteinfo] (http - 127.0.0.1-8080-6) *: lllegal parameters null, GLB_MES_ANO_SISTEMA (String): com.singularsys.jep.functions.IllegalParameterException: *: lllegal parameters null, GLB_MES_ANO_SISTEMA ( String)
at com.singularsys.jep.functions.Multiply.mul (Unknown Source) [jep-java-3.4.jar:]

In Java it is:

jep.parse (expression);

at where:
jep is an instance of Jep
expression = GLOBAL ("GLB_MES_ANO_SISTEMA")

In Tomcat7, 8 we have no problem. In parse it returns GLOBAL

Already on jBoss, we received the error presented. Inspecting the parse it returns Operator: "*"
Here is the Glogal.java class of the Jep function:


Sure of your attention of guidelines to solve this problem, thank you already.

Richard Morris

unread,
Sep 21, 2017, 7:18:21 PM9/21/17
to Jep Java Users
A slightly more complete example might be helpful.

From what I can tell you have an expression 
String expression ="GLOBAL (\"GLB_MES_ANO_SISTEMA\")";

Now this could be interpreted in two ways. If GLOBAL has been defined as a function using

jep.addFunction("GLOBAL",  .... );

it would be treated as a function call.

However, if the function has not been defined it will treat it as an implicit multiplication basically

"GLOBAL * "GLB_MES_ANO_SISTEMA\""

the error messages seem to indicate this is whats happened. The error has occurred in the multiplication routine.

To help debugging it might help to include the output of 

jep.getunctionTable().toString()
jep.getVariableTable().toString()

The code where Jep ins initialised would also help.

Hope that's of some help

Richard
Reply all
Reply to author
Forward
0 new messages