Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-9015

Error:Groovyc: While compiling ...BUG! exception in phase 'class generation' in source unit ' ' JVM class can't be loaded for ...

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.6
    • Fix Version/s: None
    • Component/s: Compiler
    • Labels:
      None
    • Environment:
      jdk 8, jetbrains idea

      Description

      when I edit large groovy file in jetbrains idea,and build it.It will occur this exception. I hava to rebuild project again to solve it.

      What should I do? I am anxious to solve it.

      Details:

      //代码占位符
      Error:Groovyc: While compiling mpts-core: BUG! exception in phase 'class generation' in source unit 'G:\ideaprojects\mpts-core\src\main\groovy\command_core\ActiveUnit_Weaponry.groovy' JVM class can't be loaded for ns4.Class198$Class173
      at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveJvmClass(AsmReferenceResolver.java:86)
      at org.codehaus.groovy.ast.decompiled.DecompiledClassNode.getTypeClass(DecompiledClassNode.java:175)
      at org.codehaus.groovy.ast.ClassNode.getTypeClass(ClassNode.java:1381)
      at org.codehaus.groovy.classgen.asm.BytecodeHelper.getClassInternalName(BytecodeHelper.java:59)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitArrayExpression(AsmClassGenerator.java:1680)
      at org.codehaus.groovy.ast.expr.ArrayExpression.visit(ArrayExpression.java:86)
      at org.codehaus.groovy.classgen.asm.BinaryExpressionHelper.evaluateEqual(BinaryExpressionHelper.java:361)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitDeclarationExpression(AsmClassGenerator.java:702)
      at org.codehaus.groovy.ast.expr.DeclarationExpression.visit(DeclarationExpression.java:86)
      at org.codehaus.groovy.classgen.asm.StatementWriter.writeExpressionStatement(StatementWriter.java:628)
      at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeExpressionStatement(OptimizingStatementWriter.java:410)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitExpressionStatement(AsmClassGenerator.java:689)
      at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
      at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:93)
      at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:205)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:635)
      at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
      at org.codehaus.groovy.classgen.asm.StatementWriter.writeForInLoop(StatementWriter.java:159)
      at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeForInLoop(OptimizingStatementWriter.java:267)
      at org.codehaus.groovy.classgen.asm.StatementWriter.writeForStatement(StatementWriter.java:112)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitForLoop(AsmClassGenerator.java:639)
      at org.codehaus.groovy.ast.stmt.ForStatement.visit(ForStatement.java:47)
      at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:93)
      at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:205)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:635)
      at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
      at org.codehaus.groovy.classgen.asm.StatementWriter.writeTryCatchFinally(StatementWriter.java:340)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitTryCatchFinally(AsmClassGenerator.java:659)
      at org.codehaus.groovy.ast.stmt.TryCatchStatement.visit(TryCatchStatement.java:42)
      at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:93)
      at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:205)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:635)
      at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
      at org.codehaus.groovy.classgen.asm.StatementWriter.writeIfElse(StatementWriter.java:305)
      at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeIfElse(OptimizingStatementWriter.java:323)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitIfElse(AsmClassGenerator.java:651)
      at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:41)
      at org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:93)
      at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:205)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:635)
      at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:110)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:121)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:495)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:431)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:132)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:576)
      at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1103)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:54)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:269)
      at org.codehaus.groovy.control.CompilationUnit$18.call(CompilationUnit.java:854)
      at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1084)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:645)
      at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:623)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:600)
      at org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:62)
      at org.jetbrains.groovy.compiler.rt.DependentGroovycRunner.runGroovyc(DependentGroovycRunner.java:119)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.jetbrains.groovy.compiler.rt.GroovycRunner.intMain2(GroovycRunner.java:90)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.jetbrains.jps.incremental.groovy.InProcessGroovyc.runGroovycInThisProcess(InProcessGroovyc.java:160)
      at org.jetbrains.jps.incremental.groovy.InProcessGroovyc.lambda$runGroovyc$0(InProcessGroovyc.java:89)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.ClassNotFoundException: ns4.Class198$Class173
      at org.jetbrains.groovy.compiler.rt.ClassDependencyLoader.loadClassDependencies(ClassDependencyLoader.java:106)
      at org.jetbrains.groovy.compiler.rt.DependentGroovycRunner$6.loadClassDependencies(DependentGroovycRunner.java:508)
      at org.jetbrains.groovy.compiler.rt.ClassDependencyLoader.loadDependencies(ClassDependencyLoader.java:34)
      at org.jetbrains.groovy.compiler.rt.DependentGroovycRunner$7$1.loadClass(DependentGroovycRunner.java:528)
      at org.codehaus.groovy.ast.decompiled.AsmReferenceResolver.resolveJvmClass(AsmReferenceResolver.java:84)
      ... 71 more
      

        Attachments

          Activity

            People

            • Assignee:
              emilles Eric Milles
              Reporter:
              loveslikey sky.qin
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: