FreeMarker template error (DEBUG mode; use RETHROW in production!): Java method "cn.com.harbor.wcb.publish.service.CMSTemplateEngine.documents(String)" threw an exception when invoked on cn.com.harbor.wcb.publish.service.CMSTemplateEngine object "cn.com.harbor.wcb.publish.service.CMSTemplateEngine@2ad4570d"; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #list cms.documents("channel=信息公开_行政处... [in template "index-201609.html" at line 526, column 12] ---- Java stack trace (for programmers): ---- freemarker.core._TemplateModelException: [... Exception message was already printed; see it above ...] at freemarker.ext.beans._MethodUtil.newInvocationTemplateModelException(_MethodUtil.java:311) at freemarker.ext.beans._MethodUtil.newInvocationTemplateModelException(_MethodUtil.java:275) at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:80) at freemarker.core.MethodCall._eval(MethodCall.java:62) at freemarker.core.Expression.eval(Expression.java:78) at freemarker.core.IteratorBlock.accept(IteratorBlock.java:58) at freemarker.core.Environment.visit(Environment.java:312) at freemarker.core.MixedContent.accept(MixedContent.java:62) at freemarker.core.Environment.visit(Environment.java:312) at freemarker.core.Environment.process(Environment.java:290) at freemarker.template.Template.process(Template.java:312) at cn.com.harbor.wcb.publish.service.HTMLGenerator.generateHTML(HTMLGenerator.java:59) at cn.com.harbor.wcb.publish.service.ChannelIndexPublishThread.publishQuoteChannel(ChannelIndexPublishThread.java:155) at cn.com.harbor.wcb.publish.service.ChannelIndexPublishThread.run(ChannelIndexPublishThread.java:53) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.substring(String.java:1955) at cn.com.harbor.wcb.publish.service.CMSTemplateEngine.documents(CMSTemplateEngine.java:216) at sun.reflect.GeneratedMethodAccessor190.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:1458) at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:71) ... 16 more