{"record":{"id":"b4ceb714cde30eed","repo":"oracle/graal","slug":"could-not-resolve-type","errorCode":null,"errorMessage":"Could not resolve type ","messagePattern":"Could not resolve type ","errorType":"exception","errorClass":"LinkageError","httpStatus":null,"severity":"error","filePath":"espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalVMAccess.java","lineNumber":947,"sourceCode":"        return lookupNonArrayType(name, accessingClass, resolve);\n    }\n\n    private JavaType lookupNonArrayType(String name, EspressoExternalResolvedInstanceType accessingClass, boolean resolve) {\n        assert !name.isEmpty() && name.charAt(0) != '[';\n        if (name.length() == 1) {\n            JavaKind kind = JavaKind.fromPrimitiveOrVoidTypeChar(name.charAt(0));\n            return forPrimitiveKind(kind);\n        }\n        JVMCIError.guarantee(name.charAt(0) == 'L' && name.charAt(name.length() - 1) == ';', \"Invalid type: \" + name);\n        Value meta = invokeJVMCIHelper(\"lookupInstanceType\", name, accessingClass.getMetaObject(), resolve);\n        if (meta.isNull()) {\n            if (resolve) {\n                /*\n                 * lookupInstanceType should throw for unresolved symbols when resolve is true. It\n                 * can currently return null for symbols unknown to Espresso; see GR-76549 for fixing\n                 * that in the guest helper.\n                 */\n                throw new LinkageError(\"Could not resolve type \" + name);\n            }\n            return UnresolvedJavaType.create(name);\n        }\n        return new EspressoExternalResolvedInstanceType(this, meta);\n    }\n\n    EspressoExternalResolvedPrimitiveType forPrimitiveKind(JavaKind kind) {\n        if (!kind.isPrimitive()) {\n            throw new IllegalArgumentException(\"Not a primitive kind: \" + kind);\n        }\n        return forPrimitiveBasicType(kind.getBasicType());\n    }\n\n    private EspressoExternalResolvedPrimitiveType forPrimitiveBasicType(int basicType) {\n        if (primitives[basicType] == null) {\n            throw new IllegalArgumentException(\"No primitive type for basic type \" + basicType);\n        }\n        return primitives[basicType];","sourceCodeStart":929,"sourceCodeEnd":965,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalVMAccess.java#L929-L965","documentation":"Error \"Could not resolve type \" thrown in oracle/graal.","triggerScenarios":"Thrown at espresso-compiler-stub/src/com.oracle.truffle.espresso.vmaccess/src/com/oracle/truffle/espresso/vmaccess/EspressoExternalVMAccess.java:947 when the library encounters an invalid state.","commonSituations":"Occurs when a caller violates the contract guarded by this check: Could not resolve type","solutions":["Fix the condition reported by the error: Could not resolve type","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: Could not resolve type","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-15T22:17:37.221Z"}