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

java.lang.IncompatibleClassChangeError: MyClass and MyClass$MyInnerClass disagree on InnerClasses attribute with indy

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.0-rc-4
    • 2.3.1, 2.2.3
    • bytecode
    • None
    • Sun JDK 1.8.0
      Windows 7 64 bits

    Description

      We compile our project using gmavenplus-plugin with the invokeDynamic flag activated. It compiles well.

      But when running our test suite, 2 major issues:

      • It is really really really slower that without invoke dynamic This is the major concern.
      • We see stacktraces like the one below.

      Note: we only have *-indy groovy jars on classpath.

      Errors are all concerning normal inner classes, whether there are static or not. To remove the exceptions, we have to exctract the static or inner class to another file. This is easy for static classes, but for inner classes, it is quite annoying

      java.lang.InternalError: compileToBytecode
              at java.lang.invoke.MethodHandleStatics.newInternalError(MethodHandleStatics.java:97)
              at java.lang.invoke.LambdaForm.compileToBytecode(LambdaForm.java:460)
              at java.lang.invoke.LambdaForm.checkInvocationCounter(LambdaForm.java:634)
              at com.guestful.backend.service.DB$GCollection.findOne(DB.groovy:186)
              at com.guestful.backend.service.DB$GCollection.findOne(DB.groovy)
              at com.guestful.backend.event.handler.GuestfulJobListener.onJobTriggered(GuestfulJobListener.groovy:128)
              at com.ovea.tajin.framework.async.DefaultJobScheduler$JobRunner.run(DefaultJobScheduler.groovy:255)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
              at com.ovea.tajin.framework.async.guice.AsyncModule$Task.run(AsyncModule.groovy:154)
              at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)
              at com.ovea.tajin.framework.async.guice.AsyncModule$ExecutorProvider$5.execute(AsyncModule.groovy:129)
              at com.ovea.tajin.framework.async.DefaultJobScheduler.doSchedule(DefaultJobScheduler.groovy:227)
              at com.ovea.tajin.framework.async.DefaultJobScheduler.doSchedule(DefaultJobScheduler.groovy)
              at com.ovea.tajin.framework.async.DefaultJobScheduler.this$2$doSchedule(DefaultJobScheduler.groovy)
              at com.ovea.tajin.framework.async.DefaultJobScheduler.schedule(DefaultJobScheduler.groovy:203)
              at com.guestful.backend.event.handler.Sms.schedule(Sms.groovy:92)
              at com.guestful.backend.event.handler.Sms.this$2$schedule(Sms.groovy)
              at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
              at com.guestful.backend.event.handler.Sms.onReservationEdited(Sms.groovy:83)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:483)
              at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
              at com.ovea.tajin.framework.async.guava.EventHandler.handleEvent(EventHandler.groovy:72)
              at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
              at com.ovea.tajin.framework.async.guava.AsyncEventBus$1.run(AsyncEventBus.groovy:100)
              at com.ovea.tajin.framework.async.guice.AsyncModule$Task.run(AsyncModule.groovy:154)
              at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)
              at com.ovea.tajin.framework.async.guice.AsyncModule$ExecutorProvider$5.execute(AsyncModule.groovy:129)
              at com.ovea.tajin.framework.async.guava.AsyncEventBus.dispatch(AsyncEventBus.groovy:97)
              at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
              at com.ovea.tajin.framework.async.guava.AsyncEventBus.dispatchQueuedEvents(AsyncEventBus.groovy:85)
              at com.ovea.tajin.framework.async.guava.EventBus.post(EventBus.groovy:262)
              at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
              at com.ovea.tajin.framework.async.EventBusDispatcher$_broadcast_closure1.doCall(EventBusDispatcher.groovy:69)
              at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:483)
              at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
              at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
              at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
              at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:909)
              at groovy.lang.Closure.call(Closure.java:423)
              at groovy.lang.Closure.call(Closure.java:439)
              at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1373)
              at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1304)
              at com.ovea.tajin.framework.async.EventBusDispatcher.broadcast(EventBusDispatcher.groovy:61)
              at org.codehaus.groovy.vmplugin.v7.IndyInterface.selectMethod(IndyInterface.java:215)
              at com.guestful.backend.rest.ReservationResource.editPublicReservation(ReservationResource.groovy:308)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:483)
              at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
              at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
              at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
              at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$VoidOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:136)
              at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
              at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:406)
              at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:350)
              at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:106)
              at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:259)
              at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
              at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
              at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
              at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
              at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
              at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:320)
              at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236)
              at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1028)
              at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373)
              at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:381)
              at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:344)
              at com.ovea.tajin.framework.support.jetty.Container$Jersey.super$4$service(Container.groovy)
              at sun.reflect.GeneratedMethodAccessor274.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:483)
              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:1085)
              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
              at com.ovea.tajin.framework.support.jetty.Container$Jersey.service(Container.groovy:207)
              at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1651)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:66)
              at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
              at com.ovea.tajin.framework.support.shiro.GuiceShiroFilter.super$6$executeChain(GuiceShiroFilter.groovy)
              at sun.reflect.GeneratedMethodAccessor273.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:483)
              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:1085)
              at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:128)
              at com.ovea.tajin.framework.support.shiro.GuiceShiroFilter.executeChain(GuiceShiroFilter.groovy:60)
              at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
              at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
              at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
              at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
              at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
              at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
              at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:164)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
              at com.mycila.guice.ext.web.HttpContextFilter.doFilter(HttpContextFilter.java:47)
              at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:164)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
              at org.eclipse.jetty.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:248)
              at org.eclipse.jetty.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:211)
              at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:164)
              at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58)
              at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:120)
              at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:115)
              at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1622)
              at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:549)
              at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:219)
              at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)
              at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478)
              at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183)
              at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)
              at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
              at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:109)
              at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
              at org.eclipse.jetty.server.Server.handle(Server.java:462)
              at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)
              at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)
              at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)
              at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
              at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
              at java.lang.Thread.run(Thread.java:744)
      Caused by: java.lang.IncompatibleClassChangeError: com.guestful.backend.service.DB and com.guestful.backend.service.DB$GCollection disagree on InnerClasses attribute
              at java.lang.Class.getDeclaringClass0(Native Method)
              at java.lang.Class.getDeclaringClass(Class.java:1222)
              at java.lang.Class.getEnclosingClass(Class.java:1264)
              at java.lang.Class.getSimpleBinaryName(Class.java:1430)
              at java.lang.Class.getSimpleName(Class.java:1296)
              at java.lang.Class.isAnonymousClass(Class.java:1398)
              at java.lang.invoke.InvokerBytecodeGenerator.isStaticallyInvocable(InvokerBytecodeGenerator.java:590)
              at java.lang.invoke.InvokerBytecodeGenerator.generateCustomizedCodeBytes(InvokerBytecodeGenerator.java:519)
              at java.lang.invoke.InvokerBytecodeGenerator.generateCustomizedCode(InvokerBytecodeGenerator.java:490)
              at java.lang.invoke.LambdaForm.compileToBytecode(LambdaForm.java:454)
              ... 130 common frames omitted
      

      Attachments

        Issue Links

          Activity

            People

              melix Cédric Champeau
              kha Mathieu Carbou
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: