{"record":{"id":"8793dbfdee48b760","repo":"quarkusio/quarkus","slug":"unknown-type-set","errorCode":null,"errorMessage":"unknown type ${set}","messagePattern":"unknown type (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/recording/BytecodeRecorderImpl.java","lineNumber":578,"sourceCode":"                        }\n                    }\n                });\n            } else if (set instanceof NewInstance) {\n                context.writeInstruction(new InstructionGroup() {\n                    @Override\n                    public void write(MethodContext context, MethodCreator method, ResultHandle array) {\n                        //this instruction creates a new instance\n                        //it just goes in the startup context\n                        NewInstance ni = (NewInstance) set;\n                        ResultHandle val = method.newInstance(ofConstructor(ni.theClass));\n                        ResultHandle rv = method.newInstance(ofConstructor(RuntimeValue.class, Object.class), val);\n                        method.invokeVirtualMethod(\n                                ofMethod(StartupContext.class, \"putValue\", void.class, String.class, Object.class),\n                                method.getMethodParam(0), method.load(ni.proxyId), rv);\n                    }\n                });\n            } else {\n                throw new RuntimeException(\"unknown type \" + set);\n            }\n\n        }\n        context.close();\n        mainMethod.returnValue(null);\n        var createArray = file.getMethodCreator(createArrayDescriptor);\n        createArray.returnValue(createArray.newArray(Object.class, deferredParameterCount));\n        file.close();\n\n    }\n\n    /**\n     * Returns a representation of a serialized parameter.\n     */\n    private DeferredParameter loadObjectInstance(Object param, Map<Object, DeferredParameter> existing, Class<?> expectedType,\n            boolean relaxedValidation) {\n        if (loadComplete) {\n            throw new RuntimeException(\"All parameters have already been loaded, it is too late to call loadObjectInstance\");","sourceCodeStart":560,"sourceCodeEnd":596,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/recording/BytecodeRecorderImpl.java#L560-L596","documentation":"While writing the generated bytecode, writeBytecode() iterates recorded instructions and only knows how to emit StoredMethodCall and NewInstance. Any other BytecodeInstruction implementation reaching this loop is a Quarkus framework bug, since no other instruction types are expected here.","triggerScenarios":"A BytecodeInstruction subclass other than StoredMethodCall or NewInstance was added to storedMethodCalls. For users this can only occur when using an unreleased/patched Quarkus core or an internal API that injects custom instructions.","commonSituations":"Developers hacking on Quarkus core or using an internal fork that adds new instruction types; mismatched core/deployment module versions from a broken local build.","solutions":["Rebuild Quarkus core with a clean state (mvn clean install) to rule out mixed module versions","Check which BytecodeInstruction type appears in the message and search Quarkus source for where it is added","If using released Quarkus, report a bug at github.com/quarkusio/quarkus with the full stack trace","If you added the instruction type yourself, add a corresponding branch in the writeBytecode loop to emit it"],"exampleFix":"// before\n} else {\n    throw new RuntimeException(\"unknown type \" + set);\n}\n// after\n} else if (set instanceof MyInstruction mi) {\n    context.writeInstruction((context, method, array) -> emit(mi, method));\n} else {\n    throw new RuntimeException(\"unknown type \" + set);\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    bytecodeRecorderImpl.writeBytecode(...);\n} catch (RuntimeException e) {\n    if (e.getMessage().startsWith(\"unknown type\")) {\n        throw new IllegalStateException(\"Quarkus internal bytecode instruction bug — report with stack trace\", e);\n    }\n    throw e;\n}","preventionTips":["Keep Quarkus core/deployment modules built from the same source state","Do not add BytecodeInstruction implementations without a matching branch in writeBytecode","Report occurrences on released Quarkus as framework bugs with the instruction class name"],"tags":["quarkus","build-time","bytecode","internal-bug"],"backgroundTag":"unsupported-bytecode-instruction","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}