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 ... 
随机推荐
- html 打印相关操作与实现
			2020-02-19 | chrome 79.0.3945.130 测试无问题 未做兼容测试 原理为调用 window.print() 方法,但是该方法只能对当前页面全部打印,所以有了以下方案来解决局 ... 
- Python - 运行流程图, call graph, 调用图
			解决方案 pycallgraph(感觉直接用pycallgraph grahviz命令生成的图并不是我想要的) 如何去阅读并学习一些优秀的开源框架的源码? - mailto1587的回答 - 知乎 h ... 
- IIS反向代理配置教程(最终完整版本)
			IIS代理配置教程 插件下载:https://download.csdn.net/download/song_yan_/11996489 一.安装反向代理插件 1.rewrite插件安装 (1) 双击 ... 
- mysql成功的远程连接
			1.在虚拟机上的window7中安装mysql,版本mysql-5.7.27-win32,可以是解压版或者是安装版的, MySQL安装文件分为两种,一种是msi格式的,一种是zip格式的.如果是msi ... 
- pycharm如何关闭虚拟环境(即取消venv命令行)
			venv命令行 是虚拟环境特有, 为什么要使用虚拟环境: 在实际项目开发中,我们通常会根据自己的需求去下载各种相应的框架库,如Scrapy.Beautiful Soup等,但是可能每个项目使用的框架库 ... 
- NAT穿透的方式
			目前主要的NAT类型有如下几种: 1)Full-cone NAT, also known as one-to-one NAT 一旦一个内网地址 (iAddr:iPort) 被映射到一个外部地址 (eA ... 
- Net Core解决ZipFile解压中文出现乱码
			一.在main方法中添加 Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); 二.解压添加 //sourceArchiveFi ... 
- [数据库] MariaDB安装及使用
			一.安装MariaDB 1.使用官方源安装marisdb 如果使用阿里云的源,目前的版本号为5.5.64.如果想安装最新的10.x版本,则需要使用MariaDB的官方源. 1)配置官方源: 在/etc ... 
- Python web在IIS上发布方法和原理
			Python web应用想要发布使用iis发布有两种方式,这篇文章就为大家介绍一下这两种方式的具体实现: 1.配置HttpPlatform程序 HttpPlatform 模块将套接字连接直接传递到独立 ... 
- 洛谷P1164小A点菜(01背包)
			题目背景 uim神犇拿到了uoi的ra(镭牌)后,立刻拉着基友小A到了一家……餐馆,很低端的那种. uim指着墙上的价目表(太低级了没有菜单),说:“随便点”. 题目描述 不过uim由于买了一些辅(e ... 
