commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Torras (JIRA)" <j...@apache.org>
Subject [jira] Created: (JEXL-42) NullPointerException evaluating an expression
Date Tue, 18 Dec 2007 00:58:43 GMT
NullPointerException evaluating an expression
---------------------------------------------

                 Key: JEXL-42
                 URL: https://issues.apache.org/jira/browse/JEXL-42
             Project: Commons JEXL
          Issue Type: Bug
    Affects Versions: 1.1
            Reporter: Alejandro Torras


Hi all,

Testing randomly to find a way to have nested evaluations I got an error with the following
code:

	<j:set var="ax" value="ok" />
	${ax+(bx)}

And the error:

Dec 18, 2007 1:55:52 AM org.apache.commons.jelly.expression.jexl.JexlExpression evaluate
WARNING: Caught exception evaluating: ax+(bx). Reason: java.lang.NullPointerException
java.lang.NullPointerException
        at org.apache.commons.jexl.parser.ASTAddNode.value(ASTAddNode.java:116)
        at org.apache.commons.jexl.parser.ASTExpression.value(ASTExpression.java:53)
        at org.apache.commons.jexl.parser.ASTExpressionExpression.value(ASTExpressionExpression.java:55)
        at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:79)
        at org.apache.commons.jelly.expression.jexl.JexlExpression.evaluate(JexlExpression.java:69)
        at org.apache.commons.jelly.impl.ExpressionScript.run(ExpressionScript.java:66)
        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
        at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
        at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
        at org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:45)
        at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:247)
        at org.apache.commons.jelly.util.CommandLineParser.invokeCommandLineJelly(CommandLineParser.java:130)
        at org.apache.commons.jelly.Jelly.main(Jelly.java:92)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.werken.forehead.Forehead.run(Forehead.java:551)
        at com.werken.forehead.Forehead.main(Forehead.java:581)


Obviously "bx" is not defined.

Regards,
Alejandro Torras.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message