主题:getTemplate报错ArrayIndexOutOfBoundsException

Slower 2019年01月04日 136

加载模板的时候看,报如下错误时咋回事呢?


java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.ArrayList.elementData(ArrayList.java:418)
	at java.util.ArrayList.get(ArrayList.java:431)
	at org.beetl.core.AntlrProgramBuilder.parseNativeCallExpression(AntlrProgramBuilder.java:1567)
	at org.beetl.core.AntlrProgramBuilder.parseExpress(AntlrProgramBuilder.java:1374)
	at org.beetl.core.AntlrProgramBuilder.parseTextOutputSt(AntlrProgramBuilder.java:1269)
	at org.beetl.core.AntlrProgramBuilder.parseStatment(AntlrProgramBuilder.java:290)
	at org.beetl.core.AntlrProgramBuilder.parseBlock(AntlrProgramBuilder.java:2086)
	at org.beetl.core.AntlrProgramBuilder.parseStatment(AntlrProgramBuilder.java:285)
	at org.beetl.core.AntlrProgramBuilder.parseIf(AntlrProgramBuilder.java:1035)
	at org.beetl.core.AntlrProgramBuilder.parseStatment(AntlrProgramBuilder.java:352)
	at org.beetl.core.AntlrProgramBuilder.build(AntlrProgramBuilder.java:237)
	at org.beetl.core.engine.DefaultTemplateEngine.createProgram(DefaultTemplateEngine.java:60)
	at org.beetl.core.GroupTemplate.loadTemplate(GroupTemplate.java:669)
	at org.beetl.core.GroupTemplate.getTemplateByLoader(GroupTemplate.java:595)
	at org.beetl.core.GroupTemplate.getTemplate(GroupTemplate.java:559)
闲大赋 2019年01月04日

不会吧,你用的哪个版本,如果是最新的,你发一下模板文件给我看看吧 ,xiandafu@126.com

初步判断是java本地调用貌似不符合规则,也就是类似下面这种语法

@com.xxx.YourClass.xxx

你看一下官网文档如何使用本地调用