GRECLIPSE
  1. GRECLIPSE
  2. GRECLIPSE-1435

GroovyEclipseBug: "Cannot find type variable on method" (private static method in Java class)

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.6.0.Release
    • Fix Version/s: None
    • Component/s: Compiler Integration
    • Labels:
      None
    • Environment:
      Mac OS X 10.6.8
      Eclipse Indigo Service Release 2.
    • Number of attachments :
      3

      Description

      I get the GroovyEclipseBug shown below.

      The method:
      private static T getMandatoryVal(Map map, String key, Class clazz)
      is delcared in a Java class SshjTool. The method is only called from within this class.

      The comilation error is reported on a different groovy class: EffectorSayHiTest.groovy, at line 0.


      General error during class generation: Cannot find type variable on method declaring element private static T getMandatoryVal(Map, java.lang.String, Class)

      org.codehaus.jdt.groovy.internal.compiler.ast.GroovyEclipseBug: Cannot find type variable on method declaring element private static T getMandatoryVal(Map, java.lang.String, Class)
      at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.createClassNode(JDTResolver.java:531)
      at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.createJDTClassNode(JDTResolver.java:448)
      at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.convertToClassNode(JDTResolver.java:436)
      at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.methodBindingToMethodNode(JDTClassNode.java:336)
      at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.initializeMembers(JDTClassNode.java:298)
      at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.initialize(JDTClassNode.java:231)
      at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.lazyClassInit(JDTClassNode.java:155)
      at org.codehaus.groovy.ast.ClassNode.getInterfaces(ClassNode.java:444)
      at org.codehaus.groovy.ast.ClassNode.declaresInterface(ClassNode.java:1051)
      at org.codehaus.groovy.ast.ClassNode.implementsInterface(ClassNode.java:1031)
      at org.codehaus.groovy.ast.ClassNode.isDerivedFromGroovyObject(ClassNode.java:1021)
      at org.codehaus.groovy.classgen.AsmClassGenerator.loadWrapper(AsmClassGenerator.java:1509)
      at org.codehaus.groovy.classgen.asm.CallSiteWriter.makeCallSite(CallSiteWriter.java:303)
      at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:187)
      at org.codehaus.groovy.classgen.asm.InvocationWriter.makeCall(InvocationWriter.java:89)
      at org.codehaus.groovy.classgen.asm.InvocationWriter.makeInvokeMethodCall(InvocationWriter.java:73)
      at org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeMethod(InvocationWriter.java:292)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethodCallExpression(AsmClassGenerator.java:657)
      at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:75)
      at org.codehaus.groovy.classgen.asm.StatementWriter.writeReturn(StatementWriter.java:579)
      at org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeReturn(OptimizingStatementWriter.java:316)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitReturnStatement(AsmClassGenerator.java:499)
      at org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.java:47)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:102)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:113)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:313)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:270)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:124)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:390)
      at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1170)
      at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:51)
      at org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:174)
      at org.codehaus.groovy.control.CompilationUnit$6.call(CompilationUnit.java:829)
      at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1122)
      at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:594)
      at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:572)
      at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:549)
      at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.processToPhase(GroovyCompilationUnitDeclaration.java:171)
      at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.generateCode(GroovyCompilationUnitDeclaration.java:1526)
      at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:831)
      at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
      at java.lang.Thread.run(Thread.java:680)


      This is with org.codehause.groovy.eclipse version 2.6.0, in Eclipse Indigo Service Release 2.


      See https://github.com/brooklyncentral/brooklyn/issues/50.

      You should be able to see the error by building the brooklyn repo with, for example, git commit b302e7.

      1. GRECLIPSE-1435-error-screenshot.png
        323 kB

        Activity

        Hide
        Aled Sage added a comment -

        Slight correction. The signature in the Java class is:
        private static <T> T getMandatoryVal(Map<String,?> map, String key, Class<T> clazz)

        Show
        Aled Sage added a comment - Slight correction. The signature in the Java class is: private static <T> T getMandatoryVal(Map<String,?> map, String key, Class<T> clazz)
        Hide
        Andrew Eisenberg added a comment -

        I tried a naive approach to recreating this bug and could not. I have this Java Class:

        import java.util.Map;
        public class Clazz {
        	private static <T> T getMandatoryVal(Map<String,?> map, String key, Class<T> clazz) {
        		return null;
        	}
        }
        

        And this groovy script:

        println Clazz.getMandatoryVal(null, null, null);
        

        I am able to compile and run the script inside of Eclipse with no problems. I'll try cloning the repo you link to and see if I can reproduce the bug with the code in the repo.

        Show
        Andrew Eisenberg added a comment - I tried a naive approach to recreating this bug and could not. I have this Java Class: import java.util.Map; public class Clazz { private static <T> T getMandatoryVal(Map< String ,?> map, String key, Class <T> clazz) { return null ; } } And this groovy script: println Clazz.getMandatoryVal( null , null , null ); I am able to compile and run the script inside of Eclipse with no problems. I'll try cloning the repo you link to and see if I can reproduce the bug with the code in the repo.
        Hide
        Andrew Eisenberg added a comment -

        I'm still in the middle of cloning the repo, but I am looking at your pom.xml and I see a few red flags:

        1. Looks like you reference Grails 1.3.7, but you are using the Groovy 1.8.4 compiler. Groovy 1.8.x is not compatible with grails 1.3.x.
        2. It looks like you are expecting the user to run mvn eclipse:eclipse on the command line, but you explicitly add the org.maven.ide.eclipse.maven2Nature to the project, which is not suggested.
        3. You should be using Groovy 1.8.6, not 1.8.4.
        Show
        Andrew Eisenberg added a comment - I'm still in the middle of cloning the repo, but I am looking at your pom.xml and I see a few red flags: Looks like you reference Grails 1.3.7, but you are using the Groovy 1.8.4 compiler. Groovy 1.8.x is not compatible with grails 1.3.x. It looks like you are expecting the user to run mvn eclipse:eclipse on the command line, but you explicitly add the org.maven.ide.eclipse.maven2Nature to the project, which is not suggested. You should be using Groovy 1.8.6, not 1.8.4.
        Hide
        Andrew Eisenberg added a comment -

        I'd recommend first fixing the 3 problems above and seeing if this does anything to help your problem. And even if it doesn't fix the problem, this is something you should do anyway.

        Also, it would be helpful if you could distill the problem down to a simpler project/

        Show
        Andrew Eisenberg added a comment - I'd recommend first fixing the 3 problems above and seeing if this does anything to help your problem. And even if it doesn't fix the problem, this is something you should do anyway. Also, it would be helpful if you could distill the problem down to a simpler project/
        Hide
        Aled Sage added a comment -

        Thanks for those suggestions. I'll take a look at those.

        I forgot to say... as described in the brooklyn project issue link: removing the "private" from the java method declaration fixes the problem for me.

        Show
        Aled Sage added a comment - Thanks for those suggestions. I'll take a look at those. I forgot to say... as described in the brooklyn project issue link: removing the "private" from the java method declaration fixes the problem for me.
        Hide
        Andrew Eisenberg added a comment -

        I'd also recommend that you update to groovy-eclipse 2.6.1. We have fixed a few problems with generics recently. It wouldn't surprise me if there were more problems, though.

        I'll wait for you to fix the project structure a bit and I or someone else will have another look. I had trouble importing your project into Eclipse and so it would be hard to continue looking at this bug without a smaller project.

        Show
        Andrew Eisenberg added a comment - I'd also recommend that you update to groovy-eclipse 2.6.1. We have fixed a few problems with generics recently. It wouldn't surprise me if there were more problems, though. I'll wait for you to fix the project structure a bit and I or someone else will have another look. I had trouble importing your project into Eclipse and so it would be hard to continue looking at this bug without a smaller project.
        Hide
        Andrew Eisenberg added a comment -

        Any updates on this issue?

        Show
        Andrew Eisenberg added a comment - Any updates on this issue?
        Hide
        Alex Heneveld added a comment -

        Have just updated to 4.2 Juno with org.codehaus.groovy.eclipse_2.7.0.xx-20120703-1400-e42-RELEASE and seeing this error again, in a slightly different place.

        Happens with both groovy 1.8.6 and 2.0.0: compiles fine on command-line mvn but in Eclipse marks this error (against what seems to be an unrelated class).

        Changing the visibility of the referenced method seems to fix the problem, so this isn't a significant issue for us, but wanted to give you an update, and provide details of our "fix" for anyone else who comes across it. No objections to your closing it as it is obscure (all the cut-down projects I've made don't show the error).

        BTW:

        • we're not using `mvn eclipse:eclipse` – just a straightforward m2e import of an existing maven project into eclipse. Have removed all the lifecycle-mapping sections removed from my poms, still see a few other problems with m2e but pretty sure they're not related to this issue; the org.eclipse.m2e.core.maven2Nature is added
        • Grails isn't involved yet in these projects (it is used in downstream projects which are working, with some ugly hackiness for the version mismatch – which fortunately we can now get rid of, with 2.0)
        Show
        Alex Heneveld added a comment - Have just updated to 4.2 Juno with org.codehaus.groovy.eclipse_2.7.0.xx-20120703-1400-e42-RELEASE and seeing this error again, in a slightly different place. Happens with both groovy 1.8.6 and 2.0.0: compiles fine on command-line mvn but in Eclipse marks this error (against what seems to be an unrelated class). Changing the visibility of the referenced method seems to fix the problem, so this isn't a significant issue for us, but wanted to give you an update, and provide details of our "fix" for anyone else who comes across it. No objections to your closing it as it is obscure (all the cut-down projects I've made don't show the error). BTW: we're not using `mvn eclipse:eclipse` – just a straightforward m2e import of an existing maven project into eclipse. Have removed all the lifecycle-mapping sections removed from my poms, still see a few other problems with m2e but pretty sure they're not related to this issue; the org.eclipse.m2e.core.maven2Nature is added Grails isn't involved yet in these projects (it is used in downstream projects which are working, with some ugly hackiness for the version mismatch – which fortunately we can now get rid of, with 2.0)
        Hide
        Andrew Eisenberg added a comment -

        Hi Alex,

        Are you using the same codebase as Aled above? I wasn't able to import the project into Eclipse, so I couldn't reproduce the error myself. Is there any chance you can send me over a small sample project that can reproduce the problem?

        In the latest snapshot version of 2.7.1, a fix was committed that addresses some problems with generic wild cards. This may fix your problem. The fix went into the 2.0 compiler only. So, you can try updating to the latest snapshot version and using the 2.0 compiler.

        But again, there's not much more we can do until we can reproduce the problem ourselves.

        Show
        Andrew Eisenberg added a comment - Hi Alex, Are you using the same codebase as Aled above? I wasn't able to import the project into Eclipse, so I couldn't reproduce the error myself. Is there any chance you can send me over a small sample project that can reproduce the problem? In the latest snapshot version of 2.7.1, a fix was committed that addresses some problems with generic wild cards. This may fix your problem. The fix went into the 2.0 compiler only. So, you can try updating to the latest snapshot version and using the 2.0 compiler. But again, there's not much more we can do until we can reproduce the problem ourselves.
        Hide
        Alex Heneveld added a comment -

        Hi Andrew,

        Yes, Aled and I are committers on Brooklyn. I tried to make a small project for you but couldn't reproduce there.

        Simplest way to reproduce is probably to checkout all of brooklyn master (brooklyncentral.github.com), but then just build core with maven (optionally build api and usage/test-support which are the only upstream dependencies of core, or ofc you can let maven download them).

        Then:

        • remove the m2e lifecycle-mapping sections in /pom.xml and /core/pom.xml (these seem not to work with newer m2e's, and actually to break them)
        • m2e import just the (sub)project "core" into Eclipse (it is type "bundle" but Tycho seems to break so you have to click "Resolve later" for it to work)

        Once Eclipse has happily imported the "core" project and it builds, you should see this error (as the only issue; for me it turned up in SensorRegistry, complaining about a method in DependentConfiguration which is private).

        That said, our fix of increasing the visibility of the method is good enough for us, so up to you to determine relative priority. (The maven woes hinted above are much more painful!) I suspect there are two different bugs in GRECLIPSE but both very minor, one that it flags the error against the irrelevant class without telling us which class owns the offending private method, two that it raises an error for something which is not an error in command-line compilation.

        I'll happily try things subject to bandwidth (personal and hotel internet!).

        BTW thanks for all your work.

        Best
        Alex

        Show
        Alex Heneveld added a comment - Hi Andrew, Yes, Aled and I are committers on Brooklyn. I tried to make a small project for you but couldn't reproduce there. Simplest way to reproduce is probably to checkout all of brooklyn master (brooklyncentral.github.com), but then just build core with maven (optionally build api and usage/test-support which are the only upstream dependencies of core, or ofc you can let maven download them). Then: remove the m2e lifecycle-mapping sections in /pom.xml and /core/pom.xml (these seem not to work with newer m2e's, and actually to break them) m2e import just the (sub)project "core" into Eclipse (it is type "bundle" but Tycho seems to break so you have to click "Resolve later" for it to work) Once Eclipse has happily imported the "core" project and it builds, you should see this error (as the only issue; for me it turned up in SensorRegistry, complaining about a method in DependentConfiguration which is private). That said, our fix of increasing the visibility of the method is good enough for us, so up to you to determine relative priority. (The maven woes hinted above are much more painful!) I suspect there are two different bugs in GRECLIPSE but both very minor, one that it flags the error against the irrelevant class without telling us which class owns the offending private method, two that it raises an error for something which is not an error in command-line compilation. I'll happily try things subject to bandwidth (personal and hotel internet!). BTW thanks for all your work. Best Alex
        Hide
        Robert Winch added a comment - - edited

        I am getting a very similar issue when using STS 3.1.0.M3 and building the Spring Security project.

        I'm not exactly sure what caused it, but I was attempting to copy paste a line and the line would not paste. I also tried saving the file but the editor was unresponsive. After a while the editor changed to white with the text "Error".

        I have attached a screenshot of the error along with my complete error logs. The summary of the error is pasted below as well. There appear to a number of errors happening in the logs. Someone with more Eclipse experience may be able to associate the errors (or discount the other errors) and this is why I have attached the entire logs.

        !ENTRY org.eclipse.jdt.core 4 4 2012-07-18 09:48:02.278
        !MESSAGE Error in inferencing engine for SessionManagementConfigTests.groovy
        !STACK 0
        org.codehaus.jdt.groovy.internal.compiler.ast.GroovyEclipseBug: Cannot find type variable on method declaring element public abstract T getBean(Class<T>) throws org.springframework.beans.BeansException
        	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.createClassNode(JDTResolver.java:531)
        	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.createJDTClassNode(JDTResolver.java:448)
        	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.convertToClassNode(JDTResolver.java:436)
        	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.methodBindingToMethodNode(JDTClassNode.java:338)
        	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.initializeMembers(JDTClassNode.java:264)
        	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.initialize(JDTClassNode.java:233)
        	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.lazyClassInit(JDTClassNode.java:157)
        	at org.codehaus.groovy.ast.ClassNode.getInterfaces(ClassNode.java:429)
        	at org.eclipse.jdt.groovy.search.VariableScope.findAllInterfaces(VariableScope.java:853)
        	at org.eclipse.jdt.groovy.search.VariableScope.findAllInterfaces(VariableScope.java:857)
        	at org.eclipse.jdt.groovy.search.VariableScope.findAllInterfaces(VariableScope.java:857)
        	at org.eclipse.jdt.groovy.search.VariableScope.findAllInterfaces(VariableScope.java:857)
        	at org.eclipse.jdt.groovy.search.VariableScope.findAllInterfaces(VariableScope.java:857)
        	at org.eclipse.jdt.groovy.search.VariableScope.createTypeHierarchy(VariableScope.java:896)
        	at org.eclipse.jdt.groovy.search.VariableScope.createTypeHierarchy(VariableScope.java:892)
        	at org.eclipse.jdt.groovy.search.VariableScope.createTypeHierarchy(VariableScope.java:892)
        	at org.eclipse.jdt.groovy.search.VariableScope.createTypeHierarchy(VariableScope.java:892)
        	at org.eclipse.jdt.groovy.search.GenericsMapper.gatherGenerics(GenericsMapper.java:41)
        	at org.eclipse.jdt.groovy.search.SimpleTypeLookup.typeFromDeclaration(SimpleTypeLookup.java:488)
        	at org.eclipse.jdt.groovy.search.SimpleTypeLookup.findTypeForNameWithKnownObjectExpression(SimpleTypeLookup.java:331)
        	at org.eclipse.jdt.groovy.search.SimpleTypeLookup.findType(SimpleTypeLookup.java:213)
        	at org.eclipse.jdt.groovy.search.SimpleTypeLookup.lookupType(SimpleTypeLookup.java:80)
        	at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.lookupExpressionType(TypeInferencingVisitorWithRequestor.java:1863)
        	at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.handleSimpleExpression(TypeInferencingVisitorWithRequestor.java:1833)
        	at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitConstantExpression(TypeInferencingVisitorWithRequestor.java:1355)
        	at org.codehaus.groovy.ast.expr.ConstantExpression.visit(ConstantExpression.java:55)
        	at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitMethodCallExpression(TypeInferencingVisitorWithRequestor.java:1518)
        	at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:75)
        	at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitBinaryExpression(TypeInferencingVisitorWithRequestor.java:946)
        	at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryExpression.java:49)
        	at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:69)
        	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:209)
        	at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
        	at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
        	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:179)
        	at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitBlockStatement(TypeInferencingVisitorWithRequestor.java:1286)
        	at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
        	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:102)
        	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:113)
        	at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitConstructorOrMethod(TypeInferencingVisitorWithRequestor.java:785)
        	at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitJDT(TypeInferencingVisitorWithRequestor.java:524)
        	at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitJDT(TypeInferencingVisitorWithRequestor.java:370)
        	at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitCompilationUnit(TypeInferencingVisitorWithRequestor.java:318)
        	at org.codehaus.groovy.eclipse.editor.highlighting.GatherSemanticReferences.findSemanticHighlightingReferences(GatherSemanticReferences.java:52)
        	at org.codehaus.groovy.eclipse.editor.highlighting.GroovySemanticReconciler.reconciled(GroovySemanticReconciler.java:149)
        	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.reconciled(CompilationUnitEditor.java:1664)
        	at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconciled(JavaReconcilingStrategy.java:212)
        	at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconciled(JavaCompositeReconcilingStrategy.java:164)
        	at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconcile(JavaCompositeReconcilingStrategy.java:112)
        	at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77)
        	at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206)
        
        Show
        Robert Winch added a comment - - edited I am getting a very similar issue when using STS 3.1.0.M3 and building the Spring Security project. I'm not exactly sure what caused it, but I was attempting to copy paste a line and the line would not paste. I also tried saving the file but the editor was unresponsive. After a while the editor changed to white with the text "Error". I have attached a screenshot of the error along with my complete error logs. The summary of the error is pasted below as well. There appear to a number of errors happening in the logs. Someone with more Eclipse experience may be able to associate the errors (or discount the other errors) and this is why I have attached the entire logs. !ENTRY org.eclipse.jdt.core 4 4 2012-07-18 09:48:02.278 !MESSAGE Error in inferencing engine for SessionManagementConfigTests.groovy !STACK 0 org.codehaus.jdt.groovy.internal.compiler.ast.GroovyEclipseBug: Cannot find type variable on method declaring element public abstract T getBean( Class <T>) throws org.springframework.beans.BeansException at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.createClassNode(JDTResolver.java:531) at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.createJDTClassNode(JDTResolver.java:448) at org.codehaus.jdt.groovy.internal.compiler.ast.JDTResolver.convertToClassNode(JDTResolver.java:436) at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.methodBindingToMethodNode(JDTClassNode.java:338) at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.initializeMembers(JDTClassNode.java:264) at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.initialize(JDTClassNode.java:233) at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.lazyClassInit(JDTClassNode.java:157) at org.codehaus.groovy.ast.ClassNode.getInterfaces(ClassNode.java:429) at org.eclipse.jdt.groovy.search.VariableScope.findAllInterfaces(VariableScope.java:853) at org.eclipse.jdt.groovy.search.VariableScope.findAllInterfaces(VariableScope.java:857) at org.eclipse.jdt.groovy.search.VariableScope.findAllInterfaces(VariableScope.java:857) at org.eclipse.jdt.groovy.search.VariableScope.findAllInterfaces(VariableScope.java:857) at org.eclipse.jdt.groovy.search.VariableScope.findAllInterfaces(VariableScope.java:857) at org.eclipse.jdt.groovy.search.VariableScope.createTypeHierarchy(VariableScope.java:896) at org.eclipse.jdt.groovy.search.VariableScope.createTypeHierarchy(VariableScope.java:892) at org.eclipse.jdt.groovy.search.VariableScope.createTypeHierarchy(VariableScope.java:892) at org.eclipse.jdt.groovy.search.VariableScope.createTypeHierarchy(VariableScope.java:892) at org.eclipse.jdt.groovy.search.GenericsMapper.gatherGenerics(GenericsMapper.java:41) at org.eclipse.jdt.groovy.search.SimpleTypeLookup.typeFromDeclaration(SimpleTypeLookup.java:488) at org.eclipse.jdt.groovy.search.SimpleTypeLookup.findTypeForNameWithKnownObjectExpression(SimpleTypeLookup.java:331) at org.eclipse.jdt.groovy.search.SimpleTypeLookup.findType(SimpleTypeLookup.java:213) at org.eclipse.jdt.groovy.search.SimpleTypeLookup.lookupType(SimpleTypeLookup.java:80) at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.lookupExpressionType(TypeInferencingVisitorWithRequestor.java:1863) at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.handleSimpleExpression(TypeInferencingVisitorWithRequestor.java:1833) at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitConstantExpression(TypeInferencingVisitorWithRequestor.java:1355) at org.codehaus.groovy.ast.expr.ConstantExpression.visit(ConstantExpression.java:55) at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitMethodCallExpression(TypeInferencingVisitorWithRequestor.java:1518) at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:75) at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitBinaryExpression(TypeInferencingVisitorWithRequestor.java:946) at org.codehaus.groovy.ast.expr.BinaryExpression.visit(BinaryExpression.java:49) at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:69) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:209) at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40) at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:179) at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitBlockStatement(TypeInferencingVisitorWithRequestor.java:1286) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:102) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:113) at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitConstructorOrMethod(TypeInferencingVisitorWithRequestor.java:785) at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitJDT(TypeInferencingVisitorWithRequestor.java:524) at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitJDT(TypeInferencingVisitorWithRequestor.java:370) at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitCompilationUnit(TypeInferencingVisitorWithRequestor.java:318) at org.codehaus.groovy.eclipse.editor.highlighting.GatherSemanticReferences.findSemanticHighlightingReferences(GatherSemanticReferences.java:52) at org.codehaus.groovy.eclipse.editor.highlighting.GroovySemanticReconciler.reconciled(GroovySemanticReconciler.java:149) at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.reconciled(CompilationUnitEditor.java:1664) at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconciled(JavaReconcilingStrategy.java:212) at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconciled(JavaCompositeReconcilingStrategy.java:164) at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconcile(JavaCompositeReconcilingStrategy.java:112) at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:77) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:206)
        Hide
        Andrew Eisenberg added a comment -

        Hi Rob,

        Base on the screenshot and the error log, it looks like you are seeing GRECLIPSE-1452. Update to the latest nightly from here:
        http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.7/
        or here:
        http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e4.2/

        and look for messages like this in your error log:

        GRECLIPSE-1452: Problem found in file. <path-name>

        So, after you install, please comment on that bug if you see the blank editor again or if you see the entry in the error log. And if you don't see it after a few days, then comment anyway because that's another data point saying that the problem might be fixed by the changes I put in.

        Now, the stack trace you pasted is a different error GRECLIPSE-1452 and probably is the same issue as described here. For this one, also make sure that you are running with the latest nightly. And what version of the groovy compiler are you using? And how often do you see the exception? On every keystroke when editing the file, or only on saves?

        Show
        Andrew Eisenberg added a comment - Hi Rob, Base on the screenshot and the error log, it looks like you are seeing GRECLIPSE-1452 . Update to the latest nightly from here: http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.7/ or here: http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e4.2/ and look for messages like this in your error log: GRECLIPSE-1452 : Problem found in file. <path-name> So, after you install, please comment on that bug if you see the blank editor again or if you see the entry in the error log. And if you don't see it after a few days, then comment anyway because that's another data point saying that the problem might be fixed by the changes I put in. Now, the stack trace you pasted is a different error GRECLIPSE-1452 and probably is the same issue as described here. For this one, also make sure that you are running with the latest nightly. And what version of the groovy compiler are you using? And how often do you see the exception? On every keystroke when editing the file, or only on saves?
        Hide
        Robert Winch added a comment -

        Andrew,

        Thank you for your prompt response, looking through the logs, and pointing me to the additional JIRAs. I will update to the latest snapshot and provide feedback on whether or not it appears to fixed GRECLIPSE-1452. As I am not always editing Groovy code (we only use it for some of our testing) it may depend on how am editing Groovy how fast a response comes.

        I am using Groovy 1.7 compiler (GRECLIPSE 2.7.0.xx-20120703-1400-e42-RELEASE).

        I'm not exactly sure what triggered the behavior to be honest. Looking at the logs I think the error was triggered prior to the save (I tried to save because I realized it was locked up already and hoped it would save before it crashed). I was editing the file and then the editor in STS stopped responding (i.e. I could not copy, paste, or save). After trying to copy paste a few times I tried to save. When that did not work I got the error from GRECLIPSE-1452 and looked at the STS logs.

        It seemed like the error only happened once, but then triggered a lot of Unhandled loop event exceptions. The problem did not immediately trigger any dialogs that displayed the error. In fact the only dialog I saw was in response to GRECLIPSE-1452 not this one. I'm wondering if this error caused Eclipse to get stuck in recursion where it was trying to handle an error, that caused an error, Eclipse tried to handle that error, which caused an error... If this was happening on the main thread that would explain why it was not responsive.

        I'm sorry if this is vague, but the reason and order of events are a bit mysterious to me.

        Show
        Robert Winch added a comment - Andrew, Thank you for your prompt response, looking through the logs, and pointing me to the additional JIRAs. I will update to the latest snapshot and provide feedback on whether or not it appears to fixed GRECLIPSE-1452 . As I am not always editing Groovy code (we only use it for some of our testing) it may depend on how am editing Groovy how fast a response comes. I am using Groovy 1.7 compiler (GRECLIPSE 2.7.0.xx-20120703-1400-e42-RELEASE). I'm not exactly sure what triggered the behavior to be honest. Looking at the logs I think the error was triggered prior to the save (I tried to save because I realized it was locked up already and hoped it would save before it crashed). I was editing the file and then the editor in STS stopped responding (i.e. I could not copy, paste, or save). After trying to copy paste a few times I tried to save. When that did not work I got the error from GRECLIPSE-1452 and looked at the STS logs. It seemed like the error only happened once, but then triggered a lot of Unhandled loop event exceptions. The problem did not immediately trigger any dialogs that displayed the error. In fact the only dialog I saw was in response to GRECLIPSE-1452 not this one. I'm wondering if this error caused Eclipse to get stuck in recursion where it was trying to handle an error, that caused an error, Eclipse tried to handle that error, which caused an error... If this was happening on the main thread that would explain why it was not responsive. I'm sorry if this is vague, but the reason and order of events are a bit mysterious to me.
        Hide
        Robert Winch added a comment -

        I'm not sure if this is the preferred place for this discussion, but after updating the the e4.2 snapshot I get a series of errors at startup. I have attached the entire logs, but the gist of it seems to be:

        java.lang.NoSuchMethodError: org.codehaus.groovy.ast.ClassNode.addPropertyWithoutField(Lorg/codehaus/groovy/ast/PropertyNode;)V
        	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.initializeProperties(JDTClassNode.java:543)
        	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.ensurePropertiesInitialized(JDTClassNode.java:526)
        	at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.getProperties(JDTClassNode.java:621)
        	at org.codehaus.groovy.classgen.VariableScopeVisitor.findClassMember(VariableScopeVisitor.java:184)
        	at org.codehaus.groovy.classgen.VariableScopeVisitor.findClassMember(VariableScopeVisitor.java:188)
        	at org.codehaus.groovy.classgen.VariableScopeVisitor.checkVariableNameForDeclaration(VariableScopeVisitor.java:249)
        	at org.codehaus.groovy.classgen.VariableScopeVisitor.visitMethodCallExpression(VariableScopeVisitor.java:460)
        	at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:75)
        	at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:69)
        	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:209)
        	at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
        	at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
        	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:179)
        	at org.codehaus.groovy.classgen.VariableScopeVisitor.visitBlockStatement(VariableScopeVisitor.java:321)
        	at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
        	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:102)
        	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:113)
        	at org.codehaus.groovy.classgen.VariableScopeVisitor.visitConstructorOrMethod(VariableScopeVisitor.java:446)
        	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:124)
        	at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1157)
        	at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:51)
        	at org.codehaus.groovy.classgen.VariableScopeVisitor.visitClass(VariableScopeVisitor.java:429)
        	at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:694)
        	at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:961)
        	at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:590)
        	at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:566)
        	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:543)
        	at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.processToPhase(GroovyCompilationUnitDeclaration.java:171)
        	at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.resolve(GroovyCompilationUnitDeclaration.java:1994)
        	at org.eclipse.jdt.internal.compiler.Compiler.resolve(Compiler.java:980)
        	at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process_aroundBody0(CompilationUnitProblemFinder.java:201)
        	at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process_aroundBody1$advice(CompilationUnitProblemFinder.java:244)
        	at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:1)
        	at org.codehaus.jdt.groovy.model.GroovyCompilationUnit.buildStructure(GroovyCompilationUnit.java:319)
        	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:258)
        	at org.eclipse.jdt.internal.core.SourceRefElement.generateInfos(SourceRefElement.java:107)
        	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:526)
        	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:255)
        	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:241)
        	at org.eclipse.jdt.internal.core.JavaElement.exists(JavaElement.java:159)
        	at org.eclipse.mylyn.internal.java.ui.JavaUiBridge.open(JavaUiBridge.java:52)
        	at org.eclipse.mylyn.internal.context.ui.state.EditorStateParticipant.restoreState(EditorStateParticipant.java:150)
        	at org.eclipse.mylyn.internal.context.ui.state.ContextStateManager$3.run(ContextStateManager.java:114)
        	at org.eclipse.mylyn.internal.context.ui.state.ContextStateManager$3.run(ContextStateManager.java:1)
        	at org.eclipse.mylyn.commons.core.CommonListenerList$1.run(CommonListenerList.java:93)
        	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        	at org.eclipse.mylyn.commons.core.CommonListenerList.notify(CommonListenerList.java:85)
        	at org.eclipse.mylyn.internal.context.ui.state.ContextStateManager.restoreState(ContextStateManager.java:110)
        	at org.eclipse.mylyn.internal.context.tasks.ui.ContextStatePersistenceHandler.activated(ContextStatePersistenceHandler.java:62)
        	at org.eclipse.mylyn.internal.context.tasks.ui.ContextTasksStartupHandler$ContextActivationListener.contextChanged(ContextTasksStartupHandler.java:115)
        	at org.eclipse.mylyn.internal.context.core.InteractionContextManager$6.run(InteractionContextManager.java:688)
        	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.internalActivateContext(InteractionContextManager.java:679)
        	at org.eclipse.mylyn.internal.context.core.InteractionContextManager.activateContext(InteractionContextManager.java:180)
        	at org.eclipse.mylyn.internal.context.tasks.ui.TaskActivityMonitor$2.taskActivated(TaskActivityMonitor.java:75)
        	at org.eclipse.mylyn.internal.tasks.core.TaskActivityManager.activateTask(TaskActivityManager.java:479)
        	at org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin$TasksUiInitializationJob.runInUIThread(TasksUiPlugin.java:424)
        	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
        	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
        	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3529)
        	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3182)
        	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
        	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
        	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
        	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
        	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
        	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
        	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
        	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
        	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
        	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
        	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
        	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
        	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
        	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
        	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
        
        Show
        Robert Winch added a comment - I'm not sure if this is the preferred place for this discussion, but after updating the the e4.2 snapshot I get a series of errors at startup. I have attached the entire logs, but the gist of it seems to be: java.lang.NoSuchMethodError: org.codehaus.groovy.ast.ClassNode.addPropertyWithoutField(Lorg/codehaus/groovy/ast/PropertyNode;)V at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.initializeProperties(JDTClassNode.java:543) at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.ensurePropertiesInitialized(JDTClassNode.java:526) at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.getProperties(JDTClassNode.java:621) at org.codehaus.groovy.classgen.VariableScopeVisitor.findClassMember(VariableScopeVisitor.java:184) at org.codehaus.groovy.classgen.VariableScopeVisitor.findClassMember(VariableScopeVisitor.java:188) at org.codehaus.groovy.classgen.VariableScopeVisitor.checkVariableNameForDeclaration(VariableScopeVisitor.java:249) at org.codehaus.groovy.classgen.VariableScopeVisitor.visitMethodCallExpression(VariableScopeVisitor.java:460) at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:75) at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:69) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:209) at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40) at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:179) at org.codehaus.groovy.classgen.VariableScopeVisitor.visitBlockStatement(VariableScopeVisitor.java:321) at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:102) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:113) at org.codehaus.groovy.classgen.VariableScopeVisitor.visitConstructorOrMethod(VariableScopeVisitor.java:446) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:124) at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1157) at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:51) at org.codehaus.groovy.classgen.VariableScopeVisitor.visitClass(VariableScopeVisitor.java:429) at org.codehaus.groovy.control.CompilationUnit$1.call(CompilationUnit.java:694) at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:961) at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:590) at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:566) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:543) at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.processToPhase(GroovyCompilationUnitDeclaration.java:171) at org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDeclaration.resolve(GroovyCompilationUnitDeclaration.java:1994) at org.eclipse.jdt.internal.compiler. Compiler .resolve( Compiler .java:980) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process_aroundBody0(CompilationUnitProblemFinder.java:201) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process_aroundBody1$advice(CompilationUnitProblemFinder.java:244) at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:1) at org.codehaus.jdt.groovy.model.GroovyCompilationUnit.buildStructure(GroovyCompilationUnit.java:319) at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:258) at org.eclipse.jdt.internal.core.SourceRefElement.generateInfos(SourceRefElement.java:107) at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:526) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:255) at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:241) at org.eclipse.jdt.internal.core.JavaElement.exists(JavaElement.java:159) at org.eclipse.mylyn.internal.java.ui.JavaUiBridge.open(JavaUiBridge.java:52) at org.eclipse.mylyn.internal.context.ui.state.EditorStateParticipant.restoreState(EditorStateParticipant.java:150) at org.eclipse.mylyn.internal.context.ui.state.ContextStateManager$3.run(ContextStateManager.java:114) at org.eclipse.mylyn.internal.context.ui.state.ContextStateManager$3.run(ContextStateManager.java:1) at org.eclipse.mylyn.commons.core.CommonListenerList$1.run(CommonListenerList.java:93) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.mylyn.commons.core.CommonListenerList.notify(CommonListenerList.java:85) at org.eclipse.mylyn.internal.context.ui.state.ContextStateManager.restoreState(ContextStateManager.java:110) at org.eclipse.mylyn.internal.context.tasks.ui.ContextStatePersistenceHandler.activated(ContextStatePersistenceHandler.java:62) at org.eclipse.mylyn.internal.context.tasks.ui.ContextTasksStartupHandler$ContextActivationListener.contextChanged(ContextTasksStartupHandler.java:115) at org.eclipse.mylyn.internal.context.core.InteractionContextManager$6.run(InteractionContextManager.java:688) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.mylyn.internal.context.core.InteractionContextManager.internalActivateContext(InteractionContextManager.java:679) at org.eclipse.mylyn.internal.context.core.InteractionContextManager.activateContext(InteractionContextManager.java:180) at org.eclipse.mylyn.internal.context.tasks.ui.TaskActivityMonitor$2.taskActivated(TaskActivityMonitor.java:75) at org.eclipse.mylyn.internal.tasks.core.TaskActivityManager.activateTask(TaskActivityManager.java:479) at org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin$TasksUiInitializationJob.runInUIThread(TasksUiPlugin.java:424) at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3529) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3182) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
        Hide
        Andrew Eisenberg added a comment -

        The java.lang.NoSuchMethodError was a problem introduced in the last snapshot build only. Should be fixed in a few hours.

        Show
        Andrew Eisenberg added a comment - The java.lang.NoSuchMethodError was a problem introduced in the last snapshot build only. Should be fixed in a few hours.
        Hide
        John Martin added a comment -

        FYI - I don't know if this is related but I am getting the same error stacktrace as reported above. Today I allowed STS 2.9.2 on my system to perform some regular updates and since then I have been getting the above error (org.codehaus.groovy.ast.ClassNode.addPropertyWithoutField) when opening any groovy or gsp files, which is making my IDE useless.

        java.lang.NoSuchMethodError: org.codehaus.groovy.ast.ClassNode.addPropertyWithoutField(Lorg/codehaus/groovy/ast/PropertyNode;)V
        at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.initializeProperties(JDTClassNode.java:543)
        at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.ensurePropertiesInitialized(JDTClassNode.java:526)
        at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.getProperties(JDTClassNode.java:621)
        at org.codehaus.groovy.classgen.VariableScopeVisitor.findClassMember(VariableScopeVisitor.java:184)
        at org.codehaus.groovy.classgen.VariableScopeVisitor.findClassMember(VariableScopeVisitor.java:188)
        at org.codehaus.groovy.classgen.VariableScopeVisitor.checkVariableNameForDeclaration(VariableScopeVisitor.java:249)
        at org.codehaus.groovy.classgen.VariableScopeVisitor.visitMethodCallExpression(VariableScopeVisitor.java:460)
        at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:75)
        at org.codehaus.groovy.ast.CodeVisitorSupport.visitReturnStatement(CodeVisitorSupport.java:73)
        ...

        Show
        John Martin added a comment - FYI - I don't know if this is related but I am getting the same error stacktrace as reported above. Today I allowed STS 2.9.2 on my system to perform some regular updates and since then I have been getting the above error (org.codehaus.groovy.ast.ClassNode.addPropertyWithoutField) when opening any groovy or gsp files, which is making my IDE useless. java.lang.NoSuchMethodError: org.codehaus.groovy.ast.ClassNode.addPropertyWithoutField(Lorg/codehaus/groovy/ast/PropertyNode;)V at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.initializeProperties(JDTClassNode.java:543) at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.ensurePropertiesInitialized(JDTClassNode.java:526) at org.codehaus.jdt.groovy.internal.compiler.ast.JDTClassNode.getProperties(JDTClassNode.java:621) at org.codehaus.groovy.classgen.VariableScopeVisitor.findClassMember(VariableScopeVisitor.java:184) at org.codehaus.groovy.classgen.VariableScopeVisitor.findClassMember(VariableScopeVisitor.java:188) at org.codehaus.groovy.classgen.VariableScopeVisitor.checkVariableNameForDeclaration(VariableScopeVisitor.java:249) at org.codehaus.groovy.classgen.VariableScopeVisitor.visitMethodCallExpression(VariableScopeVisitor.java:460) at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:75) at org.codehaus.groovy.ast.CodeVisitorSupport.visitReturnStatement(CodeVisitorSupport.java:73) ...
        Hide
        Andrew Eisenberg added a comment -

        Sorry...totally different problem. We put out a bad snapshot a little while ago. This problem is/should be fixed. Make sure you are installing from this update site:

        http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.7/
        or
        http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e4.2 (if using eclipse 4.2)

        Go to Help -> Install new software... In the work with box, add one of the urls above.

        Show
        Andrew Eisenberg added a comment - Sorry...totally different problem. We put out a bad snapshot a little while ago. This problem is/should be fixed. Make sure you are installing from this update site: http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e3.7/ or http://dist.codehaus.org/groovy/distributions/greclipse/snapshot/e4.2 (if using eclipse 4.2) Go to Help -> Install new software... In the work with box, add one of the urls above.
        Hide
        John Martin added a comment -

        Thank you! Using the snapshot update site solved my problem. I had imported the bookmark.xml from http://dist.springsource.com/snapshot/TOOLS/composite/e3.7/bookmarks.xml as stated in the installation instructions for doing updates but that obviously didn't work.

        Show
        John Martin added a comment - Thank you! Using the snapshot update site solved my problem. I had imported the bookmark.xml from http://dist.springsource.com/snapshot/TOOLS/composite/e3.7/bookmarks.xml as stated in the installation instructions for doing updates but that obviously didn't work.
        Hide
        Andrew Eisenberg added a comment -

        Those bookmarks need to be updated. Thanks for pointing this out.

        Show
        Andrew Eisenberg added a comment - Those bookmarks need to be updated. Thanks for pointing this out.

          People

          • Assignee:
            Unassigned
            Reporter:
            Aled Sage
          • Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated: