alibaba/spring-ai-alibaba · error · InvalidProjectRequestException
Dependency '${depId}' is not compatible with Spring Boot ${p
Error message
Dependency '${depId}' is not compatible with Spring Boot ${platformVersion} What it means
validateDependencyRange() checks each resolved Dependency's compatibility range against the requested Spring Boot platform version via dep.match(platformVersion). A dependency whose version range excludes the requested Boot version causes InvalidProjectRequestException('Dependency X is not compatible with Spring Boot <version>'). This prevents generating projects that combine a Boot version a dependency does not support.
Source
Thrown at spring-ai-alibaba-admin/spring-ai-alibaba-admin-server-start/src/main/java/com/alibaba/cloud/ai/studio/admin/builder/generator/service/generator/GraphProjectReqToDescConverter.java:180
"Unknown packaging '" + packaging + "' check project metadata");
}
}
}
private void validateDependencies(ProjectRequest request, InitializrMetadata metadata) {
List<String> dependencies = request.getDependencies();
dependencies.forEach((dep) -> {
Dependency dependency = metadata.getDependencies().get(dep);
if (dependency == null) {
throw new InvalidProjectRequestException("Unknown dependency '" + dep + "' check project metadata");
}
});
}
private void validateDependencyRange(Version platformVersion, List<Dependency> resolvedDependencies) {
resolvedDependencies.forEach((dep) -> {
if (!dep.match(platformVersion)) {
throw new InvalidProjectRequestException(
"Dependency '" + dep.getId() + "' is not compatible " + "with Spring Boot " + platformVersion);
}
});
}
private BuildSystem getBuildSystem(ProjectRequest request, InitializrMetadata metadata) {
Map<String, String> typeTags = metadata.getTypes().get(request.getType()).getTags();
String id = typeTags.get("build");
String dialect = typeTags.get("dialect");
return BuildSystem.forIdAndDialect(id, dialect);
}
private Version getPlatformVersion(ProjectRequest request, InitializrMetadata metadata) {
String versionText = (request.getBootVersion() != null) ? request.getBootVersion()
: metadata.getBootVersions().getDefault().getId();
Version version = Version.parse(versionText);
return this.platformVersionTransformer.transform(version, metadata);
}View on GitHub (pinned to f82da0b50f)
Solutions
- Raise the request's bootVersion to one within every dependency's compatibility range (e.g. latest 3.x)
- Or drop/replace the incompatible dependency from the request
- Update the dependency's compatibilityRange in initializr metadata if it is unnecessarily restrictive
Example fix
// before
request.setBootVersion("3.0.0");
request.setDependencies(List.of("spring-ai-alibaba-starter-dashscope")); // needs Boot >= 3.2
// after
request.setBootVersion("3.2.5");
request.setDependencies(List.of("spring-ai-alibaba-starter-dashscope")); Defensive patterns
Strategy: validation
Validate before calling
// client-side guard
if (requestedBootVersion.compareTo(Version.safeParse("3.2.0")) < 0 && deps.contains("spring-ai-alibaba-starter-dashscope")) {
throw new IllegalArgumentException("starter requires Spring Boot 3.2+");
} Try / catch
try {
converter.doConvert(request, metadata);
} catch (InvalidProjectRequestException e) {
return ResponseEntity.badRequest().body(e.getMessage());
} Prevention
- Check each dependency's compatibilityRange in metadata before selecting a bootVersion
- Prefer the metadata's default Boot version
- Track dependency minimum-Boot bumps in release notes
When it happens
Trigger: Requesting a project with dependencies whose metadata compatibility ranges (initializr dependency 'compatibilityRange') do not include the request's bootVersion — e.g. a Spring AI starter requiring Boot 3.2+ while requesting bootVersion 3.0.x.
Common situations: Mixing an old Boot version with newer Spring AI Alibaba starters, initializr metadata declaring narrow compatibility ranges, upgrading a dependency that raised its minimum supported Boot version.
Understand the failure class
Background: "is not a compatible type" / "cannot merge" errors: when a value's type doesn't match what the library requires — this error's family across 65 libraries.
Related errors
- Invalid Spring Boot version '${platformVersion}', Spring Boo
- Unknown dependency '${dep}' check project metadata
- MISSING_PARAMS
- not found default-default-application.yml
- parse default-default-application.yml failed
AI-assisted analysis of alibaba/spring-ai-alibaba@f82da0b50f (2026-09-09).
Data as JSON: /api/errors/7c811948a04cec4c.
Report an issue: GitHub.