为了账号安全,请及时绑定邮箱和手机立即绑定

.net中VM模板引擎使用报错 Encountered "<EOF>" 求解,在线等

.net中VM模板引擎使用报错 Encountered "<EOF>" 求解,在线等

烙印99 2018-12-06 15:23:33
异常详细信息: NVelocity.Runtime.Parser.ParseException: Encountered "<EOF>" at line 21, column 2.Was expecting one of:   "(" ...   <RPAREN> ...   <ESCAPE_DIRECTIVE> ...   <SET_DIRECTIVE> ...   "\\\\" ...   "\\" ...   <TEXT> ...   <SINGLE_LINE_COMMENT> ...   "*#" ...   "*#" ...   <STRING_LITERAL> ...   <END> ...   "if" ...   "stop" ...   <NUMBER_LITERAL> ...   <WORD> ...   <IDENTIFIER> ...   <DOT> ...   "{" ...   "}" ...堆栈跟踪: [ParseException: Encountered "<EOF>" at line 21, column 2.Was expecting one of:    "(" ...    <RPAREN> ...    <ESCAPE_DIRECTIVE> ...    <SET_DIRECTIVE> ...    "\\\\" ...    "\\" ...    <TEXT> ...    <SINGLE_LINE_COMMENT> ...    "*#" ...    "*#" ...    <STRING_LITERAL> ...    <END> ...    "if" ...    "stop" ...    <NUMBER_LITERAL> ...    <WORD> ...    <IDENTIFIER> ...    <DOT> ...    "{" ...    "}" ...    ]   NVelocity.Runtime.Parser.Parser.Parse(TextReader reader, String templateName) +257   NVelocity.Runtime.RuntimeInstance.Parse(TextReader reader, String templateName, Boolean dumpNamespace) +321   NVelocity.Runtime.RuntimeInstance.Parse(TextReader reader, String templateName) +71   NVelocity.Template.Process() +249[ParseErrorException: Encountered "<EOF>" at line 21, column 2.Was expecting one of:    "(" ...    <RPAREN> ...    <ESCAPE_DIRECTIVE> ...    <SET_DIRECTIVE> ...    "\\\\" ...    "\\" ...    <TEXT> ...    <SINGLE_LINE_COMMENT> ...    "*#" ...    "*#" ...    <STRING_LITERAL> ...    <END> ...    "if" ...    "stop" ...    <NUMBER_LITERAL> ...    <WORD> ...    <IDENTIFIER> ...    <DOT> ...    "{" ...    "}" ...    ]   NVelocity.Template.Process() +573   NVelocity.Runtime.Resource.ResourceManagerImpl.LoadResource(String resourceName, ResourceType resourceType, String encoding) +273   NVelocity.Runtime.Resource.ResourceManagerImpl.GetResource(String resourceName, ResourceType resourceType, String encoding) +414   NVelocity.Runtime.RuntimeInstance.GetTemplate(String name, String encoding) +81   NVelocity.Runtime.RuntimeInstance.GetTemplate(String name) +104   NVelocity.App.VelocityEngine.GetTemplate(String name) +71   HZ.PortalSystem.WebFile.StaticPage.SpecialSectionVM.Center1.TemplateProduct(List`1 infolist) in F:\Emed Project\源代码\门户网站\HZ.PortalSystem.WebFile\StaticPage\SpecialSectionVM\Center1.cs:74   HZ.PortalSystem.WebFile.AdminManage.InformationManage.SpecializedTopicsList.OperateCheckStatus(Int32 status) in F:\Emed Project\源代码\门户网站\HZ.PortalSystem.WebFile\AdminManage\InformationManage\Special\SpecializedTopicsList.aspx.cs:189   HZ.PortalSystem.WebFile.AdminManage.InformationManage.SpecializedTopicsList.btnCheckOK_Click(Object sender, EventArgs e) in F:\Emed Project\源代码\门户网站\HZ.PortalSystem.WebFile\AdminManage\InformationManage\Special\SpecializedTopicsList.aspx.cs:149   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
查看完整描述

2 回答

?
墨色风雨

TA贡献1853条经验 获得超6个赞

肯定是哪里语法错误了 把你的VM文件贴出来看看吧

查看完整回答
反对 回复 2019-01-21
?
四季花海

TA贡献1811条经验 获得超5个赞

在吗 你这个问题解决了没?

查看完整回答
反对 回复 2019-01-21
  • 2 回答
  • 0 关注
  • 718 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信