java.lang.IncompatibleClassChangeError - Groovy issue with JDK 8

Vladimir Ivanov vladimir.x.ivanov at
Thu Jan 9 10:09:31 PST 2014


Thanks for the detailed bug report.

Looks like a JDK bug during LamdaForm compilation to bytecode.
Will try to reproduce it and file a bug.

Best regards,
Vladimir Ivanov

PS: mlvm-dev at or core-libs-dev at are the 
best places to report issues or ask questions about JSR292.

On 1/9/14 9:47 PM, Rory O'Donnell Oracle, Dublin Ireland wrote:
> Hi Jochen,
> CC'ing the lambda-dev mailing list , best place to discuss.
> Rgds, Rory
> On 09/01/2014 16:04, Jochen Theodorou wrote:
>> Am 27.12.2013 14:13, schrieb Rory O'Donnell Oracle, Dublin Ireland:
>> Hi Rory
>> it seems we are suffering a bug for compiled lambda forms in jdk8 for
>> at least b116 to b121. The compiled lambda form seems to produce an
>> incompatible class change error
>> We came to it from the bug report
>> The issue can be reproduce by using a indy enabled version of Groovy
>> and invoking the test case in the comment here:
>> The key point here is that "${new Date()}".toString() fails on
>> invocation number 31. This will create a GStringImpl instance and call
>> toString on it. GStringImpl extend GString, which defines the toString
>> method. GString also implements CharSequence, which (untypically for
>> an interface) defines an abstract toString method. No default method,
>> just an ordinary interface method.
>> For reference GStringImpl
>> and GString
>> Through debugging and other thigs we found out, that after 30
>> invocations the JVM seems to try to invoke CharSequence#toString
>> instead of the implementation.  since the error is
>> "java.lang.IncompatibleClassChangeError: Found interface
>> java.lang.CharSequence, but class was expected" we can safely assume
>> that it is about runtime generated bytecode. Now I know we don't
>> generate code at that point anymore. I also know the lambda form
>> compilation threshold is 30. So if it on invocation number 31, I
>> conclude a strong hint for a bug in lambda form runtime compilation
>> What do you suggest on how to proceed?
>> bye Jochen

More information about the lambda-dev mailing list