freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]
FreeMarker template error:
The following has evaluated to null or missing:
==> product [in template "product.html" at line 751, column 43]
FreeMarker模板误差:
以下已评估为null或丢失:
=产品“模板”产品HTML“在第751行,第43栏]
----------------------------
意思是有个值为null,就是不存在,
Tip: If the failing expression is known to be legally null/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??
一般出现这种异常的原因为:如果对象为空,则freemarker就会抛出这个异常。
其实解决很简单,在用对象之前先判空,不空在进行属性的获取操作即可
freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...]的更多相关文章
- freemarker.core.InvalidReferenceException: Expression stackObject.value.get(propertyName).toString() is undefined
很奇怪的报错, 在实体中添加 toString方法后, 想在前台列表中使用 <s:debug标签调试, 发现报错如下: freemarker.core.InvalidReferenceExcep ...
- freemarker.core.InvalidReferenceException
1.错误描述 freemarker.core.InvalidReferenceException:on line 68,column 18 in ftl/inc/incPro.ftl p.mainSe ...
- 异常-----freemarker.core.InvalidReferenceException问题解决
案例一 1.1.错误描述 五月 28, 2014 9:56:48 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template ...
- 解决 HTTP Status 500 - Unable to show problem report: freemarker.core.InvalidReferenceException:
HTTP Status 500 - Unable to show problem report: freemarker.core.InvalidReferenceException: The foll ...
- CAS (10) —— JBoss EAP 6.4下部署CAS时出现错误exception.message=Error decoding flow execution的解决办法
CAS (10) -- JBoss EAP 6.4下部署CAS时出现错误exception.message=Error decoding flow execution的解决办法 jboss版本: jb ...
- freemarker.core.ParseException:Unexpected end of file reached
1.错误原因 freemarker.core.ParseException:Unexpected end of file reached 2.错误原因 由于在宏定义中,运用组件时没有关闭标签,导致出错 ...
- 异常-----freemarker.template.TemplateException: Expected collection or sequence. datas evaluated instead to freemarker.core.HashLiteral$SequenceHash on line 7, column 18 in inc/select.ftl.
1.错误描述 六月 26, 2014 11:26:27 下午 freemarker.log.JDK14LoggerFactory$JDK14Logger error 严重: Template proc ...
- 异常-----freemarker.core.ParseException: Encountered
1.错误描述 freemarker.core.ParseException: Encountered " " at line 14, column 12 in myself.ftl ...
- 异常-----freemarker.core.ParseException: Unexpected end of file reached
freemarker自定义标签 1.错误描述 freemarker.core.ParseException: Unexpected end of file reached. at freemarker ...
随机推荐
- PyCharm安装及汉化设置为中文(附汉化包)
下载:https://www.jetbrains.com/pycharm/download/#section=windows 下载社区版免费 双击运行安装程序 Next 选择安装路径安装 创建桌面快捷 ...
- CSS选择器效率问题
今天学习了CSS各类选择器,对其效率问题有些疑问,故总结了一些学习笔记 有很多人都忘记了,或在简单的说没有意识到,CSS在我们手中,既能很高效,也可以变得很低能.这很容易被忘记,尤其是当你意识到你会的 ...
- Java 中 CAS
一.CAS 概念 CAS ,全称 Compare And Swap(比较与交换),解决多线程并行情况下使用锁造成性能损耗的一种机制. 实现思想 CAS(V.A.B) ,V为内存地址,A为预期原值,B ...
- 页面布局 Wrap 组件 和 RaisedButton按钮
一.RaisedButton 定义一个按钮 Flutter 中通过 RaisedButton 定义一个按钮.RaisedButton 里面有很多的参数,只讲简单的进行使用. return Raised ...
- GridView 列表组件 以及动态 GridView
1.通过 GridView.builder 实现网格布局 Widget getList(context, index) { return Container( margin: EdgeInse ...
- redis (一) --- 基本使用
概述 redis是基于key-value 我们所说的数据类型实际是 key-value 中的 value .文章主要介绍的是redis 几个重要的数据类型的使用. 简单使用 //keys patter ...
- 多个python版本共存时,查看pip命令属于哪个python的命令
使用命令: pip -V 或 pip3 -V
- Django 单元测试笔记
引言 关于单元测试的基本知识这里不再讲述,简单一句话:单元测试是用一段代码去测试另一段代码.最常用的框架是unittest,这是python的单元测试框架,而django单元测试框架test.Test ...
- oracle学习笔记(十四) 数据库对象 索引 视图 序列 同义词
数据库对象 用户模式:指数据库用户所创建和存储数据对象的统称.在访问其它用户模式的数据库对象时需加上用户模式. 如:scott.emp, scott.dept等. 数据库对象包括:表.视图.索引.序列 ...
- 吴裕雄 python 神经网络——TensorFlow 花瓣分类与迁移学习(4)
# -*- coding: utf-8 -*- import glob import os.path import numpy as np import tensorflow as tf from t ...