[groovy-user] VerifyError on Compilation

11 views
Skip to first unread message

lynchie

unread,
Nov 2, 2012, 6:44:11 AM11/2/12
to us...@groovy.codehaus.org
Hi,

I was attempting to test our product on the latest grails 2.2 RC which uses
groovy 2.0.5. All works well on grails 2.1.1 / groovy 1.8.8 but fails on
groovy 2.0.5 with the stack trace below.

The inner class is a enum declared in the domain model as enum CategoryType
{CAT1,CAT2,CAT3}
If I remove the unit test that uses this domain, it will fail on the next
domain class that has an enum with the same VerifyError.

Have I missed some groovy 2 change around enums or is this a bug?

I'm assuming this is not grails related but groovy related as the stacktrace
below suggests.

Can anybody shed some light on this?

Thanks
Stephen

| Compiling 57 source files
[testc] Compiling 57 source files to
C:\dev\projects\xxx\target\test-classes\unit
| Compiling 57 source files.
| Error Compilation error compiling [unit] tests: (class:
com/xxx/xxx/model/questionnaire/QuestionCategory$CategoryType, method:
unsupported signature: (Ljava/lang/Object;)V) Incompatible type for getting
or setting field
java.lang.VerifyError: (class:
com/xxx/xxx/model/questionnaire/QuestionCategory$CategoryType, method:
unsupported signature: (Ljava/lang/Object;)V) Incompatible type for getting
or setting field
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
at java.lang.Class.getDeclaredFields(Class.java:1743)
at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:321)
at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:262)
at org.codehaus.groovy.ast.ClassNode.getInterfaces(ClassNode.java:356)
at org.codehaus.groovy.ast.ClassNode.declaresInterface(ClassNode.java:946)
at
org.codehaus.groovy.ast.ClassNode.implementsInterface(ClassNode.java:926)
at
org.codehaus.groovy.ast.ClassNode.isDerivedFromGroovyObject(ClassNode.java:916)
at
org.codehaus.groovy.classgen.AsmClassGenerator.isGroovyObject(AsmClassGenerator.java:1092)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitPropertyExpression(AsmClassGenerator.java:1049)
at
org.codehaus.groovy.ast.expr.PropertyExpression.visit(PropertyExpression.java:55)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitMapExpression(AsmClassGenerator.java:1453)
at org.codehaus.groovy.ast.expr.MapExpression.visit(MapExpression.java:53)
at
org.codehaus.groovy.classgen.asm.CallSiteWriter.makeCallSite(CallSiteWriter.java:301)
at
org.codehaus.groovy.classgen.asm.InvocationWriter.writeInvokeConstructor(InvocationWriter.java:442)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorCallExpression(AsmClassGenerator.java:909)
at
org.codehaus.groovy.ast.expr.ConstructorCallExpression.visit(ConstructorCallExpression.java:43)
at
org.codehaus.groovy.classgen.asm.BinaryExpressionHelper.evaluateEqual(BinaryExpressionHelper.java:295)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitDeclarationExpression(AsmClassGenerator.java:522)
at
org.codehaus.groovy.ast.expr.DeclarationExpression.visit(DeclarationExpression.java:87)
at
org.codehaus.groovy.classgen.asm.StatementWriter.writeExpressionStatement(StatementWriter.java:604)
at
org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeExpressionStatement(OptimizingStatementWriter.java:354)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitExpressionStatement(AsmClassGenerator.java:509)
at
org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
at
org.codehaus.groovy.classgen.asm.StatementWriter.writeBlockStatement(StatementWriter.java:81)
at
org.codehaus.groovy.classgen.asm.OptimizingStatementWriter.writeBlockStatement(OptimizingStatementWriter.java:155)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitBlockStatement(AsmClassGenerator.java:455)
at
org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
at
org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClassCodeContainer(ClassCodeVisitorSupport.java:101)
at
org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitConstructorOrMethod(ClassCodeVisitorSupport.java:112)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitStdMethod(AsmClassGenerator.java:319)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitConstructorOrMethod(AsmClassGenerator.java:276)
at
org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitMethod(ClassCodeVisitorSupport.java:123)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitMethod(AsmClassGenerator.java:396)
at org.codehaus.groovy.ast.ClassNode.visitContents(ClassNode.java:1056)
at
org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitClass(ClassCodeVisitorSupport.java:50)
at
org.codehaus.groovy.classgen.AsmClassGenerator.visitClass(AsmClassGenerator.java:180)
at
org.codehaus.groovy.control.CompilationUnit$14.call(CompilationUnit.java:786)
at
org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1027)
at
org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:564)
at
org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:542)
at
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:519)
at
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:498)
at
org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:57)
at
org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:213)
at org.codehaus.groovy.ant.Groovyc.runCompiler(Groovyc.java:947)
at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:994)
at org.codehaus.groovy.grails.compiler.Grailsc.compile(Grailsc.java:79)
at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:630)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.GeneratedMethodAccessor123.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 groovy.util.AntBuilder.performTask(AntBuilder.java:260)
at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:220)
at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147)
at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:170)
at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
at org.codehaus.gant.GantBuilder.invokeMethod(GantBuilder.java:99)
at
org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:854)
at
org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:831)
at
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:164)
at _GrailsTest_groovy$_run_closure3.doCall(_GrailsTest_groovy:266)
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.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:272)
at
org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
at _GrailsTest_groovy$_run_closure3.call(_GrailsTest_groovy)
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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1076)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906)
at
groovy.lang.MetaClassImpl.invokePropertyOrMissing(MetaClassImpl.java:1122)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1078)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:727)
at
groovy.lang.GroovyObjectSupport.invokeMethod(GroovyObjectSupport.java:44)
at groovy.lang.Script.invokeMethod(Script.java:78)
at
groovy.lang.MetaClassImpl.invokeMethodOnGroovyObject(MetaClassImpl.java:1141)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906)
at
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
at _GrailsTest_groovy$_run_closure2.doCall(_GrailsTest_groovy:245)
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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1076)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906)
at groovy.lang.Closure.call(Closure.java:415)
at groovy.lang.Closure.call(Closure.java:428)
at
org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1326)




--
View this message in context: http://groovy.329449.n5.nabble.com/VerifyError-on-Compilation-tp5711818.html
Sent from the groovy - user mailing list archive at Nabble.com.

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

http://xircles.codehaus.org/manage_email


Jochen Theodorou

unread,
Nov 3, 2012, 1:28:31 PM11/3/12
to us...@groovy.codehaus.org
Am 02.11.2012 11:44, schrieb lynchie:
> Hi,
>
> I was attempting to test our product on the latest grails 2.2 RC which uses
> groovy 2.0.5. All works well on grails 2.1.1 / groovy 1.8.8 but fails on
> groovy 2.0.5 with the stack trace below.
>
> The inner class is a enum declared in the domain model as enum CategoryType
> {CAT1,CAT2,CAT3}
> If I remove the unit test that uses this domain, it will fail on the next
> domain class that has an enum with the same VerifyError.
>
> Have I missed some groovy 2 change around enums or is this a bug?
>
> I'm assuming this is not grails related but groovy related as the stacktrace
> below suggests.
>
> Can anybody shed some light on this?

A VerifyError is always a bug. But it puzzles me that it is ok with
1.8.8 and not with 2.0.5. I am currently not aware of a change in that
part. But the Grails versions are not the same. ven if the bug is shown
from within the compiler, this does mean nothing here. What we need is a
minimal example that shows the problem in standalone Groovy.

bye blackdrag

--
Jochen "blackdrag" Theodorou - Groovy Project Tech Lead
blog: http://blackdragsview.blogspot.com/
german groovy discussion newsgroup: de.comp.lang.misc
For Groovy programming sources visit http://groovy-lang.org

lynchie

unread,
Nov 5, 2012, 12:03:57 PM11/5/12
to us...@groovy.codehaus.org
Hi Blackdrag,

I've created a standalone grails project that reproduces the error. I cant
reproduce it using a standalone groovy project. I'm assuming its due to
grails adding extra methods to the domain class. Should I raise a ticket
within groovy and attach the grails project or should I raise the jira
ticket with grails?

Thanks
Stephen



--
View this message in context: http://groovy.329449.n5.nabble.com/VerifyError-on-Compilation-tp5711818p5711842.html
Sent from the groovy - user mailing list archive at Nabble.com.

Reply all
Reply to author
Forward
0 new messages