You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eric Martin <er...@ericmmartin.com> on 2008/02/27 20:53:46 UTC
OgnlValueStack.logLookupFailure
I'm stuck with this error and have no idea what the problem is...
In my action class, I'm returning a String property called ruleType. I've
verified that it has a value of "A".
In my jsp, I have:
<s:if test="ruleType == 'A'">
<%@include file="arithmeticDetail.jsp" %>
</s:if>
For some reason, that s:if test statement is throwing:
WARN - OgnlValueStack.logLookupFailure(269) | Caught an exception while
evaluating expression 'ruleType == 'A'' against value stack
java.lang.NumberFormatException: For input string: "A"
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
at java.lang.Double.parseDouble(Unknown Source)
at ognl.OgnlOps.doubleValue(OgnlOps.java:214)
at ognl.OgnlOps.compareWithConversion(OgnlOps.java:99)
at ognl.OgnlOps.isEqual(OgnlOps.java:142)
at ognl.OgnlOps.equal(OgnlOps.java:533)
at ognl.ASTEq.getValueBody(ASTEq.java:51)
at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
at ognl.SimpleNode.getValue(SimpleNode.java:210)
at ognl.Ognl.getValue(Ognl.java:333)
at com.opensymphony.xwork2.util.OgnlUtil.getValue(OgnlUtil.java:194)
at
com.opensymphony.xwork2.util.OgnlValueStack.findValue(OgnlValueStack.java:238)
at org.apache.struts2.components.Component.findValue(Component.java:322)
at org.apache.struts2.components.If.start(If.java:85)
at
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:54)
at
org.apache.jsp.WEB_002dINF.jsp.transformRule.saveRule_jsp._jspx_meth_s_005fif_005f1(saveRule_jsp.java:561)
at
org.apache.jsp.WEB_002dINF.jsp.transformRule.saveRule_jsp._jspService(saveRule_jsp.java:158)
...
Any ideas?
--
View this message in context: http://www.nabble.com/OgnlValueStack.logLookupFailure-tp15721571p15721571.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [struts] OgnlValueStack.logLookupFailure
Posted by Eric Martin <er...@ericmmartin.com>.
DNewfield wrote:
>
> Eric Martin wrote:
>> So, it looks like struts converts it to a Char if it's a single-character
>> and a string if it's multi-character?
>
> Yes, but it's OGNL that does that, not Struts.
>
> http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/basicExpressions.html#constants
>
> -Dale
>
Ahhh...thanks for the clarification and link!
--
View this message in context: http://www.nabble.com/OgnlValueStack.logLookupFailure-tp15721571p15723729.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [struts] OgnlValueStack.logLookupFailure
Posted by Dale Newfield <Da...@Newfield.org>.
Eric Martin wrote:
> So, it looks like struts converts it to a Char if it's a single-character
> and a string if it's multi-character?
Yes, but it's OGNL that does that, not Struts.
http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/basicExpressions.html#constants
-Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: OgnlValueStack.logLookupFailure
Posted by Eric Martin <er...@ericmmartin.com>.
Thanks Dave, that seemed to do the trick. I have other places where I use the
same notation, but not with a single-character.
So, it looks like struts converts it to a Char if it's a single-character
and a string if it's multi-character?
newton.dave wrote:
>
> IIRC a single-character in single quotes will evaluate to a character, not
> a
> string. Not entirely sure I get the exception without looking at the
> source.
>
>> <s:if test='ruleType == "A"'>
>
> should work, though (switched punctuation).
>
> Dave
>
> --- Eric Martin <er...@ericmmartin.com> wrote:
>
>>
>> I'm stuck with this error and have no idea what the problem is...
>>
>> In my action class, I'm returning a String property called ruleType. I've
>> verified that it has a value of "A".
>>
>> In my jsp, I have:
>> <s:if test="ruleType == 'A'">
>> <%@include file="arithmeticDetail.jsp" %>
>> </s:if>
>>
>> For some reason, that s:if test statement is throwing:
>> WARN - OgnlValueStack.logLookupFailure(269) | Caught an exception while
>> evaluating expression 'ruleType == 'A'' against value stack
>> java.lang.NumberFormatException: For input string: "A"
>> at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
>> at java.lang.Double.parseDouble(Unknown Source)
>> at ognl.OgnlOps.doubleValue(OgnlOps.java:214)
>> at ognl.OgnlOps.compareWithConversion(OgnlOps.java:99)
>> at ognl.OgnlOps.isEqual(OgnlOps.java:142)
>> at ognl.OgnlOps.equal(OgnlOps.java:533)
>> at ognl.ASTEq.getValueBody(ASTEq.java:51)
>> at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
>> at ognl.SimpleNode.getValue(SimpleNode.java:210)
>> at ognl.Ognl.getValue(Ognl.java:333)
>> at com.opensymphony.xwork2.util.OgnlUtil.getValue(OgnlUtil.java:194)
>> at
>>
> com.opensymphony.xwork2.util.OgnlValueStack.findValue(OgnlValueStack.java:238)
>> at org.apache.struts2.components.Component.findValue(Component.java:322)
>> at org.apache.struts2.components.If.start(If.java:85)
>> at
>>
> org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:54)
>> at
>>
> org.apache.jsp.WEB_002dINF.jsp.transformRule.saveRule_jsp._jspx_meth_s_005fif_005f1(saveRule_jsp.java:561)
>> at
>>
> org.apache.jsp.WEB_002dINF.jsp.transformRule.saveRule_jsp._jspService(saveRule_jsp.java:158)
>> ...
>>
>> Any ideas?
>> --
>> View this message in context:
>>
> http://www.nabble.com/OgnlValueStack.logLookupFailure-tp15721571p15721571.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/OgnlValueStack.logLookupFailure-tp15721571p15722468.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: OgnlValueStack.logLookupFailure
Posted by Dave Newton <ne...@yahoo.com>.
IIRC a single-character in single quotes will evaluate to a character, not a
string. Not entirely sure I get the exception without looking at the source.
> <s:if test='ruleType == "A"'>
should work, though (switched punctuation).
Dave
--- Eric Martin <er...@ericmmartin.com> wrote:
>
> I'm stuck with this error and have no idea what the problem is...
>
> In my action class, I'm returning a String property called ruleType. I've
> verified that it has a value of "A".
>
> In my jsp, I have:
> <s:if test="ruleType == 'A'">
> <%@include file="arithmeticDetail.jsp" %>
> </s:if>
>
> For some reason, that s:if test statement is throwing:
> WARN - OgnlValueStack.logLookupFailure(269) | Caught an exception while
> evaluating expression 'ruleType == 'A'' against value stack
> java.lang.NumberFormatException: For input string: "A"
> at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
> at java.lang.Double.parseDouble(Unknown Source)
> at ognl.OgnlOps.doubleValue(OgnlOps.java:214)
> at ognl.OgnlOps.compareWithConversion(OgnlOps.java:99)
> at ognl.OgnlOps.isEqual(OgnlOps.java:142)
> at ognl.OgnlOps.equal(OgnlOps.java:533)
> at ognl.ASTEq.getValueBody(ASTEq.java:51)
> at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:170)
> at ognl.SimpleNode.getValue(SimpleNode.java:210)
> at ognl.Ognl.getValue(Ognl.java:333)
> at com.opensymphony.xwork2.util.OgnlUtil.getValue(OgnlUtil.java:194)
> at
>
com.opensymphony.xwork2.util.OgnlValueStack.findValue(OgnlValueStack.java:238)
> at org.apache.struts2.components.Component.findValue(Component.java:322)
> at org.apache.struts2.components.If.start(If.java:85)
> at
>
org.apache.struts2.views.jsp.ComponentTagSupport.doStartTag(ComponentTagSupport.java:54)
> at
>
org.apache.jsp.WEB_002dINF.jsp.transformRule.saveRule_jsp._jspx_meth_s_005fif_005f1(saveRule_jsp.java:561)
> at
>
org.apache.jsp.WEB_002dINF.jsp.transformRule.saveRule_jsp._jspService(saveRule_jsp.java:158)
> ...
>
> Any ideas?
> --
> View this message in context:
>
http://www.nabble.com/OgnlValueStack.logLookupFailure-tp15721571p15721571.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org