{"record":{"id":"11a4ce58bdf3e522","repo":"quarkusio/quarkus","slug":"failed-to-locate-targetcoords-tocompactcoords","errorCode":null,"errorMessage":"Failed to locate ${targetCoords.toCompactCoords()} among the dependencies","messagePattern":"Failed to locate (.+?) among the dependencies","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/devui/deployment/src/main/java/io/quarkus/devui/deployment/menu/DependenciesProcessor.java","lineNumber":345,"sourceCode":"        }\n        collectAllPaths(node.dependents.get(0), currentPath, allPaths);\n    }\n\n    private static DepNode getTargetWithAllDependents(ArtifactCoords targetCoords, Map<ArtifactKey, DepNode> all) {\n        DepNode targetDep = null;\n        for (var d : all.values()) {\n            d.initDependents(all);\n            if (targetDep == null\n                    && d.resolvedDep.getArtifactId().equals(targetCoords.getArtifactId())\n                    && d.resolvedDep.getGroupId().equals(targetCoords.getGroupId())\n                    && d.resolvedDep.getClassifier().equals(targetCoords.getClassifier())\n                    && d.resolvedDep.getType().equals(targetCoords.getType())\n                    && d.resolvedDep.getVersion().equals(targetCoords.getVersion())) {\n                targetDep = d;\n            }\n        }\n        if (targetDep == null) {\n            throw new IllegalArgumentException(\n                    \"Failed to locate \" + targetCoords.toCompactCoords() + \" among the dependencies\");\n        }\n        return targetDep;\n    }\n\n    private static Map<ArtifactKey, DepNode> getCompleteMap(ApplicationModel model) {\n        var all = new HashMap<ArtifactKey, DepNode>();\n        var root = new DepNode(0, model.getAppArtifact());\n        all.put(model.getAppArtifact().getKey(), root);\n        int i = 1;\n        for (var d : model.getDependencies()) {\n            all.put(d.getKey(), new DepNode(i++, d));\n        }\n        return all;\n    }\n\n    /**\n     * Path from a target to the root","sourceCodeStart":327,"sourceCodeEnd":363,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/devui/deployment/src/main/java/io/quarkus/devui/deployment/menu/DependenciesProcessor.java#L327-L363","documentation":"The Dev UI Dependencies processor resolves a user-selected artifact to its node in the resolved application model so dependents can be computed. getTargetWithAllDependents throws IllegalArgumentException when no resolved dependency in the ApplicationModel matches the target's group/artifact/type/version. The requested coordinate is not among the application's dependencies as resolved at build time.","triggerScenarios":"Invoking the Dev UI dependencies action (e.g. 'show dependents' for an artifact) with coordinates that don't correspond exactly — G:A:classifier:type:version — to any node in the resolved dependency tree.","commonSituations":"Dev UI page stale after adding/removing a dependency (the app was hot-reloaded); a version was upgraded so the exact version string no longer matches; typos or a classifier/type mismatch in the request.","solutions":["Refresh the Dev UI dependencies page so it sends coordinates from the current application model.","Verify the artifact/version exists in the build file (pom.xml/build.gradle) and matches the request exactly, including classifier and type.","Reload/restart dev mode after dependency changes so the ApplicationModel is rebuilt.","Check that you are passing the fully resolved version (not a property placeholder or wildcard)."],"exampleFix":"// before (stale coordinates from earlier model)\n{\"groupId\":\"com.example\",\"artifactId\":\"lib\",\"version\":\"1.0.0\"}\n\n// after (version actually resolved now)\n{\"groupId\":\"com.example\",\"artifactId\":\"lib\",\"version\":\"1.2.0\"}","handlingStrategy":"validation","validationCode":"boolean exists = model.getDependencies().stream().anyMatch(d ->\n    d.getGroupId().equals(g) && d.getArtifactId().equals(a) &&\n    d.getVersion().equals(v) && d.getType().equals(t));\nif (!exists) throw new IllegalArgumentException(\"Unknown dependency: \" + g + \":\" + a + \":\" + v);","typeGuard":null,"tryCatchPattern":"try { DepNode dep = getTargetWithAllDependents(model, coords); ... }\ncatch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"among the dependencies\")) {\n        refreshApplicationModelAndRetry(); // stale model, reload page\n    } else throw e;\n}","preventionTips":["Refresh the Dev UI dependencies view after any pom.xml change","Send fully resolved coordinates (no property placeholders or wildcards)","Restart dev mode after dependency version changes"],"tags":["devui","dependencies","application-model","not-found"],"backgroundTag":"dependency-not-found","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"}