{"record":{"id":"9535cb5d06d8756f","repo":"quarkusio/quarkus","slug":"failed-to-cache-a-new-instance-of-io-quarkus-maven","errorCode":null,"errorMessage":"Failed to cache a new instance of io.quarkus.maven.QuarkusMavenAppBootstrap","messagePattern":"Failed to cache a new instance of io\\.quarkus\\.maven\\.QuarkusMavenAppBootstrap","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/QuarkusBootstrapProvider.java","lineNumber":189,"sourceCode":"        return bootstrapId == null ? moduleKey.toGacString() : moduleKey.toGacString() + \"-\" + bootstrapId;\n    }\n\n    @Deprecated(forRemoval = true)\n    public RepositorySystem repositorySystem() {\n        return workspaceProvider.getRepositorySystem();\n    }\n\n    @Deprecated(forRemoval = true)\n    public RemoteRepositoryManager remoteRepositoryManager() {\n        return remoteRepoManager;\n    }\n\n    public QuarkusMavenAppBootstrap bootstrapper(QuarkusBootstrapMojo mojo) {\n        try {\n            return appBootstrapProviders.get(getBootstrapProviderId(mojo.projectId(), mojo.bootstrapId()),\n                    QuarkusMavenAppBootstrap::new);\n        } catch (ExecutionException e) {\n            throw new IllegalStateException(\"Failed to cache a new instance of \" + QuarkusMavenAppBootstrap.class.getName(),\n                    e);\n        }\n    }\n\n    public CuratedApplication bootstrapApplication(QuarkusBootstrapMojo mojo, LaunchMode mode)\n            throws MojoExecutionException {\n        return bootstrapApplication(mojo, mode, null);\n    }\n\n    public CuratedApplication bootstrapApplication(QuarkusBootstrapMojo mojo, LaunchMode mode,\n            Consumer<QuarkusBootstrap.Builder> builderCustomizer) throws MojoExecutionException {\n        return bootstrapper(mojo).bootstrapApplication(mojo, mode, builderCustomizer);\n    }\n\n    public void closeApplication(QuarkusBootstrapMojo mojo, LaunchMode mode) {\n        bootstrapper(mojo).closeApplication(mode);\n    }\n","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/QuarkusBootstrapProvider.java#L171-L207","documentation":"QuarkusBootstrapProvider caches QuarkusMavenAppBootstrap instances in a LoadingCache keyed by project/bootstrap id. If cache.get() throws ExecutionException while creating the bootstrap, this IllegalStateException is thrown.","triggerScenarios":"Any Quarkus Maven goal (build, dev, test, package) bootstrapping the application when the underlying cache loader itself fails — typically nested initialization errors surfaced as ExecutionException.","commonSituations":"Concurrent Maven executions colliding on the same cache; corrupted maven repo state during bootstrap; classloading problems in the bootstrap initialization; earlier goal failure leaving inconsistent state.","solutions":["Read the cause chain of the ExecutionException — the real error is inside it","Run `mvn clean` and retry to clear stale build state","Avoid running multiple Maven builds of the same project concurrently","Refresh dependencies with -U if resolution errors are in the cause","Update quarkus-maven-plugin to the latest patch version if a bootstrap bug is involved"],"exampleFix":"// before\nmvn quarkus:dev &  mvn quarkus:dev  # two concurrent dev runs\n// after\nmvn quarkus:dev  # single invocation per project workspace","handlingStrategy":"try-catch","validationCode":"// ensure no concurrent build of the same project and repo is healthy\nif (Files.exists(Path.of(\"target\"))) { /* run mvn clean if previous run failed */ }","typeGuard":null,"tryCatchPattern":"try {\n    // any quarkus mojo bootstrap\n} catch (IllegalStateException e) {\n    if (e.getMessage().contains(\"Failed to cache\")) {\n        Throwable root = e; while (root.getCause() != null) root = root.getCause();\n        log.error(\"Bootstrap creation failed: \" + root);\n    }\n}","preventionTips":["Never run two Quarkus Maven goals for the same workspace in parallel","mvn clean after interrupted builds","Keep the plugin updated to get bootstrap fixes"],"tags":["maven","bootstrap","cache"],"backgroundTag":"bootstrap-initialization-failed","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}