FreeMarker template error!


Method public static java.lang.String org.zhh.alizeus.common.util.TemplateUtil.getUserName(long) threw an exception
The problematic instruction:
----------
==> ${T.getUserName(userId)} escaped ${T.getUserName(userId)?default("")?html} [on line 10, column 16 in myforum/blog/index.ftl]
----------

Java backtrace for programmers:
----------
freemarker.template.TemplateModelException: Method public static java.lang.String org.zhh.alizeus.common.util.TemplateUtil.getUserName(long) threw an exception
	at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:131)
	at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
	at freemarker.core.BuiltIn$defaultBI._getAsTemplateModel(BuiltIn.java:833)
	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
	at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:86)
	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
	at freemarker.core.Expression.getStringValue(Expression.java:93)
	at freemarker.core.StringBuiltins$StringBuiltIn._getAsTemplateModel(StringBuiltins.java:71)
	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
	at freemarker.core.Expression.getStringValue(Expression.java:93)
	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
	at freemarker.core.Environment.visit(Environment.java:196)
	at freemarker.core.MixedContent.accept(MixedContent.java:92)
	at freemarker.core.Environment.visit(Environment.java:196)
	at freemarker.core.EscapeBlock.accept(EscapeBlock.java:84)
	at freemarker.core.Environment.visit(Environment.java:196)
	at freemarker.core.MixedContent.accept(MixedContent.java:92)
	at freemarker.core.Environment.visit(Environment.java:196)
	at freemarker.core.Environment.process(Environment.java:176)
	at freemarker.template.Template.process(Template.java:232)
	at com.opensymphony.webwork.views.freemarker.FreemarkerResult.doExecute(FreemarkerResult.java:153)
	at org.zhh.common.util.system.result.EafulFreemarkerResult.doExecute(EafulFreemarkerResult.java:46)
	at com.opensymphony.webwork.dispatcher.WebWorkResultSupport.execute(WebWorkResultSupport.java:143)
	at com.opensymphony.xwork.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:311)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:206)
	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at com.opensymphony.webwork.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:171)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at com.opensymphony.xwork.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:151)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at org.zhh.common.util.system.interceptor.PermissionInterceptor.doIntercept(PermissionInterceptor.java:32)
	at com.opensymphony.xwork.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at org.zhh.common.util.system.interceptor.autologin.AutoLoginInterceptor.intercept(AutoLoginInterceptor.java:91)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at org.zhh.common.util.system.interceptor.throwable.ThrowableMappingInterceptor.intercept(ThrowableMappingInterceptor.java:40)
	at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:188)
	at com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:113)
	at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225)
	at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:111)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:409)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:748)
Caused by: freemarker.template.TemplateModelException: Could not convert an instance of freemarker.ext.beans.StringModel with value [{{= userId}}] to long
	at freemarker.ext.beans.BeansWrapper.canNotConvert(BeansWrapper.java:760)
	at freemarker.ext.beans.BeansWrapper.unwrap(BeansWrapper.java:698)
	at freemarker.ext.beans.BeansWrapper.unwrap(BeansWrapper.java:489)
	at freemarker.ext.beans.BeansWrapper.unwrapArguments(BeansWrapper.java:782)
	at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:109)
	... 80 more
系统错误

系统错误

请把错误截图给客服,以帮助解决。
freemarker.template.TemplateModelException: Method public static java.lang.String org.zhh.alizeus.common.util.TemplateUtil.getUserName(long) threw an exception