groovy
  1. groovy
  2. GROOVY-3157

Compiler fails with java.lang.TypeNotPresentException

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.5.7
    • Fix Version/s: None
    • Component/s: Compiler
    • Labels:
      None
    • Environment:
      Ubuntu 8.10
    • Number of attachments :
      0

      Description

      After some refactoring I started to get the following exception during compilation:

      /home/yegor/caiss/caiss-stat2/with-sage/nbproject/groovy-compile-impl.xml:30: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, General error during semantic analysis: Type INode not present
      java.lang.TypeNotPresentException: Type INode not present
      at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:98)
      at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
      at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
      at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:50)
      at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:120)
      at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
      at sun.reflect.generics.repository.MethodRepository.getReturnType(MethodRepository.java:50)
      at java.lang.reflect.Method.getGenericReturnType(Method.java:231)
      at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:163)
      at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:209)
      at org.codehaus.groovy.ast.ClassNode.getDeclaredMethods(ClassNode.java:689)
      at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:701)
      at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:703)
      at org.codehaus.groovy.ast.ClassNode.hasPossibleStaticMethod(ClassNode.java:1021)
      at org.codehaus.groovy.control.StaticImportVisitor.transformMethodCallExpression(StaticImportVisitor.java:130)
      at org.codehaus.groovy.control.StaticImportVisitor.transform(StaticImportVisitor.java:67)
      at org.codehaus.groovy.control.StaticImportVisitor.transformMethodCallExpression(StaticImportVisitor.java:108)
      at org.codehaus.groovy.control.StaticImportVisitor.transform(StaticImportVisitor.java:67)
      at org.codehaus.groovy.ast.expr.BinaryExpression.transformExpression(BinaryExpression.java:53)
      at org.codehaus.groovy.control.StaticImportVisitor.transform(StaticImportVisitor.java:89)
      at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitExpressionStatement(ClassCodeExpressionTransformer.java:148)
      at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
      at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:129)
      at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:52)
      at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitIfElse(ClassCodeExpressionTransformer.java:84)
      at org.codehaus.groovy.ast.stmt.IfStatement.visit(IfStatement.java:41)
      at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:129)
      at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:52)
      at org.codehaus.groovy.ast.CodeVisitorSupport.visitTryCatchFinally(CodeVisitorSupport.java:76)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitTryCatchFinally(ClassCodeVisitorSupport.java:194)
      at org.codehaus.groovy.ast.stmt.TryCatchStatement.visit(TryCatchStatement.java:42)
      at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:129)
      at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:52)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:73)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:80)
      at org.codehaus.groovy.ast.ClassCodeExpressionTransformer.visitConstructorOrMethod(ClassCodeExpressionTransformer.java:53)
      at org.codehaus.groovy.control.StaticImportVisitor.visitConstructorOrMethod(StaticImportVisitor.java:54)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:88)
      at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:907)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:48)
      at org.codehaus.groovy.control.StaticImportVisitor.visitClass(StaticImportVisitor.java:49)
      at org.codehaus.groovy.control.CompilationUnit$6.call(CompilationUnit.java:538)
      at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:885)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:436)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:417)
      at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:685)
      at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:541)
      at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      at sun.reflect.GeneratedMethodAccessor60.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:585)
      at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
      at org.apache.tools.ant.Task.perform(Task.java:348)
      at org.apache.tools.ant.Target.execute(Target.java:357)
      at org.apache.tools.ant.Target.performTasks(Target.java:385)
      at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
      at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
      at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
      at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:277)
      at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:461)
      at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:151)
      Caused by: java.lang.ClassNotFoundException: INode
      at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1383)
      at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1324)
      at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1072)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:242)
      at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)
      ... 64 more
      1 error
      BUILD FAILED (total time: 0 seconds)

      I have the following graph of inheritance:

      abstract class Node extends Observable implements INode
      class SageNode extends Node

      If I change it to
      abstract class SageNode implements INode
      it compiles but, of course, does not help me.

      unlike http://www.nabble.com/Test-fails-td19536025.html,
      I don't see any dependency on Java version, tried Java 5, Sun Java 6 and OpenJDK 6.

        Issue Links

          Activity

          Hide
          Yegor Bryukhov added a comment -

          Here is a test case: http://caiss-stat.com/download/testcase.zip (5MB due to groovy-all jar)
          In its current form it is an NB project, let me know if it is an inconvenience.
          Steps to reproduce: download NB 6.5 RC2, from menu Tools/Plugins install "Groovy and Grails" plugin,
          open the test case project, right click and choose "Open required modules", then build it, it'll fail with "type not present" error. Somewhere on the way to a minimal test case, it stopped printing the trace for some reason. Note, it is essential to have SageNode in a separate module.

          Show
          Yegor Bryukhov added a comment - Here is a test case: http://caiss-stat.com/download/testcase.zip (5MB due to groovy-all jar) In its current form it is an NB project, let me know if it is an inconvenience. Steps to reproduce: download NB 6.5 RC2, from menu Tools/Plugins install "Groovy and Grails" plugin, open the test case project, right click and choose "Open required modules", then build it, it'll fail with "type not present" error. Somewhere on the way to a minimal test case, it stopped printing the trace for some reason. Note, it is essential to have SageNode in a separate module.
          Hide
          blackdrag blackdrag added a comment -

          Netbeans is really not very convenient... normally we try to have that without any IDE, because the IDE may influence the problem.

          anyway, from the stack I thin I can say the following:

          You have a static import and on that static import class the compiler tries to get the return type of a method. This method has the return type INode and INode is not available as class.

          This shows me, that you are not doing joint compilation, because the StaticImportVisistor is not executed for this.Whichmeans you have a mixed java/groovy set where groovy code depends on java code, that depends on groovy code in a manner that will not allow the java class to be initialized unless the depending groovy code exists as class. Well, that is exactly why we have joint compilation.

          I can only assume, that the plugin compiled Node and INode, then INode got deleted, or Node is written in Java. When then compiling SageNode from the other project, the plugin fails to see, that problem. Now I don't like to say that this is the fault of the Netbens Groovy plugin guys and that this error is not caused by a bug in the compiler, and that you should fill an issue for the plugin on the Netbeans page... but frankly I am not sure if we can prevent this from happening at all. The compiler assumes, that if we can find a class, then using that class is allowed. That means if Node.class is found the compiler does not care about a Node depending on INode.

          For Netbeans this means, that you first have to compile the module containing Node and INode and then your SageNode module. If the compilation is incomplete, then errors like the one here will happen.

          Show
          blackdrag blackdrag added a comment - Netbeans is really not very convenient... normally we try to have that without any IDE, because the IDE may influence the problem. anyway, from the stack I thin I can say the following: You have a static import and on that static import class the compiler tries to get the return type of a method. This method has the return type INode and INode is not available as class. This shows me, that you are not doing joint compilation, because the StaticImportVisistor is not executed for this.Whichmeans you have a mixed java/groovy set where groovy code depends on java code, that depends on groovy code in a manner that will not allow the java class to be initialized unless the depending groovy code exists as class. Well, that is exactly why we have joint compilation. I can only assume, that the plugin compiled Node and INode, then INode got deleted, or Node is written in Java. When then compiling SageNode from the other project, the plugin fails to see, that problem. Now I don't like to say that this is the fault of the Netbens Groovy plugin guys and that this error is not caused by a bug in the compiler, and that you should fill an issue for the plugin on the Netbeans page... but frankly I am not sure if we can prevent this from happening at all. The compiler assumes, that if we can find a class, then using that class is allowed. That means if Node.class is found the compiler does not care about a Node depending on INode. For Netbeans this means, that you first have to compile the module containing Node and INode and then your SageNode module. If the compilation is incomplete, then errors like the one here will happen.
          Hide
          Yegor Bryukhov added a comment -

          > Netbeans is really not very convenient... normally we try to have that without any IDE, because the IDE may influence the problem.

          ok, new archive under the same link has NB project structure but supposedly does not need NB, "ant build" should do.
          it only has 3 source files under "Caiss Model/src" and "Caiss Sage/src"

          > You have a static import and on that static import class the compiler tries to get the return type of a method. This method has the return type INode and INode is not available as class.

          as far as I understand, I don't have static imports.

          >This shows me, that you are not doing joint compilation, because the StaticImportVisistor is not executed for this.Whichmeans you have a mixed java/groovy set where groovy code depends on
          > java code, that depends on groovy code in a manner that will not allow the java class to be initialized unless the depending groovy code exists as class. Well, that is exactly why we have joint
          > compilation.

          again, my understanding is that I do use joint compilation, see nbproject/groovy-compile-impl.xml - the build script was used in a bigger project with mixed code and worked ok.

          > I can only assume, that the plugin compiled Node and INode, then INode got deleted, or Node is written in Java.

          Plugin is actually not used, it is the INode that's in Java, Node and SageNode are in Groovy and the jar file has INode.class in it

          Show
          Yegor Bryukhov added a comment - > Netbeans is really not very convenient... normally we try to have that without any IDE, because the IDE may influence the problem. ok, new archive under the same link has NB project structure but supposedly does not need NB, "ant build" should do. it only has 3 source files under "Caiss Model/src" and "Caiss Sage/src" > You have a static import and on that static import class the compiler tries to get the return type of a method. This method has the return type INode and INode is not available as class. as far as I understand, I don't have static imports. >This shows me, that you are not doing joint compilation, because the StaticImportVisistor is not executed for this.Whichmeans you have a mixed java/groovy set where groovy code depends on > java code, that depends on groovy code in a manner that will not allow the java class to be initialized unless the depending groovy code exists as class. Well, that is exactly why we have joint > compilation. again, my understanding is that I do use joint compilation, see nbproject/groovy-compile-impl.xml - the build script was used in a bigger project with mixed code and worked ok. > I can only assume, that the plugin compiled Node and INode, then INode got deleted, or Node is written in Java. Plugin is actually not used, it is the INode that's in Java, Node and SageNode are in Groovy and the jar file has INode.class in it
          Hide
          Yegor Bryukhov added a comment -

          And one more thing, Node.groovy:

          package com.caiss.model

          public class Node implements INode {

          protected def children = []

          public List<INode> getChildren()

          { children }

          }

          if you delete "<INode>" from getChildren signature, the project compiles.

          Show
          Yegor Bryukhov added a comment - And one more thing, Node.groovy: package com.caiss.model public class Node implements INode { protected def children = [] public List<INode> getChildren() { children } } if you delete "<INode>" from getChildren signature, the project compiles.
          Hide
          blackdrag blackdrag added a comment -

          I will look at it in a minute... I just wanted to mention, that you can attach files to the issue too. That helps especially if your link should not work for some reason.

          Show
          blackdrag blackdrag added a comment - I will look at it in a minute... I just wanted to mention, that you can attach files to the issue too. That helps especially if your link should not work for some reason.
          Hide
          Marc Limotte added a comment -

          I've run into the same error.

          Compiling with Ant (1.7.0)
          Groovy 1.5.7
          Mac OS/X Snow Leopard

          There is one Java class in particular. If I include the Java source with my Groovy and other Java source it works fine. But I get java.lang.TypeNotPresentException if I remove the Java class from my source tree and instead allow the class to be found from a separate JAR. I have lots of other code (both mine and 3rd party libraries) included as JARs on the classpath for grooyvc with no problem.

          Stack Track follows...

          java.lang.TypeNotPresentException: Type Feature not present
          	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:98)
          	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
          	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
          	at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:50)
          	at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:120)
          	at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
          	at sun.reflect.generics.repository.FieldRepository.getGenericType(FieldRepository.java:67)
          	at java.lang.reflect.Field.getGenericType(Field.java:223)
          	at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:157)
          	at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:209)
          	at org.codehaus.groovy.ast.ClassNode.getInterfaces(ClassNode.java:290)
          	at org.codehaus.groovy.ast.ClassNode.declaresInterface(ClassNode.java:785)
          	at org.codehaus.groovy.ast.ClassNode.implementsInterface(ClassNode.java:770)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.doConvertAndCast(AsmClassGenerator.java:3193)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.doConvertAndCast(AsmClassGenerator.java:3188)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.storeThisInstanceField(AsmClassGenerator.java:2154)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.visitFieldExpression(AsmClassGenerator.java:2081)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.visitAttributeOrProperty(AsmClassGenerator.java:2003)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.visitPropertyExpression(AsmClassGenerator.java:2048)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.processClassVariable(AsmClassGenerator.java:2311)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.visitVariableExpression(AsmClassGenerator.java:2265)
          	at org.codehaus.groovy.ast.expr.VariableExpression.visit(VariableExpression.java:65)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.evaluateEqual(AsmClassGenerator.java:3403)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.visitBinaryExpression(AsmClassGenerator.java:1186)
          	at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryExpression.java:49)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.visitAndAutoboxBoolean(AsmClassGenerator.java:3459)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.visitExpressionStatement(AsmClassGenerator.java:1151)
          	at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
          	at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37)
          	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:129)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:532)
          	at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:52)
          	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:73)
          	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:80)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:453)
          	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:88)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:489)
          	at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:907)
          	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:48)
          	at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:239)
          	at org.codehaus.groovy.control.CompilationUnit$10.call(CompilationUnit.java:691)
          	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:885)
          	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:436)
          	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:417)
          	at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:685)
          	at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:541)
          	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
          	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
          	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
          	at java.lang.reflect.Method.invoke(Method.java:597)
          	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
          	at org.apache.tools.ant.Task.perform(Task.java:348)
          	at org.apache.tools.ant.Target.execute(Target.java:357)
          	at org.apache.tools.ant.Target.performTasks(Target.java:385)
          	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
          	at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
          	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
          	at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
          	at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
          	at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
          	at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
          Caused by: java.lang.ClassNotFoundException: Feature
          	at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1400)
          	at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
          	at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
          	at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
          	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)
          	at java.lang.Class.forName0(Native Method)
          	at java.lang.Class.forName(Class.java:247)
          	at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95)
          	... 60 more
          
          Show
          Marc Limotte added a comment - I've run into the same error. Compiling with Ant (1.7.0) Groovy 1.5.7 Mac OS/X Snow Leopard There is one Java class in particular. If I include the Java source with my Groovy and other Java source it works fine. But I get java.lang.TypeNotPresentException if I remove the Java class from my source tree and instead allow the class to be found from a separate JAR. I have lots of other code (both mine and 3rd party libraries) included as JARs on the classpath for grooyvc with no problem. Stack Track follows... java.lang.TypeNotPresentException: Type Feature not present at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:98) at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107) at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31) at sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:50) at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:120) at sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31) at sun.reflect.generics.repository.FieldRepository.getGenericType(FieldRepository.java:67) at java.lang.reflect.Field.getGenericType(Field.java:223) at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:157) at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:209) at org.codehaus.groovy.ast.ClassNode.getInterfaces(ClassNode.java:290) at org.codehaus.groovy.ast.ClassNode.declaresInterface(ClassNode.java:785) at org.codehaus.groovy.ast.ClassNode.implementsInterface(ClassNode.java:770) at org.codehaus.groovy.classgen.AsmClassGenerator.doConvertAndCast(AsmClassGenerator.java:3193) at org.codehaus.groovy.classgen.AsmClassGenerator.doConvertAndCast(AsmClassGenerator.java:3188) at org.codehaus.groovy.classgen.AsmClassGenerator.storeThisInstanceField(AsmClassGenerator.java:2154) at org.codehaus.groovy.classgen.AsmClassGenerator.visitFieldExpression(AsmClassGenerator.java:2081) at org.codehaus.groovy.classgen.AsmClassGenerator.visitAttributeOrProperty(AsmClassGenerator.java:2003) at org.codehaus.groovy.classgen.AsmClassGenerator.visitPropertyExpression(AsmClassGenerator.java:2048) at org.codehaus.groovy.classgen.AsmClassGenerator.processClassVariable(AsmClassGenerator.java:2311) at org.codehaus.groovy.classgen.AsmClassGenerator.visitVariableExpression(AsmClassGenerator.java:2265) at org.codehaus.groovy.ast.expr.VariableExpression.visit(VariableExpression.java:65) at org.codehaus.groovy.classgen.AsmClassGenerator.evaluateEqual(AsmClassGenerator.java:3403) at org.codehaus.groovy.classgen.AsmClassGenerator.visitBinaryExpression(AsmClassGenerator.java:1186) at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryExpression.java:49) at org.codehaus.groovy.classgen.AsmClassGenerator.visitAndAutoboxBoolean(AsmClassGenerator.java:3459) at org.codehaus.groovy.classgen.AsmClassGenerator.visitExpressionStatement(AsmClassGenerator.java:1151) at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40) at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:37) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:129) at org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:532) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:52) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:73) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:80) at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:453) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:88) at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:489) at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:907) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:48) at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:239) at org.codehaus.groovy.control.CompilationUnit$10.call(CompilationUnit.java:691) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:885) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:436) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:417) at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:685) at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:541) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:357) at org.apache.tools.ant.Target.performTasks(Target.java:385) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) at org.apache.tools.ant.Project.executeTarget(Project.java:1306) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32) at org.apache.tools.ant.Project.executeTargets(Project.java:1189) at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423) at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137) Caused by: java.lang.ClassNotFoundException: Feature at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1400) at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341) at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088) at java.lang. ClassLoader .loadClass( ClassLoader .java:254) at java.lang. ClassLoader .loadClassInternal( ClassLoader .java:399) at java.lang. Class .forName0(Native Method) at java.lang. Class .forName( Class .java:247) at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:95) ... 60 more
          Hide
          blackdrag blackdrag added a comment -

          I am not sure if I should close the issue as "Won't fix" since I can really only guess from the comments what happens.. or if I should close it as "Incomplete" since there is no way to reproduce the original issue.

          Anyway... I assume that for unknown reasons INode is not available and thus the compilation fails here. Since our compiler so far requires to load classes using a class loader, the parent classes do have to be present too. Is that not the cae, you get an exception like the one seen

          Show
          blackdrag blackdrag added a comment - I am not sure if I should close the issue as "Won't fix" since I can really only guess from the comments what happens.. or if I should close it as "Incomplete" since there is no way to reproduce the original issue. Anyway... I assume that for unknown reasons INode is not available and thus the compilation fails here. Since our compiler so far requires to load classes using a class loader, the parent classes do have to be present too. Is that not the cae, you get an exception like the one seen

            People

            • Assignee:
              blackdrag blackdrag
              Reporter:
              Yegor Bryukhov
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: