Quarkus: java.lang.IllegalArgumentException: UTF8 string too large when running a QuarkusTest

Created on 8 Feb 2020  路  3Comments  路  Source: quarkusio/quarkus

Describe the bug
Bug occurs for me when trying to execute a QuarkusTest

To Reproduce

I麓m having a multi-module project if that does mean anything.
Running on Quarkus 1.2.0 Final

in my build.gradle I have these additional props defined because I first ran into another issue

   test {
        dependsOn 'cleanTest'
        dependsOn 'quarkusTestConfig'
        useJUnitPlatform()
        forkEvery 1
    }

What is that exception related to? Class Name, Application Location?

Thanks in advance.

TestInstanceFactory [io.quarkus.test.junit.QuarkusTestExtension] failed to instantiate test class [com.myapp.media.controller.MediaControllerTest]: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
    [error]: Build step io.quarkus.deployment.steps.MainClassBuildStep#build threw an exception: java.lang.RuntimeException: java.lang.IllegalArgumentException: UTF8 string too large
    at io.quarkus.gizmo.BytecodeCreatorImpl$Operation.doProcess(BytecodeCreatorImpl.java:1121)
    at io.quarkus.gizmo.BytecodeCreatorImpl.writeInteriorOperations(BytecodeCreatorImpl.java:1036)
    at io.quarkus.gizmo.BytecodeCreatorImpl.writeOperations(BytecodeCreatorImpl.java:1030)
    at io.quarkus.gizmo.MethodCreatorImpl.write(MethodCreatorImpl.java:103)
    at io.quarkus.gizmo.ClassCreator.writeTo(ClassCreator.java:180)
    at io.quarkus.gizmo.ClassCreator.close(ClassCreator.java:203)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl.writeBytecode(BytecodeRecorderImpl.java:462)
    at io.quarkus.deployment.steps.MainClassBuildStep.build(MainClassBuildStep.java:224)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:915)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:279)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
    at java.base/java.lang.Thread.run(Thread.java:834)
    at org.jboss.threads.JBossThread.run(JBossThread.java:479)
Caused by: java.lang.IllegalArgumentException: UTF8 string too large
    at org.objectweb.asm.ByteVector.putUTF8(ByteVector.java:246)
    at org.objectweb.asm.SymbolTable.addConstantUtf8(SymbolTable.java:774)
    at org.objectweb.asm.SymbolTable.addConstantUtf8Reference(SymbolTable.java:1007)
    at org.objectweb.asm.SymbolTable.addConstantString(SymbolTable.java:604)
    at org.objectweb.asm.SymbolTable.addConstant(SymbolTable.java:474)
    at org.objectweb.asm.MethodWriter.visitLdcInsn(MethodWriter.java:1276)
    at org.objectweb.asm.MethodVisitor.visitLdcInsn(MethodVisitor.java:539)
    at io.quarkus.gizmo.GizmoMethodVisitor.visitLdcInsn(GizmoMethodVisitor.java:140)
    at io.quarkus.gizmo.BytecodeCreatorImpl.loadResultHandle(BytecodeCreatorImpl.java:743)
    at io.quarkus.gizmo.BytecodeCreatorImpl.loadResultHandle(BytecodeCreatorImpl.java:735)
    at io.quarkus.gizmo.BytecodeCreatorImpl$InvokeOperation.writeBytecode(BytecodeCreatorImpl.java:1222)
    at io.quarkus.gizmo.BytecodeCreatorImpl$Operation.doProcess(BytecodeCreatorImpl.java:1118)
    ... 19 more

org.junit.jupiter.api.extension.TestInstantiationException: TestInstanceFactory [io.quarkus.test.junit.QuarkusTestExtension] failed to instantiate test class [com.myapp.media.controller.MediaControllerTest]: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
    [error]: Build step io.quarkus.deployment.steps.MainClassBuildStep#build threw an exception: java.lang.RuntimeException: java.lang.IllegalArgumentException: UTF8 string too large
    at io.quarkus.gizmo.BytecodeCreatorImpl$Operation.doProcess(BytecodeCreatorImpl.java:1121)
    at io.quarkus.gizmo.BytecodeCreatorImpl.writeInteriorOperations(BytecodeCreatorImpl.java:1036)
    at io.quarkus.gizmo.BytecodeCreatorImpl.writeOperations(BytecodeCreatorImpl.java:1030)
    at io.quarkus.gizmo.MethodCreatorImpl.write(MethodCreatorImpl.java:103)
    at io.quarkus.gizmo.ClassCreator.writeTo(ClassCreator.java:180)
    at io.quarkus.gizmo.ClassCreator.close(ClassCreator.java:203)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl.writeBytecode(BytecodeRecorderImpl.java:462)
    at io.quarkus.deployment.steps.MainClassBuildStep.build(MainClassBuildStep.java:224)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:915)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:279)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
    at java.base/java.lang.Thread.run(Thread.java:834)
    at org.jboss.threads.JBossThread.run(JBossThread.java:479)
Caused by: java.lang.IllegalArgumentException: UTF8 string too large
    at org.objectweb.asm.ByteVector.putUTF8(ByteVector.java:246)
    at org.objectweb.asm.SymbolTable.addConstantUtf8(SymbolTable.java:774)
    at org.objectweb.asm.SymbolTable.addConstantUtf8Reference(SymbolTable.java:1007)
    at org.objectweb.asm.SymbolTable.addConstantString(SymbolTable.java:604)
    at org.objectweb.asm.SymbolTable.addConstant(SymbolTable.java:474)
    at org.objectweb.asm.MethodWriter.visitLdcInsn(MethodWriter.java:1276)
    at org.objectweb.asm.MethodVisitor.visitLdcInsn(MethodVisitor.java:539)
    at io.quarkus.gizmo.GizmoMethodVisitor.visitLdcInsn(GizmoMethodVisitor.java:140)
    at io.quarkus.gizmo.BytecodeCreatorImpl.loadResultHandle(BytecodeCreatorImpl.java:743)
    at io.quarkus.gizmo.BytecodeCreatorImpl.loadResultHandle(BytecodeCreatorImpl.java:735)
    at io.quarkus.gizmo.BytecodeCreatorImpl$InvokeOperation.writeBytecode(BytecodeCreatorImpl.java:1222)
    at io.quarkus.gizmo.BytecodeCreatorImpl$Operation.doProcess(BytecodeCreatorImpl.java:1118)
    ... 19 more

    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstanceFactory(ClassBasedTestDescriptor.java:300)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateTestClass(ClassBasedTestDescriptor.java:275)
    at org.junit.jupiter.engine.descriptor.ClassTestDescriptor.instantiateTestClass(ClassTestDescriptor.java:77)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.instantiateAndPostProcessTestInstance(ClassBasedTestDescriptor.java:258)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$2(ClassBasedTestDescriptor.java:252)
    at java.base/java.util.Optional.orElseGet(Optional.java:369)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$testInstancesProvider$3(ClassBasedTestDescriptor.java:251)
    at org.junit.jupiter.engine.execution.TestInstancesProvider.getTestInstances(TestInstancesProvider.java:29)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$prepare$0(TestMethodTestDescriptor.java:106)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:105)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.prepare(TestMethodTestDescriptor.java:69)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$prepare$1(NodeTestTask.java:107)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.prepare(NodeTestTask.java:107)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:75)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1540)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$7(NodeTestTask.java:125)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:135)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:123)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:122)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:80)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:220)
    at org.junit.platform.launcher.core.DefaultLauncher.lambda$execute$6(DefaultLauncher.java:188)
    at org.junit.platform.launcher.core.DefaultLauncher.withInterceptedStreams(DefaultLauncher.java:202)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:181)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:128)
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99)
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:79)
    at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
    at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
    at com.sun.proxy.$Proxy2.stop(Unknown Source)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:132)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:182)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
    at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:412)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
    [error]: Build step io.quarkus.deployment.steps.MainClassBuildStep#build threw an exception: java.lang.RuntimeException: java.lang.IllegalArgumentException: UTF8 string too large
    at io.quarkus.gizmo.BytecodeCreatorImpl$Operation.doProcess(BytecodeCreatorImpl.java:1121)
    at io.quarkus.gizmo.BytecodeCreatorImpl.writeInteriorOperations(BytecodeCreatorImpl.java:1036)
    at io.quarkus.gizmo.BytecodeCreatorImpl.writeOperations(BytecodeCreatorImpl.java:1030)
    at io.quarkus.gizmo.MethodCreatorImpl.write(MethodCreatorImpl.java:103)
    at io.quarkus.gizmo.ClassCreator.writeTo(ClassCreator.java:180)
    at io.quarkus.gizmo.ClassCreator.close(ClassCreator.java:203)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl.writeBytecode(BytecodeRecorderImpl.java:462)
    at io.quarkus.deployment.steps.MainClassBuildStep.build(MainClassBuildStep.java:224)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:915)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:279)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
    at java.base/java.lang.Thread.run(Thread.java:834)
    at org.jboss.threads.JBossThread.run(JBossThread.java:479)
Caused by: java.lang.IllegalArgumentException: UTF8 string too large
    at org.objectweb.asm.ByteVector.putUTF8(ByteVector.java:246)
    at org.objectweb.asm.SymbolTable.addConstantUtf8(SymbolTable.java:774)
    at org.objectweb.asm.SymbolTable.addConstantUtf8Reference(SymbolTable.java:1007)
    at org.objectweb.asm.SymbolTable.addConstantString(SymbolTable.java:604)
    at org.objectweb.asm.SymbolTable.addConstant(SymbolTable.java:474)
    at org.objectweb.asm.MethodWriter.visitLdcInsn(MethodWriter.java:1276)
    at org.objectweb.asm.MethodVisitor.visitLdcInsn(MethodVisitor.java:539)
    at io.quarkus.gizmo.GizmoMethodVisitor.visitLdcInsn(GizmoMethodVisitor.java:140)
    at io.quarkus.gizmo.BytecodeCreatorImpl.loadResultHandle(BytecodeCreatorImpl.java:743)
    at io.quarkus.gizmo.BytecodeCreatorImpl.loadResultHandle(BytecodeCreatorImpl.java:735)
    at io.quarkus.gizmo.BytecodeCreatorImpl$InvokeOperation.writeBytecode(BytecodeCreatorImpl.java:1222)
    at io.quarkus.gizmo.BytecodeCreatorImpl$Operation.doProcess(BytecodeCreatorImpl.java:1118)
    ... 19 more

    at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:181)
    at io.quarkus.test.junit.QuarkusTestExtension.doJavaStart(QuarkusTestExtension.java:249)
    at io.quarkus.test.junit.QuarkusTestExtension.createTestInstance(QuarkusTestExtension.java:394)
    at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeTestInstanceFactory(ClassBasedTestDescriptor.java:285)
    ... 72 more
Caused by: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
    [error]: Build step io.quarkus.deployment.steps.MainClassBuildStep#build threw an exception: java.lang.RuntimeException: java.lang.IllegalArgumentException: UTF8 string too large
    at io.quarkus.gizmo.BytecodeCreatorImpl$Operation.doProcess(BytecodeCreatorImpl.java:1121)
    at io.quarkus.gizmo.BytecodeCreatorImpl.writeInteriorOperations(BytecodeCreatorImpl.java:1036)
    at io.quarkus.gizmo.BytecodeCreatorImpl.writeOperations(BytecodeCreatorImpl.java:1030)
    at io.quarkus.gizmo.MethodCreatorImpl.write(MethodCreatorImpl.java:103)
    at io.quarkus.gizmo.ClassCreator.writeTo(ClassCreator.java:180)
    at io.quarkus.gizmo.ClassCreator.close(ClassCreator.java:203)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl.writeBytecode(BytecodeRecorderImpl.java:462)
    at io.quarkus.deployment.steps.MainClassBuildStep.build(MainClassBuildStep.java:224)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:915)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:279)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
    at java.base/java.lang.Thread.run(Thread.java:834)
    at org.jboss.threads.JBossThread.run(JBossThread.java:479)
Caused by: java.lang.IllegalArgumentException: UTF8 string too large
    at org.objectweb.asm.ByteVector.putUTF8(ByteVector.java:246)
    at org.objectweb.asm.SymbolTable.addConstantUtf8(SymbolTable.java:774)
    at org.objectweb.asm.SymbolTable.addConstantUtf8Reference(SymbolTable.java:1007)
    at org.objectweb.asm.SymbolTable.addConstantString(SymbolTable.java:604)
    at org.objectweb.asm.SymbolTable.addConstant(SymbolTable.java:474)
    at org.objectweb.asm.MethodWriter.visitLdcInsn(MethodWriter.java:1276)
    at org.objectweb.asm.MethodVisitor.visitLdcInsn(MethodVisitor.java:539)
    at io.quarkus.gizmo.GizmoMethodVisitor.visitLdcInsn(GizmoMethodVisitor.java:140)
    at io.quarkus.gizmo.BytecodeCreatorImpl.loadResultHandle(BytecodeCreatorImpl.java:743)
    at io.quarkus.gizmo.BytecodeCreatorImpl.loadResultHandle(BytecodeCreatorImpl.java:735)
    at io.quarkus.gizmo.BytecodeCreatorImpl$InvokeOperation.writeBytecode(BytecodeCreatorImpl.java:1222)
    at io.quarkus.gizmo.BytecodeCreatorImpl$Operation.doProcess(BytecodeCreatorImpl.java:1118)
    ... 19 more

    at io.quarkus.builder.Execution.run(Execution.java:108)
    at io.quarkus.builder.BuildExecutionBuilder.execute(BuildExecutionBuilder.java:79)
    at io.quarkus.deployment.QuarkusAugmentor.run(QuarkusAugmentor.java:128)
    at io.quarkus.runner.RuntimeRunner.run(RuntimeRunner.java:114)
    ... 75 more
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: UTF8 string too large
    at io.quarkus.gizmo.BytecodeCreatorImpl$Operation.doProcess(BytecodeCreatorImpl.java:1121)
    at io.quarkus.gizmo.BytecodeCreatorImpl.writeInteriorOperations(BytecodeCreatorImpl.java:1036)
    at io.quarkus.gizmo.BytecodeCreatorImpl.writeOperations(BytecodeCreatorImpl.java:1030)
    at io.quarkus.gizmo.MethodCreatorImpl.write(MethodCreatorImpl.java:103)
    at io.quarkus.gizmo.ClassCreator.writeTo(ClassCreator.java:180)
    at io.quarkus.gizmo.ClassCreator.close(ClassCreator.java:203)
    at io.quarkus.deployment.recording.BytecodeRecorderImpl.writeBytecode(BytecodeRecorderImpl.java:462)
    at io.quarkus.deployment.steps.MainClassBuildStep.build(MainClassBuildStep.java:224)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:915)
    at io.quarkus.builder.BuildContext.run(BuildContext.java:279)
    at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
    at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
    at java.base/java.lang.Thread.run(Thread.java:834)
    at org.jboss.threads.JBossThread.run(JBossThread.java:479)
Caused by: java.lang.IllegalArgumentException: UTF8 string too large
    at org.objectweb.asm.ByteVector.putUTF8(ByteVector.java:246)
    at org.objectweb.asm.SymbolTable.addConstantUtf8(SymbolTable.java:774)
    at org.objectweb.asm.SymbolTable.addConstantUtf8Reference(SymbolTable.java:1007)
    at org.objectweb.asm.SymbolTable.addConstantString(SymbolTable.java:604)
    at org.objectweb.asm.SymbolTable.addConstant(SymbolTable.java:474)
    at org.objectweb.asm.MethodWriter.visitLdcInsn(MethodWriter.java:1276)
    at org.objectweb.asm.MethodVisitor.visitLdcInsn(MethodVisitor.java:539)
    at io.quarkus.gizmo.GizmoMethodVisitor.visitLdcInsn(GizmoMethodVisitor.java:140)
    at io.quarkus.gizmo.BytecodeCreatorImpl.loadResultHandle(BytecodeCreatorImpl.java:743)
    at io.quarkus.gizmo.BytecodeCreatorImpl.loadResultHandle(BytecodeCreatorImpl.java:735)
    at io.quarkus.gizmo.BytecodeCreatorImpl$InvokeOperation.writeBytecode(BytecodeCreatorImpl.java:1222)
    at io.quarkus.gizmo.BytecodeCreatorImpl$Operation.doProcess(BytecodeCreatorImpl.java:1118)
    ... 19 more
aretesting kinbug

Most helpful comment

Hello @mklueh, can you share the application (maybe as a github repo) which reproduces this exception?

All 3 comments

Hello @mklueh, can you share the application (maybe as a github repo) which reproduces this exception?

Hello @jaikiran ,

I cannot share the application, but I麓d like to create a demo project around the issue. Sadly I cannot reproduce it for now..

Could you tell me where I might need to look for when it comes to the exception "UTF8 string too large" or is it likely that the exception is meaningless in my case?

I麓ve managed to break the problem down to two dependencies that are causing it when being used together. Excluding one of the two cause the issue to disappear

        // Excluding this dependency will make it working
        compile group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.11.714'

        // Excluding this dependency will make it working
        implementation 'io.quarkus:quarkus-hibernate-orm-panache'

Demo Project

Edit:

It seems that https://www.testcontainers.org/ localstack module depends on the aws library as well which makes it unusable when testing Lambda functions against AWS services locally.

Was this page helpful?
0 / 5 - 0 ratings