Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IncompatibleClassChangeError when running tests with Java 1.8 #281

Open
ddimtirov opened this issue Mar 30, 2015 · 1 comment
Open

IncompatibleClassChangeError when running tests with Java 1.8 #281

ddimtirov opened this issue Mar 30, 2015 · 1 comment

Comments

@ddimtirov
Copy link

java.util.concurrent.ExecutionException: org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.Exception do not match. Expected 4 but got 5
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:192)
    at org.linkedin.glu.agent.impl.script.FutureExecutionImpl.get(FutureExecutionImpl.groovy:95)
    at org.linkedin.glu.agent.impl.script.ScriptManagerImpl.installRootScript(ScriptManagerImpl.groovy:83)
    at org.linkedin.glu.agent.impl.script.StateKeeperScriptManager.installRootScript(StateKeeperScriptManager.groovy:115)
    at org.linkedin.glu.agent.impl.AgentImpl.boot(AgentImpl.groovy:90)
    at org.linkedin.glu.scripts.testFwk.GluScriptBaseTest.setUp(GluScriptBaseTest.groovy:70)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:127)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuper0(ScriptBytecodeAdapter.java:147)
    at MyGlueScriptTest.setUp(MyGlueScriptTest.groovy:5)
    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:130)
Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.Exception do not match. Expected 4 but got 5
    at groovy.lang.Closure.call(Closure.java:276)
    at org.codehaus.groovy.runtime.ConvertedClosure.invokeCustom(ConvertedClosure.java:51)
    at org.codehaus.groovy.runtime.ConversionHandler.invoke(ConversionHandler.java:79)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at org.linkedin.glu.agent.impl.script.FutureExecutionImpl.run(FutureExecutionImpl.groovy:80)
    at org.linkedin.glu.agent.impl.script.ScriptExecution$_closure2.doCall(ScriptExecution.groovy:568)
    at groovy.lang.Closure.call(Closure.java:276)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IncompatibleClassChangeError: the number of constructors during runtime and compile time for java.lang.Exception do not match. Expected 4 but got 5
    at groovy.lang.MetaClassImpl.selectConstructorAndTransformArguments(MetaClassImpl.java:1403)
    at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.selectConstructorAndTransformArguments(ScriptBytecodeAdapter.java:237)
    at org.linkedin.glu.agent.api.AgentException.<init>(AgentException.groovy:33)
    at org.linkedin.glu.agent.api.ScriptException.<init>(ScriptException.groovy:33)
    at org.linkedin.glu.agent.api.ScriptExecutionCauseException.<init>(ScriptExecutionCauseException.groovy:51)
    at org.linkedin.glu.agent.api.ScriptExecutionCauseException.create(ScriptExecutionCauseException.groovy:71)
    at org.linkedin.glu.agent.api.ScriptExecutionException.<init>(ScriptExecutionException.groovy:38)
    at org.linkedin.glu.agent.impl.script.ScriptWrapperImpl$_getAvailableActionsClosures_closure1_closure3_closure4.doCall(ScriptWrapperImpl.groovy:69)
    at org.linkedin.groovy.util.state.StateMachineImpl.doExecute(StateMachineImpl.groovy:391)
    at org.linkedin.groovy.util.state.StateMachineImpl.executeAction(StateMachineImpl.groovy:319)
    at org.linkedin.glu.agent.impl.script.ScriptWrapperImpl$_getAvailableActionsClosures_closure1_closure3.doCall(ScriptWrapperImpl.groovy:60)
    at org.linkedin.glu.agent.impl.script.ScriptWrapperImpl$__clinit__closure2_closure5_closure7.doCall(ScriptWrapperImpl.groovy:42)
    at org.linkedin.glu.agent.impl.script.Invocation.execute(Invocation.groovy:33)
    at org.linkedin.glu.agent.impl.script.FutureExecutionImpl$_closure1.doCall(FutureExecutionImpl.groovy:66)
    ... 43 more

For more details see http://blog.proxerd.pl/article/how-to-fix-incompatibleclasschangeerror-for-your-groovy-projects-running-on-jdk7

@ypujante
Copy link
Member

This issue (that we saw in the past) and that you linked to is related to jdk 1.6 -> jdk 1.7 transition. So I am a bit surprised to see it with jdk 1.8.

Can you please describe the exact steps to reproduce the issue?

I know that there was some company upgrading to 1.8 (http://glu.977617.n3.nabble.com/glu-and-java-8-td4026839.html), but there has not been any follow up so I don't know more.

At this stage glu is not officially supported with 1.8 (that was the point of the forum question to see if there was interest/demand), but would have hoped it simply worked with it.

Yan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants