Problem in JDTAnnotatioNode.createExpressionFor

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem in JDTAnnotatioNode.createExpressionFor

Andrey Bloschetsov
Hi all,

This error associated with @CompileStatic and repeated periodically. I
could not determine the exact cause of this error.

My Env:
Groovy/Grails Tool Suite Version: 3.0.0.M2 Build Id: 201206120636;
Groovy-Eclipse plugin Version: 2.6.1.xx-20120620-1100-e42-RELEASE;
OracleJDK 1.7.0_04-b20 (64-Bit)
Ubuntu 12.04 (64-bit)


General error during instruction selection: Problem in
JDTAnnotatioNode.createExpressionFor(binding=I (id=10) value=(int)1)

org.codehaus.jdt.groovy.internal.compiler.ast.GroovyEclipseBug:
Problem in JDTAnnotatioNode.createExpressionFor(binding=I (id=10)
value=(int)1)
        at org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.createExpressionFor(JDTAnnotationNode.java:173)
        at org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.ensureMembersInitialized(JDTAnnotationNode.java:141)
        at org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.getMember(JDTAnnotationNode.java:65)
        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.pickInferredTypeFromMethodAnnotation(StaticTypeCheckingVisitor.java:1313)
        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:1518)
        at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:196)
        at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:67)
        at org.codehaus.groovy.ast.CodeVisitorSupport.visitReturnStatement(CodeVisitorSupport.java:73)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitReturnStatement(ClassCodeVisitorSupport.java:224)
        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitReturnStatement(StaticTypeCheckingVisitor.java:1012)
        at org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.java:47)
        at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:179)
        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.transform.stc.StaticTypeCheckingVisitor.visitConstructorOrMethod(StaticTypeCheckingVisitor.java:1003)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:124)
        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethod(StaticTypeCheckingVisitor.java:1184)
        at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethod(StaticCompilationVisitor.java:108)
        at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1169)
        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:51)
        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClass(StaticTypeCheckingVisitor.java:206)
        at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitClass(StaticCompilationVisitor.java:99)
        at org.codehaus.groovy.transform.sc.StaticCompileTransformation.visit(StaticCompileTransformation.java:57)
        at org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(ASTTransformationVisitor.java:169)
        at org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTransformationVisitor.java:242)
        at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1190)
        at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:622)
        at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:600)
        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:577)
        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:1534)
        at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:838)
        at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
        at java.lang.Thread.run(Thread.java:722)


--
С наилучшими пожеланиями,
Андрей Блощецов.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Problem in JDTAnnotatioNode.createExpressionFor

Andrew Eisenberg
It looks like Groovy-Eclipse is getting tripped up over an annotation
value that is unexpected.  Do you know which file this is happening in
and can you attach it or send directly to me?

On Thu, Jun 21, 2012 at 11:55 PM, Andrey Bloschetsov
<[hidden email]> wrote:

> Hi all,
>
> This error associated with @CompileStatic and repeated periodically. I
> could not determine the exact cause of this error.
>
> My Env:
> Groovy/Grails Tool Suite Version: 3.0.0.M2 Build Id: 201206120636;
> Groovy-Eclipse plugin Version: 2.6.1.xx-20120620-1100-e42-RELEASE;
> OracleJDK 1.7.0_04-b20 (64-Bit)
> Ubuntu 12.04 (64-bit)
>
>
> General error during instruction selection: Problem in
> JDTAnnotatioNode.createExpressionFor(binding=I (id=10) value=(int)1)
>
> org.codehaus.jdt.groovy.internal.compiler.ast.GroovyEclipseBug:
> Problem in JDTAnnotatioNode.createExpressionFor(binding=I (id=10)
> value=(int)1)
>        at org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.createExpressionFor(JDTAnnotationNode.java:173)
>        at org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.ensureMembersInitialized(JDTAnnotationNode.java:141)
>        at org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.getMember(JDTAnnotationNode.java:65)
>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.pickInferredTypeFromMethodAnnotation(StaticTypeCheckingVisitor.java:1313)
>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:1518)
>        at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:196)
>        at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:67)
>        at org.codehaus.groovy.ast.CodeVisitorSupport.visitReturnStatement(CodeVisitorSupport.java:73)
>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitReturnStatement(ClassCodeVisitorSupport.java:224)
>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitReturnStatement(StaticTypeCheckingVisitor.java:1012)
>        at org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.java:47)
>        at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:179)
>        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.transform.stc.StaticTypeCheckingVisitor.visitConstructorOrMethod(StaticTypeCheckingVisitor.java:1003)
>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:124)
>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethod(StaticTypeCheckingVisitor.java:1184)
>        at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethod(StaticCompilationVisitor.java:108)
>        at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1169)
>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:51)
>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClass(StaticTypeCheckingVisitor.java:206)
>        at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitClass(StaticCompilationVisitor.java:99)
>        at org.codehaus.groovy.transform.sc.StaticCompileTransformation.visit(StaticCompileTransformation.java:57)
>        at org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(ASTTransformationVisitor.java:169)
>        at org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTransformationVisitor.java:242)
>        at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1190)
>        at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:622)
>        at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:600)
>        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:577)
>        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:1534)
>        at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:838)
>        at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
>        at java.lang.Thread.run(Thread.java:722)
>
>
> --
> С наилучшими пожеланиями,
> Андрей Блощецов.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Problem in JDTAnnotatioNode.createExpressionFor

Andrey Bloschetsov
I found that the problem lies in the BeanDbo.groovy, it look like this:

@CompileStatic
@EqualsAndHashCode(useCanEqual = false, includes = 'id')
class BeanDbo {

        String id

        // more fields
}

But the error occur in another file (over package signature), which
uses the BookDbo class. When an error occurs, I comment the line with
EqualsAndHashCode annotation and save source code. After this the
error disappears. If uncomment the line, the error will be gone for a
while.

2012/6/22 Andrew Eisenberg <[hidden email]>:

> It looks like Groovy-Eclipse is getting tripped up over an annotation
> value that is unexpected.  Do you know which file this is happening in
> and can you attach it or send directly to me?
>
> On Thu, Jun 21, 2012 at 11:55 PM, Andrey Bloschetsov
> <[hidden email]> wrote:
>> Hi all,
>>
>> This error associated with @CompileStatic and repeated periodically. I
>> could not determine the exact cause of this error.
>>
>> My Env:
>> Groovy/Grails Tool Suite Version: 3.0.0.M2 Build Id: 201206120636;
>> Groovy-Eclipse plugin Version: 2.6.1.xx-20120620-1100-e42-RELEASE;
>> OracleJDK 1.7.0_04-b20 (64-Bit)
>> Ubuntu 12.04 (64-bit)
>>
>>
>> General error during instruction selection: Problem in
>> JDTAnnotatioNode.createExpressionFor(binding=I (id=10) value=(int)1)
>>
>> org.codehaus.jdt.groovy.internal.compiler.ast.GroovyEclipseBug:
>> Problem in JDTAnnotatioNode.createExpressionFor(binding=I (id=10)
>> value=(int)1)
>>        at org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.createExpressionFor(JDTAnnotationNode.java:173)
>>        at org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.ensureMembersInitialized(JDTAnnotationNode.java:141)
>>        at org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.getMember(JDTAnnotationNode.java:65)
>>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.pickInferredTypeFromMethodAnnotation(StaticTypeCheckingVisitor.java:1313)
>>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethodCallExpression(StaticTypeCheckingVisitor.java:1518)
>>        at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethodCallExpression(StaticCompilationVisitor.java:196)
>>        at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:67)
>>        at org.codehaus.groovy.ast.CodeVisitorSupport.visitReturnStatement(CodeVisitorSupport.java:73)
>>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitReturnStatement(ClassCodeVisitorSupport.java:224)
>>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitReturnStatement(StaticTypeCheckingVisitor.java:1012)
>>        at org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.java:47)
>>        at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:35)
>>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:179)
>>        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.transform.stc.StaticTypeCheckingVisitor.visitConstructorOrMethod(StaticTypeCheckingVisitor.java:1003)
>>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:124)
>>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMethod(StaticTypeCheckingVisitor.java:1184)
>>        at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethod(StaticCompilationVisitor.java:108)
>>        at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1169)
>>        at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:51)
>>        at org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClass(StaticTypeCheckingVisitor.java:206)
>>        at org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitClass(StaticCompilationVisitor.java:99)
>>        at org.codehaus.groovy.transform.sc.StaticCompileTransformation.visit(StaticCompileTransformation.java:57)
>>        at org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(ASTTransformationVisitor.java:169)
>>        at org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTransformationVisitor.java:242)
>>        at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1190)
>>        at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:622)
>>        at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:600)
>>        at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:577)
>>        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:1534)
>>        at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:838)
>>        at org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137)
>>        at java.lang.Thread.run(Thread.java:722)
>>
>>
>> --
>> С наилучшими пожеланиями,
>> Андрей Блощецов.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>



--
С наилучшими пожеланиями,
Андрей Блощецов.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

RE: Problem in JDTAnnotatioNode.createExpressionFor

Kirk Rasmussen
It's been too long but I have a vague memory of the @ToString annotation causing similar failure like this. Sorry I couldn't be more helpful but hopefully this will give an additional clue to the root cause.

-----Original Message-----
From: Andrey Bloschetsov [mailto:[hidden email]]
Sent: Friday, June 22, 2012 1:33 PM
To: [hidden email]
Subject: Re: [groovy-eclipse-plugin-dev] Problem in JDTAnnotatioNode.createExpressionFor

I found that the problem lies in the BeanDbo.groovy, it look like this:

@CompileStatic
@EqualsAndHashCode(useCanEqual = false, includes = 'id') class BeanDbo {

        String id

        // more fields
}

But the error occur in another file (over package signature), which uses the BookDbo class. When an error occurs, I comment the line with EqualsAndHashCode annotation and save source code. After this the error disappears. If uncomment the line, the error will be gone for a while.

2012/6/22 Andrew Eisenberg <[hidden email]>:

> It looks like Groovy-Eclipse is getting tripped up over an annotation
> value that is unexpected.  Do you know which file this is happening in
> and can you attach it or send directly to me?
>
> On Thu, Jun 21, 2012 at 11:55 PM, Andrey Bloschetsov
> <[hidden email]> wrote:
>> Hi all,
>>
>> This error associated with @CompileStatic and repeated periodically.
>> I could not determine the exact cause of this error.
>>
>> My Env:
>> Groovy/Grails Tool Suite Version: 3.0.0.M2 Build Id: 201206120636;
>> Groovy-Eclipse plugin Version: 2.6.1.xx-20120620-1100-e42-RELEASE;
>> OracleJDK 1.7.0_04-b20 (64-Bit)
>> Ubuntu 12.04 (64-bit)
>>
>>
>> General error during instruction selection: Problem in
>> JDTAnnotatioNode.createExpressionFor(binding=I (id=10) value=(int)1)
>>
>> org.codehaus.jdt.groovy.internal.compiler.ast.GroovyEclipseBug:
>> Problem in JDTAnnotatioNode.createExpressionFor(binding=I (id=10)
>> value=(int)1)
>>        at
>> org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.creat
>> eExpressionFor(JDTAnnotationNode.java:173)
>>        at
>> org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.ensur
>> eMembersInitialized(JDTAnnotationNode.java:141)
>>        at
>> org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.getMe
>> mber(JDTAnnotationNode.java:65)
>>        at
>> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.pickInfer
>> redTypeFromMethodAnnotation(StaticTypeCheckingVisitor.java:1313)
>>        at
>> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMeth
>> odCallExpression(StaticTypeCheckingVisitor.java:1518)
>>        at
>> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethod
>> CallExpression(StaticCompilationVisitor.java:196)
>>        at
>> org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExp
>> ression.java:67)
>>        at
>> org.codehaus.groovy.ast.CodeVisitorSupport.visitReturnStatement(CodeV
>> isitorSupport.java:73)
>>        at
>> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitReturnStatement(
>> ClassCodeVisitorSupport.java:224)
>>        at
>> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitRetu
>> rnStatement(StaticTypeCheckingVisitor.java:1012)
>>        at
>> org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.ja
>> va:47)
>>        at
>> org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVi
>> sitorSupport.java:35)
>>        at
>> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(C
>> lassCodeVisitorSupport.java:179)
>>        at
>> org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java
>> :69)
>>        at
>> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContain
>> er(ClassCodeVisitorSupport.java:102)
>>        at
>> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMet
>> hod(ClassCodeVisitorSupport.java:113)
>>        at
>> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitCons
>> tructorOrMethod(StaticTypeCheckingVisitor.java:1003)
>>        at
>> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCode
>> VisitorSupport.java:124)
>>        at
>> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMeth
>> od(StaticTypeCheckingVisitor.java:1184)
>>        at
>> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethod
>> (StaticCompilationVisitor.java:108)
>>        at
>> org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1169)
>>        at
>> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeV
>> isitorSupport.java:51)
>>        at
>> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClas
>> s(StaticTypeCheckingVisitor.java:206)
>>        at
>> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitClass(
>> StaticCompilationVisitor.java:99)
>>        at
>> org.codehaus.groovy.transform.sc.StaticCompileTransformation.visit(St
>> aticCompileTransformation.java:57)
>>        at
>> org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(AST
>> TransformationVisitor.java:169)
>>        at
>> org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTran
>> sformationVisitor.java:242)
>>        at
>> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(
>> CompilationUnit.java:1190)
>>        at
>> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(Compilat
>> ionUnit.java:622)
>>        at
>> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(Co
>> mpilationUnit.java:600)
>>        at
>> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.j
>> ava:577)
>>        at
>> org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDe
>> claration.processToPhase(GroovyCompilationUnitDeclaration.java:171)
>>        at
>> org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDe
>> claration.generateCode(GroovyCompilationUnitDeclaration.java:1534)
>>        at
>> org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:838)
>>        at
>> org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskM
>> anager.java:137)
>>        at java.lang.Thread.run(Thread.java:722)
>>
>>
>> --
>> С наилучшими пожеланиями,
>> Андрей Блощецов.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>



--
С наилучшими пожеланиями,
Андрей Блощецов.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: Problem in JDTAnnotatioNode.createExpressionFor

Andrew Eisenberg
Thanks for the feedback both of you.

I raised this issue:
http://jira.codehaus.org/browse/GRECLIPSE-1447

I'm guessing that @CompileStatic is transforming the
@EqualsAndHashCode annotation in a way that we are not expecting.
We'll have a look.

On Fri, Jun 22, 2012 at 11:35 AM, Kirk Rasmussen
<[hidden email]> wrote:

> It's been too long but I have a vague memory of the @ToString annotation causing similar failure like this. Sorry I couldn't be more helpful but hopefully this will give an additional clue to the root cause.
>
> -----Original Message-----
> From: Andrey Bloschetsov [mailto:[hidden email]]
> Sent: Friday, June 22, 2012 1:33 PM
> To: [hidden email]
> Subject: Re: [groovy-eclipse-plugin-dev] Problem in JDTAnnotatioNode.createExpressionFor
>
> I found that the problem lies in the BeanDbo.groovy, it look like this:
>
> @CompileStatic
> @EqualsAndHashCode(useCanEqual = false, includes = 'id') class BeanDbo {
>
>        String id
>
>        // more fields
> }
>
> But the error occur in another file (over package signature), which uses the BookDbo class. When an error occurs, I comment the line with EqualsAndHashCode annotation and save source code. After this the error disappears. If uncomment the line, the error will be gone for a while.
>
> 2012/6/22 Andrew Eisenberg <[hidden email]>:
>> It looks like Groovy-Eclipse is getting tripped up over an annotation
>> value that is unexpected.  Do you know which file this is happening in
>> and can you attach it or send directly to me?
>>
>> On Thu, Jun 21, 2012 at 11:55 PM, Andrey Bloschetsov
>> <[hidden email]> wrote:
>>> Hi all,
>>>
>>> This error associated with @CompileStatic and repeated periodically.
>>> I could not determine the exact cause of this error.
>>>
>>> My Env:
>>> Groovy/Grails Tool Suite Version: 3.0.0.M2 Build Id: 201206120636;
>>> Groovy-Eclipse plugin Version: 2.6.1.xx-20120620-1100-e42-RELEASE;
>>> OracleJDK 1.7.0_04-b20 (64-Bit)
>>> Ubuntu 12.04 (64-bit)
>>>
>>>
>>> General error during instruction selection: Problem in
>>> JDTAnnotatioNode.createExpressionFor(binding=I (id=10) value=(int)1)
>>>
>>> org.codehaus.jdt.groovy.internal.compiler.ast.GroovyEclipseBug:
>>> Problem in JDTAnnotatioNode.createExpressionFor(binding=I (id=10)
>>> value=(int)1)
>>>        at
>>> org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.creat
>>> eExpressionFor(JDTAnnotationNode.java:173)
>>>        at
>>> org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.ensur
>>> eMembersInitialized(JDTAnnotationNode.java:141)
>>>        at
>>> org.codehaus.jdt.groovy.internal.compiler.ast.JDTAnnotationNode.getMe
>>> mber(JDTAnnotationNode.java:65)
>>>        at
>>> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.pickInfer
>>> redTypeFromMethodAnnotation(StaticTypeCheckingVisitor.java:1313)
>>>        at
>>> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMeth
>>> odCallExpression(StaticTypeCheckingVisitor.java:1518)
>>>        at
>>> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethod
>>> CallExpression(StaticCompilationVisitor.java:196)
>>>        at
>>> org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExp
>>> ression.java:67)
>>>        at
>>> org.codehaus.groovy.ast.CodeVisitorSupport.visitReturnStatement(CodeV
>>> isitorSupport.java:73)
>>>        at
>>> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitReturnStatement(
>>> ClassCodeVisitorSupport.java:224)
>>>        at
>>> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitRetu
>>> rnStatement(StaticTypeCheckingVisitor.java:1012)
>>>        at
>>> org.codehaus.groovy.ast.stmt.ReturnStatement.visit(ReturnStatement.ja
>>> va:47)
>>>        at
>>> org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVi
>>> sitorSupport.java:35)
>>>        at
>>> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(C
>>> lassCodeVisitorSupport.java:179)
>>>        at
>>> org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java
>>> :69)
>>>        at
>>> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContain
>>> er(ClassCodeVisitorSupport.java:102)
>>>        at
>>> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMet
>>> hod(ClassCodeVisitorSupport.java:113)
>>>        at
>>> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitCons
>>> tructorOrMethod(StaticTypeCheckingVisitor.java:1003)
>>>        at
>>> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCode
>>> VisitorSupport.java:124)
>>>        at
>>> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitMeth
>>> od(StaticTypeCheckingVisitor.java:1184)
>>>        at
>>> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitMethod
>>> (StaticCompilationVisitor.java:108)
>>>        at
>>> org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1169)
>>>        at
>>> org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeV
>>> isitorSupport.java:51)
>>>        at
>>> org.codehaus.groovy.transform.stc.StaticTypeCheckingVisitor.visitClas
>>> s(StaticTypeCheckingVisitor.java:206)
>>>        at
>>> org.codehaus.groovy.transform.sc.StaticCompilationVisitor.visitClass(
>>> StaticCompilationVisitor.java:99)
>>>        at
>>> org.codehaus.groovy.transform.sc.StaticCompileTransformation.visit(St
>>> aticCompileTransformation.java:57)
>>>        at
>>> org.codehaus.groovy.transform.ASTTransformationVisitor.visitClass(AST
>>> TransformationVisitor.java:169)
>>>        at
>>> org.codehaus.groovy.transform.ASTTransformationVisitor$2.call(ASTTran
>>> sformationVisitor.java:242)
>>>        at
>>> org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(
>>> CompilationUnit.java:1190)
>>>        at
>>> org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(Compilat
>>> ionUnit.java:622)
>>>        at
>>> org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(Co
>>> mpilationUnit.java:600)
>>>        at
>>> org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.j
>>> ava:577)
>>>        at
>>> org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDe
>>> claration.processToPhase(GroovyCompilationUnitDeclaration.java:171)
>>>        at
>>> org.codehaus.jdt.groovy.internal.compiler.ast.GroovyCompilationUnitDe
>>> claration.generateCode(GroovyCompilationUnitDeclaration.java:1534)
>>>        at
>>> org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:838)
>>>        at
>>> org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskM
>>> anager.java:137)
>>>        at java.lang.Thread.run(Thread.java:722)
>>>
>>>
>>> --
>>> С наилучшими пожеланиями,
>>> Андрей Блощецов.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>    http://xircles.codehaus.org/manage_email
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>
>
>
> --
> С наилучшими пожеланиями,
> Андрей Блощецов.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email