当前位置:   article > 正文

异常评估OGNL表达式-原标题:Exception evaluating OGNL expression

exception evaluating ognl expression

接着来

原文地址:http://www.javabeat.net/org-thymeleaf-exceptions-templateprocessingexception-exception-evaluating-ognl-expression/

下面是主题:

org.thymeleaf.exceptions.TemplateProcessingException:异常评估OGNL表达式



When you work with Thymeleaf application, you would have encountered the TemplateProcessingException exceptions. The problem is the use of default context variables. It could be because of

当我们使用Thymeleaf 应用的时候,你可能遇到过不少次TemplateProcessingException 异常。其问题在于默认的上下文变量。这可能有以下两种原因:

    1. 错误的context变量名称

    2. 变量的属性写错了

举个例子:

  1. org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating OGNL expression: "#httpSession.sessionValue" (thymeleaf:11)
  2. at org.thymeleaf.standard.expression.OgnlVariableExpressionEvaluator.evaluate(OgnlVariableExpressionEvaluator.java:126)
  3. at org.thymeleaf.standard.expression.VariableExpression.executeVariable(VariableExpression.java:149)
  4. at org.thymeleaf.standard.expression.SimpleExpression.executeSimple(SimpleExpression.java:59)
  5. at org.thymeleaf.standard.expression.Expression.execute(Expression.java:103)
  6. at org.thymeleaf.standard.expression.Expression.execute(Expression.java:133)
  7. at org.thymeleaf.standard.expression.Expression.execute(Expression.java:120)
  8. at org.thymeleaf.standard.processor.attr.AbstractStandardTextChildModifierAttrProcessor.getText(AbstractStandardTextChildModifierAttrProcessor.java:68)
  9. at org.thymeleaf.processor.attr.AbstractTextChildModifierAttrProcessor.getModifiedChildren(AbstractTextChildModifierAttrProcessor.java:59)
  10. at org.thymeleaf.processor.attr.AbstractChildrenModifierAttrProcessor.processAttribute(AbstractChildrenModifierAttrProcessor.java:58)
  11. at org.thymeleaf.processor.attr.AbstractAttrProcessor.doProcess(AbstractAttrProcessor.java:87)
  12. at org.thymeleaf.processor.AbstractProcessor.process(AbstractProcessor.java:212)
  13. at org.thymeleaf.dom.Node.applyNextProcessor(Node.java:973)
  14. at org.thymeleaf.dom.Node.processNode(Node.java:928)
  15. at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
  16. at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
  17. at org.thymeleaf.dom.Node.processNode(Node.java:947)
  18. at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
  19. at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
  20. at org.thymeleaf.dom.Node.processNode(Node.java:947)
  21. at org.thymeleaf.dom.NestableNode.computeNextChild(NestableNode.java:672)
  22. at org.thymeleaf.dom.NestableNode.doAdditionalProcess(NestableNode.java:655)
  23. Caused by: ognl.NoSuchPropertyException: org.apache.catalina.session.StandardSessionFacade.sessionValue
  24. at ognl.ObjectPropertyAccessor.getProperty(ObjectPropertyAccessor.java:151)
  25. at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2334)
  26. at ognl.ASTProperty.getValueBody(ASTProperty.java:114)
  27. at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
  28. at ognl.SimpleNode.getValue(SimpleNode.java:258)
  29. at ognl.ASTChain.getValueBody(ASTChain.java:141)
  30. at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)
  31. at ognl.SimpleNode.getValue(SimpleNode.java:258)
  32. at ognl.Ognl.getValue(Ognl.java:494)
  33. at ognl.Ognl.getValue(Ognl.java:458)
  34. at org.thymeleaf.standard.expression.OgnlVariableExpressionEvaluator.evaluate(OgnlVariableExpressionEvaluator.java:114)


声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/45455
推荐阅读
  

闽ICP备14008679号