quarkusio/quarkus · error · IllegalArgumentException
Neither the application artifact nor the project root path h
Error message
Neither the application artifact nor the project root path has been provided
What it means
resolveAppModelForWorkspace() requires at least one of the application artifact or the project root path to locate the workspace. When both are null it throws IllegalArgumentException immediately, since there is nothing to resolve an app model against.
Source
Thrown at independent-projects/bootstrap/core/src/main/java/io/quarkus/bootstrap/BootstrapAppModelFactory.java:234
return result;
}
return resolveAppModelForWorkspace();
}
/**
* Resolves an application for a project in a workspace.
*
* @return application model
* @throws BootstrapException in case of a failure
*/
private CurationResult resolveAppModelForWorkspace() throws BootstrapException {
ResolvedDependency appArtifact = this.appArtifact;
try {
LocalProject localProject = null;
if (appArtifact == null) {
if (projectRoot == null) {
throw new IllegalArgumentException(
"Neither the application artifact nor the project root path has been provided");
}
localProject = enableClasspathCache ? loadWorkspace() : LocalProject.load(projectRoot, false);
if (localProject == null) {
log.warn("Unable to locate the maven project on the filesystem");
throw new BootstrapException(
"Failed to determine the Maven artifact associated with the application " + projectRoot);
}
appArtifact = localProject.getAppArtifact();
}
Path cachedCpPath = null;
LocalWorkspace workspace = null;
if (enableClasspathCache) {
if (localProject == null) {
localProject = loadWorkspace();
}View on GitHub (pinned to e1c734241f)
Solutions
- Call setProjectRoot(Path) with the application project directory on the factory/builder before resolving
- Or provide the app artifact via setAppArtifact(...) (GAV of the application)
- Check the configuration source that should have supplied projectRoot/appArtifact — a missing or misnamed property often leaves both null
Example fix
// before
BootstrapAppModelFactory.newInstance(curateMode).build();
// after
BootstrapAppModelFactory.newInstance(curateMode)
.setProjectRoot(Path.of("/path/to/project"))
.build(); Defensive patterns
Strategy: validation
Validate before calling
Objects.requireNonNull(projectRoot, "projectRoot or appArtifact must be set before resolveAppModel()");
if (projectRoot == null && appArtifact == null) {
throw new IllegalArgumentException("Set setProjectRoot(...) or setAppArtifact(...) on the factory");
} Try / catch
try {
return factory.resolveAppModel();
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("Neither the application artifact nor the project root path")) {
throw new IllegalStateException("Bootstrap factory misconfigured: supply projectRoot or appArtifact", e);
}
throw e;
} Prevention
- Always call setProjectRoot(...) (or setAppArtifact(...)) on BootstrapAppModelFactory before resolving
- When building the factory conditionally, assert at least one input was configured before build
- Trace the config property feeding projectRoot if it arrives null at runtime
When it happens
Trigger: Building a BootstrapAppModelFactory via its builder without calling either setAppArtifact(...) or setProjectRoot(...), then invoking resolveAppModel() (which delegates to resolveAppModelForWorkspace).
Common situations: Programmatic bootstrap (tests, tooling, dev-mode launchers) where the builder configuration was assembled conditionally and both setters were skipped; refactorings that renamed the config key feeding projectRoot so the value became null.
Related errors
- Unrecognized option for quarkus.bootstrap.misaligned-platfor
- Failed to run application
- Failed to initialize Quarkus Maven context
- Failed to create application model resolver for
- `functionName` must be either `Function<Map<String, Object>,
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/8f042cd45c7f0841.
Report an issue: GitHub.