{"record":{"id":"0f24d5be1c66854d","repo":"quarkusio/quarkus","slug":"additional-application-archives-can-only-be-provid","errorCode":null,"errorMessage":"Additional application archives can only be provided from the user providers directory. ${path} is not present in ${userProviders}","messagePattern":"Additional application archives can only be provided from the user providers directory\\. (.+?) is not present in (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"core/deployment/src/main/java/io/quarkus/deployment/pkg/jar/AbstractFastJarBuilder.java","lineNumber":271,"sourceCode":"                        executorService, treeShakeResult, newFilePermissions);\n            } else if (includeAppDependency(appDep, outputTarget.getIncludedOptionalDependencies(), removedArtifactKeys)) {\n                appDep.getResolvedPaths().forEach(fastJarJarsBuilder::addDependency);\n            }\n            if (parentFirstArtifactKeys.contains(appDep.getKey())) {\n                appDep.getResolvedPaths().forEach(parentFirst::add);\n                bootArtifacts.add(appDep);\n                if (\"quarkus-bootstrap-runner\".equals(appDep.getArtifactId())) {\n                    List<Path> paths = copiedArtifacts.get(appDep.getKey());\n                    if (paths != null && !paths.isEmpty()) {\n                        bootstrapRunnerPath = paths.get(0);\n                    }\n                }\n            }\n        }\n        for (AdditionalApplicationArchiveBuildItem i : additionalApplicationArchives) {\n            for (Path path : i.getResolvedPaths()) {\n                if (!path.getParent().equals(userProviders)) {\n                    throw new RuntimeException(\n                            \"Additional application archives can only be provided from the user providers directory. \" + path\n                                    + \" is not present in \" + userProviders);\n                }\n                fastJarJarsBuilder.addDependency(path);\n            }\n        }\n\n        Path appInfo = buildDir.resolve(QuarkusEntryPoint.QUARKUS_APPLICATION_DAT);\n        FastJarJars fastJarJars = fastJarJarsBuilder.build();\n        try (OutputStream out = Files.newOutputStream(appInfo)) {\n            List<Path> allJars = new ArrayList<>();\n            if (fastJarJars.transformedJar != null) {\n                allJars.add(fastJarJars.transformedJar);\n            }\n            allJars.add(fastJarJars.generatedJar);\n            allJars.add(fastJarJars.runnerJar);\n            List<Path> sortedDeps = new ArrayList<>(fastJarJars.dependencies);\n            Collections.sort(sortedDeps);","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/core/deployment/src/main/java/io/quarkus/deployment/pkg/jar/AbstractFastJarBuilder.java#L253-L289","documentation":"AbstractFastJarBuilder.build throws this RuntimeException when an additional application archive is not located directly inside the user providers directory. In the fast-jar layout, additional archives must come from the user providers directory so they can be placed on the lib directory classpath correctly; any archive elsewhere is rejected.","triggerScenarios":"Building a fast-jar (or uber-jar over fast jar) while additionalApplicationArchives contains a resolved path whose parent directory is not the configured userProviders directory (quarkus.bootstrap.user-providers-directory / quarkus.args-style provider dir).","commonSituations":"Adding extra jars to the application via build items or configuration without placing them in the user providers directory; pointing an additional archive at a jar in target/dependency or an arbitrary path.","solutions":["Move the additional archive(s) into the user providers directory so their parent equals userProviders.","Configure quarkus.user-providers (or the providers directory option) to point at the directory holding your extra jars.","Remove the additionalApplicationArchiveBuildItem if the jar is already on the classpath via Maven/Gradle dependencies."],"exampleFix":"// before\ncp mylib.jar target/quarkus-app/lib/main/\n// after\ncp mylib.jar providers/\n./mvnw package -Dquarkus.package.user-providers=providers","handlingStrategy":"validation","validationCode":"Path userProviders = Path.of(\"providers\").toAbsolutePath();\nfor (Path jar : additionalJars) {\n    if (!jar.getParent().equals(userProviders)) {\n        throw new IllegalStateException(\"Additional archive must be in \" + userProviders + \": \" + jar);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always place extra runtime jars in the dedicated providers directory, not target/ or arbitrary paths.","Configure the user-providers directory explicitly in the build config.","Rely on Maven/Gradle dependencies instead of raw additional archives when possible."],"tags":["quarkus","packaging","fast-jar","classpath"],"backgroundTag":"invalid-archive-location","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"}