quarkusio/quarkus · error · RuntimeException
Additional application archives can only be provided from th
Error message
Additional application archives can only be provided from the user providers directory. ${path} is not present in ${userProviders} What it means
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.
Source
Thrown at core/deployment/src/main/java/io/quarkus/deployment/pkg/jar/AbstractFastJarBuilder.java:271
executorService, treeShakeResult, newFilePermissions);
} else if (includeAppDependency(appDep, outputTarget.getIncludedOptionalDependencies(), removedArtifactKeys)) {
appDep.getResolvedPaths().forEach(fastJarJarsBuilder::addDependency);
}
if (parentFirstArtifactKeys.contains(appDep.getKey())) {
appDep.getResolvedPaths().forEach(parentFirst::add);
bootArtifacts.add(appDep);
if ("quarkus-bootstrap-runner".equals(appDep.getArtifactId())) {
List<Path> paths = copiedArtifacts.get(appDep.getKey());
if (paths != null && !paths.isEmpty()) {
bootstrapRunnerPath = paths.get(0);
}
}
}
}
for (AdditionalApplicationArchiveBuildItem i : additionalApplicationArchives) {
for (Path path : i.getResolvedPaths()) {
if (!path.getParent().equals(userProviders)) {
throw new RuntimeException(
"Additional application archives can only be provided from the user providers directory. " + path
+ " is not present in " + userProviders);
}
fastJarJarsBuilder.addDependency(path);
}
}
Path appInfo = buildDir.resolve(QuarkusEntryPoint.QUARKUS_APPLICATION_DAT);
FastJarJars fastJarJars = fastJarJarsBuilder.build();
try (OutputStream out = Files.newOutputStream(appInfo)) {
List<Path> allJars = new ArrayList<>();
if (fastJarJars.transformedJar != null) {
allJars.add(fastJarJars.transformedJar);
}
allJars.add(fastJarJars.generatedJar);
allJars.add(fastJarJars.runnerJar);
List<Path> sortedDeps = new ArrayList<>(fastJarJars.dependencies);
Collections.sort(sortedDeps);View on GitHub (pinned to e1c734241f)
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.
Example fix
// before cp mylib.jar target/quarkus-app/lib/main/ // after cp mylib.jar providers/ ./mvnw package -Dquarkus.package.user-providers=providers
Defensive patterns
Strategy: validation
Validate before calling
Path userProviders = Path.of("providers").toAbsolutePath();
for (Path jar : additionalJars) {
if (!jar.getParent().equals(userProviders)) {
throw new IllegalStateException("Additional archive must be in " + userProviders + ": " + jar);
}
} Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- Failed to load CodeGenProvider class from deployment classlo
- Failed to read %s
- Failed to read resources from classpath
- remote-dev can only be used with mutable applications i.e. u
- Failed to open class path file <file>
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/0f24d5be1c66854d.
Report an issue: GitHub.