Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6080

IncompatibleClassChangeError: the number of constructors during runtime and compile time

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.2
    • Fix Version/s: 2.1.9, 2.2.0-rc-2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Java 6, Java 7

      Description

      Exception classes compiled with Java 6 raise the following error running the application using Java 7

      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:1410) ~[groovy-all-2.1.2.jar:2.1.2]
      at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.selectConstructorAndTransformArguments(ScriptBytecodeAdapter.java:234) ~[groovy-all-2.1.2.jar:2.1.2]
      at nextflow.exception.TaskValidationException.<init>(TaskValidationException.groovy) ~[main.jar:na]
      at nextflow.exception.InvalidExitException.<init>(TaskValidationException.groovy) ~[main.jar:na]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.7.0_09]
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.7.0_09]
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) ~[na:1.7.0_09]
      at java.lang.reflect.Constructor.newInstance(Unknown Source) ~[na:1.7.0_09]
      at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77) ~[groovy-all-2.1.2.jar:2.1.2]
      at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:71) ~[groovy-all-2.1.2.jar:2.1.2]
      at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:81) ~[groovy-all-2.1.2.jar:2.1.2]
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57) ~[groovy-all-2.1.2.jar:2.1.2]
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182) ~[groovy-all-2.1.2.jar:2.1.2]
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190) ~[groovy-all-2.1.2.jar:2.1.2]

      See also

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

        Attachments

          Activity

            People

            • Assignee:
              melix C├ędric Champeau
              Reporter:
              pablo72 paolo di tommaso
            • Votes:
              7 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: