{"record":{"id":"03f1d258c2dfe43c","repo":"oracle/graal","slug":"unimplemented-most-specific-mapping-vs","errorCode":null,"errorMessage":"Unimplemented: most specific mapping: {} vs. {}","messagePattern":"Unimplemented: most specific mapping: (.+?) vs\\. (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalHostProxies.java","lineNumber":512,"sourceCode":"    }\n\n    private Method findHostMethod(Class<?> hostClass, ResolvedJavaMethod method) {\n        Method hostMethod = null;\n        JavaType guestReturnType = method.getSignature().getReturnType(null);\n        for (Method hostMethodCandidate : hostClass.getMethods()) {\n            if (!hostMethodCandidate.getName().equals(method.getName())) {\n                continue;\n            }\n            if (!argumentsCompatible(method, hostMethodCandidate.getParameterTypes())) {\n                continue;\n            }\n            if (!typesCompatible(guestReturnType, method.getDeclaringClass(), hostMethodCandidate.getReturnType())) {\n                continue;\n            }\n            if (hostMethod == null) {\n                hostMethod = hostMethodCandidate;\n            } else {\n                throw new RuntimeException(\"Unimplemented: most specific mapping: \" + hostMethod + \" vs. \" + hostMethodCandidate);\n            }\n        }\n        if (hostMethod == null && !method.isDefault()) {\n            throw new IllegalArgumentException(\"Method compatible with \" + method.format(\"%r %h.%n(%p)\") + \" not found in class \" + hostClass.getName());\n        }\n        return hostMethod;\n    }\n\n    private boolean argumentsCompatible(ResolvedJavaMethod method, Class<?>[] hostParameterTypes) {\n        Signature guestSignature = method.getSignature();\n        int parameterCount = guestSignature.getParameterCount(false);\n        if (hostParameterTypes.length != parameterCount) {\n            return false;\n        }\n        for (int i = 0; i < parameterCount; i++) {\n            JavaType guestParameterType = guestSignature.getParameterType(i, null);\n            Class<?> hostParameterType = hostParameterTypes[i];\n            if (!typesCompatible(guestParameterType, method.getDeclaringClass(), hostParameterType)) {","sourceCodeStart":494,"sourceCodeEnd":530,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalHostProxies.java#L494-L530","documentation":"Error \"Unimplemented: most specific mapping: {} vs. {}\" thrown in oracle/graal.","triggerScenarios":"Thrown at espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalHostProxies.java:512 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: Unimplemented: most specific mapping: {} vs. {}","solutions":["Fix the condition reported by the error: Unimplemented: most specific mapping: {} vs. {}","Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call."],"exampleFix":"Validate inputs and environment so that the failing condition does not occur: Unimplemented: most specific mapping: {} vs. {}","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}