FreeMarker / S2SH 各种报错解决方案
1. org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of com.fcms.core.entity.NubbMovie.isMovie
持久化对象-映射文件-数据库表中对应字段数据类型不符
2. freemarker.core.ParseException: Encountered "" at line 187, column 49 in WEB-INF/user_base/face_com_www/tuike/movie/actor.html. Was expecting one of: ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... "${" ... "#{" ...
标签错误,可能是由于</#list>写成了<#/list> 不合法造成无法解析而报错
3. freemarker.core.ParseException: Unexpected end of file reached. Unclosed list directive.
Unclosed list---<#list>未含结束标签
4. org.hibernate.PropertyAccessException: IllegalArgumentException occurred while calling setter of
对应bean中set方法数据类型和hibernate配置文件中定义的类型是否一致。
5.org.hibernate.exception.SQLGrammarException: could not initialize a collection
检查以下内容是否出错:
inverse="true" 是否在一对多或多对多中设定一方去维持两者之间的关系; 或者用注解的方式配置则是:
//One
@OneToMany(fetch = FetchType.LAZY, mappedBy = "movie_id", cascade = {
CascadeType.PERSIST, CascadeType.REFRESH }, targetEntity = Users.class)
@Column(name = "movie_id", nullable = false, updatable = false)
//Many
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "movie", insertable = true, updatable = true, nullable = false)
cascade="delete" 级联删除
<key>
<column name="movie_id" /> 此处应填上另一方表的字段名!
</key>
6. freemarker 中在一循环列表中,判断某条记录是否包含指定的字符串。
<#list al as l>
<#if l.info?indexof("xxx") != -1>
${l.name!}
</#if>
</#list>
本以为很简单的一个逻辑判断语句,但是在实际操作中,指定的字符串“xxx”,不是已知的,而是一个变量,这里我就用str表示
那么l.info?indexof(str) != -1 这条语句将会报args参数错误! 原因在于传递进来的str类型不是string
在此i.info?indexof("str") != -1 不会报错,但是很明显,这样的话str变量将不会被解析。
为了达到逻辑语句成立,我只能在l.info那做文章---将每个元素用 , 隔开,然后将indexof()判断的字符串改变,得到indexof("," + str + ",");
此时有人会提出,我可以直接写成这样就行了啊----indexof("\"" + str +"\""); 答案是否定的
7. No row with the given identifier exists: org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.fcms.cms.entity.CmsChannel#1679]
FreeMarker / S2SH 各种报错解决方案的更多相关文章
- RabbitMQ>Erlang machine stopped instantly (distribution name conflict?). The service is not restarted as OnFail is set to ignore.-报错解决方案 原来是NNND。。。
>Erlang machine stopped instantly (distribution name conflict?). The service is not restarted as ...
- Updates were rejected because the remote contains work that you do(git报错解决方案)
Updates were rejected because the remote contains work that you do(git报错解决方案) 今天向GitHub远程仓库提交本地项目文件时 ...
- JMeter 报告监听器导入.jtl结果文件报错解决方案
JMeter 报告监听器导入.jtl结果文件报错解决方案 by:授客 QQ:1033553122 1. 问题描述 把jmeter压测时生成的 .jtl结果文件导入监听器报告中,弹出如下错误提示 ...
- Python3.x:import urllib2报错解决方案
Python:import urllib2报错解决方案 python2和3有些不一样: python2:输出为print 'hello world' python3:输出为print('hello w ...
- php 500报错解决方案
php 500报错解决方案 1 先看nginx error.log 指定的错误日记文件路径 找到这个日记文件看 里面信息 2 再看 php-fpm.conf 里面指定的PHP错误日记的路径 具体如下& ...
- mysql主从复制报错解决方案
mysql主从复制报错解决方案 我先制造个错误 在slave删除个info3字段 然后在master 在info3插入数据 报错如下<pre> Last_SQL_Errno: 1054 L ...
- 转:CentOS上安装LAMP之第三步:MySQL环境及安装过程报错解决方案(纯净系统环境)
这是AMP运行环境中最后配置的环境: 惯例传送门: 1.编译安装MySQL cd /home/zhangatle/tar tar zxvf mysql-.tar.gz cd mysql- cmake ...
- Eclipse开发Android项目报错解决方案详细教程,最新版一篇就够了!
本文记录刚接触Android开发搭建环境后新建工程各种可能的报错,并亲身经历漫长的解决过程(╥╯^╰╥),寻找各种偏方,避免大家采坑,希望能帮助到大家. 报错信息 出错一:The import and ...
- 【笔记】springCloud--Alibaba--nacos介绍----启动报错解决方案
Nacos介绍 · 欢迎来到 Nacos 的世界! · Nacos 致力于帮助您发现.配置和管理微服务.Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现.服务配置.服务元数据及流量管 ...
随机推荐
- 深度增强学习--Policy Gradient
前面都是value based的方法,现在看一种直接预测动作的方法 Policy Based Policy Gradient 一个介绍 karpathy的博客 一个推导 下面的例子实现的REINFOR ...
- SQL Server 高性能写入的一些经验总结
转自:http://www.jb51.net/article/31162.htm 本篇博文将针对一些常用的数据库性能调休方法进行介绍,而且,为了编写高效的SQL代码,我们需要掌握一些基本代码优化的技巧 ...
- Extjs grid 遍历store
var projectMemberGrid = Ext.getCmp("projectMemberGrid"); var selFuns = []; projectMemberGr ...
- dubbo笔记
使用Maven打包依赖项,启动时从本地jar中读取dubbo.xsd 最近项目用到dubbo,打包启动时报错 Failed to read schema document from http://co ...
- react-navigation 页面跳转 及 传参
1.配置路由 export const AppNavigator = createStackNavigator ( { Guide: { // 引导页 screen: GuidePage }, Lau ...
- iOS原生推送(APNS)进阶iOS10推送图片、视频、音乐
代码地址如下:http://www.demodashi.com/demo/13208.html 前言 我们首先要在AppDelegate里面进行iOS的适配,可以参考这篇文章 iOS原生推送(APNS ...
- 如何在谷歌浏览器中查看Axure做的原型HTML
Axure RP Pro可谓是非常方便.好用的一款软件,因为它不仅能绘制出详细的产品构思,也能生成浏览器格式的产品原型.但如果想把原型拿给客户查看,需要看产品画的原型图时,但是打不开的话就悲剧了.经常 ...
- node-webkit 开发环境搭建
node-webkit支持的操作系统类型: Linunx:32bit / 64bit Windows: win32 Mac:32bit,10.7+ 开发环境 1,根据自己的操作系统下载响应的nw二进制 ...
- @using (Html.BeginForm()) @using (Ajax.BeginForm(new AjaxOptions() { })) 区别
@using (Html.BeginForm()) 返回页面 也是页面 都是返回页面 只是 多了一个 data-ajax="true"
- sql DATEPART() MONTH() convert() cast() dateadd() DATEDIFF() with(nolock)
DATEPART() 函数用于返回日期/时间的单独部分,比如年.月.日.小时.分钟等等. 语法 DATEPART(datepart,date) date 参数是合法的日期表达式.datepart 参数 ...