{"id":"aa958ca8ece42a7d","repo":"spring-projects/spring-framework","slug":"unsupported-executable-aa958c","errorCode":null,"errorMessage":"Unsupported executable {}","messagePattern":"Unsupported executable (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanInstanceSupplier.java","lineNumber":371,"sourceCode":"\t\t}\n\t\tif (executable instanceof Method method) {\n\t\t\tObject target = null;\n\t\t\tString factoryBeanName = registeredBean.getMergedBeanDefinition().getFactoryBeanName();\n\t\t\tif (factoryBeanName != null) {\n\t\t\t\ttarget = registeredBean.getBeanFactory().getBean(factoryBeanName, method.getDeclaringClass());\n\t\t\t}\n\t\t\telse if (!Modifier.isStatic(method.getModifiers())) {\n\t\t\t\tthrow new IllegalStateException(\"Cannot invoke instance method without factoryBeanName: \" + method);\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tReflectionUtils.makeAccessible(method);\n\t\t\t\treturn method.invoke(target, args);\n\t\t\t}\n\t\t\tcatch (Throwable ex) {\n\t\t\t\tthrow new BeanInstantiationException(method, ex.getMessage(), ex);\n\t\t\t}\n\t\t}\n\t\tthrow new IllegalStateException(\"Unsupported executable \" + executable.getClass().getName());\n\t}\n\n\n\tprivate static String toCommaSeparatedNames(Class<?>... parameterTypes) {\n\t\treturn Arrays.stream(parameterTypes).map(Class::getName).collect(Collectors.joining(\", \"));\n\t}\n\n\n\t/**\n\t * Performs lookup of the {@link Executable}.\n\t */\n\tabstract static class ExecutableLookup {\n\n\t\tabstract Executable get(RegisteredBean registeredBean);\n\t}\n\n\n\t/**","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/spring-projects/spring-framework/blob/e8729d043887bf0d0baf91e062e909b56eb2b708/spring-beans/src/main/java/org/springframework/beans/factory/aot/BeanInstanceSupplier.java#L353-L389","documentation":"BeanInstanceSupplier.instantiate handles only Constructor and Method executables; reaching the final throw means the executable was neither. Like error 209 this is a defensive guard for an exotic non-standard Executable type and should not occur with stock JDK reflection.","triggerScenarios":"The instantiation path receives an Executable that is neither Constructor nor Method - typically introduced by bytecode manipulation or a custom reflection implementation.","commonSituations":"Bytecode-rewriting/agent tools that synthesize Executable subclasses; using a forked JDK with extended reflection types. Rarely seen in normal applications.","solutions":["Locate the instrumentation/agent producing the non-standard executable and disable or update it for the affected build.","Reproduce with the agent removed to confirm it is the source.","Report upstream if it reproduces on a clean JDK."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"Executable e = ...;\nif (!(e instanceof Constructor || e instanceof Method)) {\n  throw new IllegalStateException(\"Unsupported executable: \" + e.getClass());\n}","typeGuard":"boolean isStandardExecutable(Executable e) {\n  return e instanceof Constructor || e instanceof Method;\n}","tryCatchPattern":null,"preventionTips":["Run AOT with instrumentation agents disabled to rule out exotic executables.","Keep the reflection layer stock JDK."],"tags":["spring","aot","reflection","unsupported"],"analyzedSha":"e8729d043887bf0d0baf91e062e909b56eb2b708","analyzedAt":"2026-08-04T19:07:39.725Z","schemaVersion":2}