java.lang.instrument.IllegalClassFormatException: Error while instrumenting class org/eclipse/milo/opcua/stack/core/Identifiers.

GitHub | kartben | 7 months ago
  1. 0

    "java.lang.RuntimeException: Method code too large!" when building Eclipse Milo

    GitHub | 7 months ago | kartben
    java.lang.instrument.IllegalClassFormatException: Error while instrumenting class org/eclipse/milo/opcua/stack/core/Identifiers.
  2. 0

    Method code too large - Clover Knowledge Base - Atlassian Documentation

    atlassian.com | 1 year ago
    java.lang.RuntimeException: Method code too large!
  3. 0

    RuntimeException during startup: Method code too large!

    GitHub | 2 years ago | caraboides
    java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    trace命令在处理大方法时会出现编译错误

    GitHub | 1 year ago | oldmanpushcart
    java.lang.RuntimeException: Method code too large!
  6. 0

    Our coverage was working fine until we upgraded to Grails 2.4.3. Now, we are getting this error only when clover is enabled for the build: {code} [22:26:30]| Error Compilation error compiling [integration] tests: startup failed: [22:26:30]General error during class generation: Method code too large! [22:26:30] [22:26:30]java.lang.RuntimeException: Method code too large! [22:26:30] at groovyjarjarasm.asm.MethodWriter.a(Unknown Source) [22:26:30] at groovyjarjarasm.asm.ClassWriter.toByteArray(Unknown Source) [22:26:30] at org.codehaus.groovy.control.CompilationUnit$16.call(CompilationUnit.java:807) [22:26:30] at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1047) [22:26:30] at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:583) [22:26:30] at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:561) [22:26:30] at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:538) [22:26:30] at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:517) [22:26:30] at org.codehaus.groovy.tools.FileSystemCompiler.compile(FileSystemCompiler.java:59) [22:26:30] at org.codehaus.groovy.tools.FileSystemCompiler.doCompilation(FileSystemCompiler.java:215) [22:26:30] at org.codehaus.groovy.ant.Groovyc.runCompiler(Groovyc.java:1161) [22:26:30] at org.codehaus.groovy.ant.Groovyc.compile(Groovyc.java:1212) [22:26:30] at org.codehaus.groovy.grails.compiler.Grailsc.compile(Grailsc.java:78) [22:26:30] at org.codehaus.groovy.ant.Groovyc.execute(Groovyc.java:827) [22:26:30] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) [22:26:30] at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source) [22:26:30] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [22:26:30] at java.lang.reflect.Method.invoke(Method.java:606) [22:26:30] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [22:26:30] at groovy.util.AntBuilder.performTask(AntBuilder.java:319) [22:26:30] at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:264) [22:26:30] at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147) [22:26:30] at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:203) [22:26:30] at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64) [22:26:30] at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:907) [22:26:30] at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:884) [22:26:30] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:164) [22:26:30] at org.codehaus.groovy.grails.test.runner.GrailsProjectTestCompiler.compileTests(GrailsProjectTestCompiler.groovy:74) [22:26:30] at org.codehaus.groovy.grails.test.runner.GrailsProjectTestRunner.processTests(GrailsProjectTestRunner.groovy:392) [22:26:30] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [22:26:30] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [22:26:30] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [22:26:30] at java.lang.reflect.Method.invoke(Method.java:606) [22:26:30] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) [22:26:30] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) [22:26:30] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207) [22:26:30] at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) [22:26:30] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) [22:26:30] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1152) [22:26:30] at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) [22:26:30] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) [22:26:30] at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66) [22:26:30] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49) [22:26:30] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133) [22:26:30] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141) [22:26:30] at org.codehaus.groovy.grails.test.runner.GrailsProjectTestRunner$_runAllTests_closure7.doCall(GrailsProjectTestRunner.groovy:313) [22:26:30] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [22:26:30] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [22:26:30] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [22:26:30] at java.lang.reflect.Method.invoke(Method.java:606) [22:26:30] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90) [22:26:30] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:324) [22:26:30] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1207) [22:26:30] at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110) [22:26:30] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1016) [22:26:30] at groovy.lang.Closure.call(Closure.java:423) [22:26:30] at org.codehaus.groovy.runtime.DefaultGroovyMethods.callClosureForMapEntry(DefaultGroovyMethods.java:4271) [22:26:30] at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1408) [22:26:30] at org.codehaus.groovy.runtime.dgm$151.invoke(Unknown Source) [22:26:30] at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271) [22:26:30] at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53) [22:26:30] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) [22:26:30] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) [22:26:30] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) [22:26:30] at org.codehaus.groovy.grails.test.runner.GrailsProjectTestRunner.runAllTests(GrailsProjectTestRunner.groovy:299) [22:26:30] at org.codehaus.groovy.grails.test.runner.GrailsProjectTestRunner.runAllTests(GrailsProjectTestRunner.groovy:214) [22:26:30] at org.codehaus.groovy.grails.test.runner.GrailsProjectTestRunner.runAllTests(GrailsProjectTestRunner.groovy) [22:26:30] at org.codehaus.groovy.grails.test.runner.GrailsProjectTestRunner$runAllTests$0.call(Unknown Source) [22:26:30] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45) [22:26:30] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108) [22:26:30] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116) [22:26:30] at _GrailsTest$_run_closure1.doCall(_GrailsTest.groovy:102) {code} I tried to enable --verbose and --verboseCompile but it doesn't really seem to provide additional information on the method/file causing the issue. I assume that the Clover instrumentation is pushing a method over this 64KB boundary, but I don't see any methods on our side that are even close to this size. Our current clover configuration is: {code} ant.'clover-setup'(initstring: ".clover/trifleet.db") { ant.fileset(dir: "grails-app", includes: "**/domain/**, **/controllers/**, **/jobs/**, **/reports/**, **/services/**, **/taglib/**, **/utils/**") {} ant.fileset(dir: "src", includes: "**/*.groovy, **/*.java", excludes: "**/script@*.groovy, **/spring/*.groovy, **/smooks/*.groovy, **/system/database/generators/**, **/system/generator/drillDown/**, **/castor/**, **/DrillDown*.*, **/operational/movement/edi/writer/**") { } ant.fileset(dir: "../common/grails-app", includes: "**/domain/**, **/controllers/**, **/jobs/**, **/services/**, **/taglib/**, **/utils/**") {} ant.fileset(dir: "../common/src", includes: "**/*.groovy, **/*.java", excludes: "**/script@*.groovy, **/system/database/generators/**, **/castor/**") {} ant.fileset(dir: "test", includes: "**/*.groovy") {} ant.testsources(dir: "test") {} ant.profiles { ant.profile(name: "default", coverageRecorder: "SHARED") } } {code} I have tried disable the test coverage by setting enabled: false on testsources but that didn't fix the problem. Please let me know if there's any other options to reduce the size or at least work around this problem as we have no coverage during a critical phase of our project testing right now.

    Atlassian JIRA | 2 years ago | Aaron Long
    java.lang.RuntimeException: Method code too large!

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.RuntimeException

      Method code too large!

      at org.jacoco.agent.rt.internal_4236f75.asm.MethodWriter.getSize()
    2. org.jacoco.agent
      CoverageTransformer.transform
      1. org.jacoco.agent.rt.internal_4236f75.asm.MethodWriter.getSize(MethodWriter.java:2036)
      2. org.jacoco.agent.rt.internal_4236f75.asm.ClassWriter.toByteArray(ClassWriter.java:827)
      3. org.jacoco.agent.rt.internal_4236f75.core.instr.Instrumenter.instrument(Instrumenter.java:84)
      4. org.jacoco.agent.rt.internal_4236f75.core.instr.Instrumenter.instrument(Instrumenter.java:101)
      5. org.jacoco.agent.rt.internal_4236f75.CoverageTransformer.transform(CoverageTransformer.java:91)
      5 frames
    3. Java RT
      ClassLoader.loadClass
      1. sun.instrument.TransformerManager.transform(TransformerManager.java:188)
      2. sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
      3. java.lang.ClassLoader.defineClass1(Native Method)
      4. java.lang.ClassLoader.defineClass(ClassLoader.java:760)
      5. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      6. java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
      7. java.net.URLClassLoader.access$100(URLClassLoader.java:73)
      8. java.net.URLClassLoader$1.run(URLClassLoader.java:368)
      9. java.net.URLClassLoader$1.run(URLClassLoader.java:362)
      10. java.security.AccessController.doPrivileged(Native Method)
      11. java.net.URLClassLoader.findClass(URLClassLoader.java:361)
      12. java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      13. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      14. java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      14 frames
    4. org.eclipse.milo
      OpcUaClientIT.startClientAndServer
      1. org.eclipse.milo.opcua.stack.core.types.structured.UserTokenPolicy.<clinit>(UserTokenPolicy.java:28)
      2. org.eclipse.milo.opcua.sdk.server.api.config.OpcUaServerConfig.<clinit>(OpcUaServerConfig.java:33)
      3. org.eclipse.milo.opcua.sdk.client.OpcUaClientIT.startClientAndServer(OpcUaClientIT.java:104)
      3 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:497)
      4 frames
    6. TestNG
      TestNG.run
      1. org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
      2. org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:514)
      3. org.testng.internal.Invoker.invokeConfigurations(Invoker.java:215)
      4. org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
      5. org.testng.TestRunner.beforeRun(TestRunner.java:656)
      6. org.testng.TestRunner.run(TestRunner.java:624)
      7. org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
      8. org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
      9. org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
      10. org.testng.SuiteRunner.run(SuiteRunner.java:268)
      11. org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
      12. org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
      13. org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
      14. org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
      15. org.testng.TestNG.run(TestNG.java:1064)
      15 frames
    7. org.apache.maven
      TestNGProvider.invoke
      1. org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:132)
      2. org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:112)
      3. org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99)
      4. org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:147)
      4 frames
    8. SureFire
      ForkedBooter.main
      1. org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290)
      2. org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242)
      3. org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121)
      3 frames