转载自:http://blog.youkuaiyun.com/yyzhq/article/details/8235658
freemarker.template.TemplateModelException: Method public java.lang.String org.apache.commons.lang.exception.NestableRuntimeException.getMessage(int) threw an exception when invoked on net.sf.json.JSONException: Object is null
出现这个错误的原因是net.sf.json.JSONArray或JSONObject转换时,对象内包含另一个对象,而该被包含的对象为NULL,所以抛出异常。
本文探讨了Freemarker模板引擎在处理net.sf.json.JSONArray转换时遇到的问题,特别是当对象内部包含空对象时,会引发TemplateModelException异常。文章深入分析了异常产生的原因,并提供了相应的解决思路。
2626

被折叠的 条评论
为什么被折叠?



