{"record":{"id":"219aa494b4d5735c","repo":"quarkusio/quarkus","slug":"dependency-node-has-already-been-associated-with","errorCode":null,"errorMessage":"Dependency node  has already been associated with an extension dependency","messagePattern":"Dependency node  has already been associated with an extension dependency","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyResolver.java","lineNumber":982,"sourceCode":"        final ExtensionInfo info;\n        final DependencyNode runtimeNode;\n        final Collection<Exclusion> exclusions;\n        boolean conditionalDepsQueued;\n        private List<ExtensionDependency> extDeps;\n        private DependencyNode deploymentNode;\n        private boolean presentInTargetGraph;\n\n        ExtensionDependency(ExtensionInfo info, DependencyNode node, Collection<Exclusion> exclusions) {\n            this.runtimeNode = node;\n            this.info = info;\n            this.exclusions = exclusions;\n\n            @SuppressWarnings(\"unchecked\")\n            final Map<Object, Object> data = (Map<Object, Object>) node.getData();\n            if (data.isEmpty()) {\n                node.setData(QUARKUS_EXTENSION_DEPENDENCY, this);\n            } else if (data.put(QUARKUS_EXTENSION_DEPENDENCY, this) != null) {\n                throw new IllegalStateException(\n                        \"Dependency node \" + node + \" has already been associated with an extension dependency\");\n            }\n        }\n\n        void addExtensionDependency(ExtensionDependency dep) {\n            if (extDeps == null) {\n                extDeps = new ArrayList<>();\n            }\n            extDeps.add(dep);\n        }\n\n        private void collectDeploymentDeps() {\n            log.debugf(\"Collecting dependencies of %s\", info.deploymentArtifact);\n            deploymentNode = collectDependencies(info.deploymentArtifact, exclusions, runtimeNode.getRepositories());\n            if (deploymentNode.getChildren().isEmpty()) {\n                throw new RuntimeException(\n                        \"Failed to collect dependencies of \" + deploymentNode.getArtifact()\n                                + \": either its POM could not be resolved from the available Maven repositories \"","sourceCodeStart":964,"sourceCodeEnd":1000,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/maven-resolver/src/main/java/io/quarkus/bootstrap/resolver/maven/ApplicationDependencyResolver.java#L964-L1000","documentation":"ExtensionDependency attaches itself to a Maven dependency node via node.setData(QUARKUS_EXTENSION_DEPENDENCY, this). If the node already has data and the key is already taken, a different ExtensionDependency was previously bound to the same node — an internal invariant violation indicating the resolver tried to process the same runtime extension node twice. This is an IllegalStateException (a bug/consistency guard), not a user-input problem.","triggerScenarios":"The ExtensionDependency constructor is invoked twice for the same DependencyNode that already carries non-empty data with QUARKUS_EXTENSION_DEPENDENCY set — i.e. the same runtime extension artifact node is visited by two different extension processing paths (e.g. a direct and a conditional dependency both resolving to the identical node).","commonSituations":"Unusual dependency graphs where the same runtime artifact node appears through multiple paths (workspace projects, locally-installed extension builds); custom Maven resolver implementations; Quarkus bootstrap bugs triggered by exotic graph shapes (cycles or relocated artifacts).","solutions":["This is an internal consistency guard — capture the full stack trace and dependency tree (mvn dependency:tree) and report it to Quarkus (bootstrap maven-resolver issue).","Clean local state: delete the relevant artifacts from ~/.m2/repository and rebuild incrementally from scratch.","Try disabling workspace discovery / local project resolution if you're building with locally installed extension snapshots, and use remote artifacts instead.","Upgrade Quarkus — graph-processing edge cases are fixed regularly in the bootstrap resolver."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    quarkusBuild();\n} catch (IllegalStateException e) {\n    if (e.getMessage().contains(\"already been associated with an extension dependency\")) {\n        throw new IllegalStateException(\"Quarkus bootstrap internal bug; report with mvn dependency:tree output\", e);\n    }\n    throw e;\n}","preventionTips":["Keep Quarkus and bootstrap versions current — this is an internal invariant, fixed upstream.","Avoid mixing locally-installed snapshot extensions with released platform extensions.","Report the full stack trace plus dependency tree to the Quarkus project.","Test with a clean ~/.m2/repository to rule out stale state."],"tags":["quarkus-bootstrap","internal-state","dependency-graph"],"backgroundTag":"internal-state-corruption","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}