[jira] Created: (JEXL-42) NullPointerException evaluating an expression

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[jira] Created: (JEXL-42) NullPointerException evaluating an expression

Gary D. Gregory (Jira)
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.

Reply | Threaded
Open this post in threaded view
|

[jira] Commented: (JEXL-42) NullPointerException evaluating an expression

Gary D. Gregory (Jira)

    [ https://issues.apache.org/jira/browse/JEXL-42?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732564#action_12732564 ]

Henri Biestro commented on JEXL-42:
-----------------------------------

Undefined variable handling & detection fixed in 2.0.

> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Resolved: (JEXL-42) NullPointerException evaluating an expression

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/JEXL-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rahul Akolkar resolved JEXL-42.
-------------------------------

    Resolution: Fixed

This should be fixed in the 2.0 branch in SVN. Please try it out as mentioned in the comment above (by building the branch) and if further work is needed, reopen this issue with a complete JUnit test that fails.


> 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
>             Fix For: 2.0
>
>
> 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.

Reply | Threaded
Open this post in threaded view
|

[jira] Updated: (JEXL-42) NullPointerException evaluating an expression

Gary D. Gregory (Jira)
In reply to this post by Gary D. Gregory (Jira)

     [ https://issues.apache.org/jira/browse/JEXL-42?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rahul Akolkar updated JEXL-42:
------------------------------

    Fix Version/s: 2.0

Setting fix version to v2.0.


> 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
>             Fix For: 2.0
>
>
> 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.