grails生成war error java.lang.ArrayIndexOutOfBoundsException:1

时间:2013-12-02 02:58:59

标签: debugging grails war

我尝试使用命令生成grails中的war文件:

grails war

但显示此错误,这是第一次出现此错误,之前正常生成战争。

我知道如果索引在arraylist中不存在,那么数组出界将会显示,但我不知道哪个数组?因为我的应用程序中的所有进程都正常工作。

是的,有人可以帮我吗? :(

java.lang.ArrayIndexOutOfBoundsException: 1
    at org.codehaus.groovy.classgen.asm.InvocationWriter.loadArguments(InvocationWriter.java:192)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.writeDirectMethodCall(InvocationWriter.java:130)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:229)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:76)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.makeInvokeMethodCall(InvocationWriter.java:60)
    at org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeMethod(InvocationWriter.java:342)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethodCallExpression(AsmClassGenerator.java:648)
    at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:67)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeExpressionStatement(StatementWriter.java:604)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeExpressionStatement(OptimizingStatementWriter.java:354)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitExpressionStatement(AsmClassGenerator.java:509)
    at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
    at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:81)
    at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:155)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:455)
    at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:319)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:276)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:396)
    at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1059)
    at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
    at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:180)
    at org.codehaus.groovy.control.CompilationUnit$14.call(CompilationUnit.java:786)
    at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1027)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:564)
    at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:542)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:519)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:498)
    at org.codehaus.groovy.control.CompilationUnit$compile.call(Unknown Source)
    at org.codehaus.groovy.grails.web.pages.GroovyPageCompiler$_compileGSP_closure1.doCall(GroovyPageCompiler.groovy:144)
    at sun.reflect.GeneratedMethodAccessor203.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1082)
    at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1106)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906)
    at groovy.lang.Closure.call(Closure.java:412)
    at groovy.lang.Closure.call(Closure.java:425)
    at org.codehaus.groovy.runtime.IOGroovyMethods.withStream(IOGroovyMethods.java:1160)
    at org.codehaus.groovy.runtime.ResourceGroovyMethods.withInputStream(ResourceGroovyMethods.java:1523)

1 个答案:

答案 0 :(得分:0)

我有同样的错误。

  1. 我卸载了我正在使用的grails版本(我使用sdkman)和
  2. 手动删除我的.grails文件夹。
  3. 重新安装grails版本
  4. 运行cleanAll

grails战争再次为我工作。