{"record":{"id":"5588fcffe8a637f2","repo":"quarkusio/quarkus","slug":"default-bundle-method-not-found-on-s-s","errorCode":null,"errorMessage":"Default bundle method not found on %s: %s","messagePattern":"Default bundle method not found on (.+?): (.+?)","errorType":"exception","errorClass":"MessageBundleException","httpStatus":null,"severity":"error","filePath":"extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java","lineNumber":1049,"sourceCode":"                cc.method(methodDescOf(method), mc -> {\n                    List<ParamVar> params = new ArrayList<>(method.parametersCount());\n                    for (int i = 0; i < method.parametersCount(); i++) {\n                        String paramName = method.parameterName(i);\n                        params.add(mc.parameter(paramName != null ? paramName : \"arg\" + i, i));\n                    }\n                    if (!method.returnType().name().equals(DotNames.STRING)) {\n                        throw new MessageBundleException(\n                                String.format(\"A message bundle method must return java.lang.String: %s#%s\",\n                                        bundleInterface, method.name()));\n                    }\n                    LOG.debugf(\"Found message bundle method %s on %s\", method, bundleInterface);\n\n                    AnnotationInstance messageAnnotation;\n                    if (defaultBundleInterface != null) {\n                        MethodInfo defaultBundleMethod = bundleInterfaceWrapper.method(method.name(),\n                                method.parameterTypes().toArray(new Type[] {}));\n                        if (defaultBundleMethod == null) {\n                            throw new MessageBundleException(\n                                    String.format(\"Default bundle method not found on %s: %s\", bundleInterface, method));\n                        }\n                        messageAnnotation = defaultBundleMethod.annotation(Names.MESSAGE);\n                    } else {\n                        messageAnnotation = method.annotation(Names.MESSAGE);\n                    }\n\n                    if (messageAnnotation == null) {\n                        LOG.debugf(\"@Message not declared on %s#%s - using the default key/value\", bundleInterface, method);\n                        messageAnnotation = AnnotationInstance.builder(Names.MESSAGE).value(Message.DEFAULT_VALUE)\n                                .add(\"name\", Message.DEFAULT_NAME).build();\n                    }\n\n                    String key = getKey(method, messageAnnotation, defaultKeyValue);\n                    if (key.equals(MESSAGE)) {\n                        throw new MessageBundleException(String.format(\n                                \"A message bundle interface method must not use the key 'message' which is reserved for dynamic lookup; defined for %s#%s()\",\n                                bundleInterface, method.name()));","sourceCodeStart":1031,"sourceCodeEnd":1067,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/qute/deployment/src/main/java/io/quarkus/qute/deployment/MessageBundleProcessor.java#L1031-L1067","documentation":"For the default bundle interface (the one declaring @MessageBundle), each method must be mirrored on every localized variant interface so translations line up. When a localized interface method cannot be matched to a method with the same name and parameter types on the default bundle interface, the build fails naming both the bundle interface and the offending method.","triggerScenarios":"A @Localized interface declares a method with a different signature (extra/missing parameter, different types) or an extra method that does not exist on the @MessageBundle interface it extends.","commonSituations":"Adding a parameter to the base bundle method but only partially updating localized interfaces; hand-writing localized interfaces with divergent signatures; merging translations that added methods present only in one locale interface.","solutions":["Make the localized interface's method signature exactly match the default bundle method (same name, same parameter types).","Remove methods from the localized interface that are not in the default bundle interface.","Regenerate localized interfaces from the default bundle and re-apply translations."],"exampleFix":"// before\n// default: String hello(String name);\n@Localized @Locale(\"de\") interface AppMessagesDe extends AppMessages {\n    String hello(String name, String greeting);\n}\n\n// after\n@Localized @Locale(\"de\") interface AppMessagesDe extends AppMessages {\n    @Override\n    String hello(String name);\n}","handlingStrategy":"validation","validationCode":"// Localized methods must match default bundle signatures\nfor (java.lang.reflect.Method m : AppMessagesDe.class.getDeclaredMethods()) {\n    try {\n        AppMessages.class.getMethod(m.getName(), m.getParameterTypes());\n    } catch (NoSuchMethodException e) {\n        throw new IllegalStateException(\"No matching default method: \" + m, e);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always @Override methods in localized interfaces so mismatches are compile errors","Change signatures everywhere at once via rename refactoring","Keep localized interfaces minimal (overrides only)"],"tags":["quarkus","qute","message-bundle","localization"],"backgroundTag":"message-bundle-method-signature-invalid","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}