opendataloader-project/opendataloader-pdf · error · UnsupportedOperationException
Azure Document Intelligence backend is not yet implemented
Error message
Azure Document Intelligence backend is not yet implemented
What it means
The 'azure' backend type is declared as a constant (BACKEND_AZURE) and accepted by the factory's routing logic, but no AzureHybridClient implementation exists yet. An UnsupportedOperationException is thrown to clearly signal that this is a planned-but-unimplemented feature, distinct from an unknown backend (which would throw IllegalArgumentException). This is a stub guard against premature use.
Source
Thrown at java/opendataloader-pdf-core/src/main/java/org/opendataloader/pdf/hybrid/HybridClientFactory.java:100
}
String lowerHybrid = hybrid.toLowerCase();
return CLIENT_CACHE.computeIfAbsent(lowerHybrid, key -> createClient(key, config));
}
/**
* Creates a new hybrid client instance.
*/
private static HybridClient createClient(String hybrid, HybridConfig config) {
if (BACKEND_DOCLING_FAST.equals(hybrid)) {
return new DoclingFastServerClient(config);
} else if (BACKEND_HANCOM.equals(hybrid)) {
return new HancomClient(config);
} else if (BACKEND_HANCOM_AI.equals(hybrid)) {
return new HancomAIClient(config);
} else if (BACKEND_AZURE.equals(hybrid)) {
throw new UnsupportedOperationException("Azure Document Intelligence backend is not yet implemented");
} else if (BACKEND_GOOGLE.equals(hybrid)) {
throw new UnsupportedOperationException("Google Document AI backend is not yet implemented");
} else {
throw new IllegalArgumentException("Unknown hybrid backend: " + hybrid +
". Supported backends: " + getSupportedBackends());
}
}
/**
* Creates a hybrid client for the specified backend.
*
* @param hybrid The backend type (e.g., "docling", "hancom", "azure", "google").
* @param config The configuration for the hybrid client.
* @return A new HybridClient instance for the specified backend.
* @throws IllegalArgumentException If the backend type is unknown or not supported.
* @deprecated Use {@link #getOrCreate(String, HybridConfig)} instead to reuse clients.
*/
@DeprecatedView on GitHub (pinned to a7789b8e77)
Solutions
- Use a currently-implemented backend instead: 'docling-fast', 'hancom', or 'hancom-ai'.
- If Azure Document Intelligence is required, call it directly via the Azure SDK and adapt the output to the library's expected format.
- Check the project roadmap or release notes for when Azure backend support is planned.
- File a feature request or contribute an AzureHybridClient implementation following the HybridClient interface.
Example fix
// before: azure is not yet implemented
HybridClient client = HybridClientFactory.getOrCreate("azure", config);
// after: use an implemented backend
HybridClient client = HybridClientFactory.getOrCreate("hancom", config);
// or call Azure DI directly via azure-ai-documentintelligence SDK Defensive patterns
Strategy: validation
Validate before calling
// Validate backend is implemented before calling the factory
Set<String> implementedBackends = Set.of(
HybridClientFactory.BACKEND_DOCLING_FAST,
HybridClientFactory.BACKEND_HANCOM,
HybridClientFactory.BACKEND_HANCOM_AI
);
if (!implementedBackends.contains(backend)) {
throw new IllegalArgumentException(
"Backend '" + backend + "' is not yet implemented. Available: " + implementedBackends);
} Type guard
public static boolean isImplementedBackend(String backend) {
return HybridClientFactory.BACKEND_DOCLING_FAST.equals(backend)
|| HybridClientFactory.BACKEND_HANCOM.equals(backend)
|| HybridClientFactory.BACKEND_HANCOM_AI.equals(backend);
} Try / catch
try {
client = HybridClientFactory.getOrCreate(backend, config);
} catch (UnsupportedOperationException e) {
if (e.getMessage().contains("not yet implemented")) {
// Use an implemented backend instead
LOGGER.warning("Backend '" + backend + "' not implemented. Falling back to 'hancom'.");
client = HybridClientFactory.getOrCreate(HybridClientFactory.BACKEND_HANCOM, config);
} else {
throw e;
}
} Prevention
- Check the release notes for when azure backend support is planned.
- Filter unsupported backends from user-facing CLI help text to avoid confusion.
- Validate backend names against the set of implemented backends before calling the factory.
- If Azure is required now, integrate azure-ai-documentintelligence SDK directly.
When it happens
Trigger: Calling HybridClientFactory.getOrCreate('azure', config) or HybridClientFactory.create('azure', config). The factory matches the BACKEND_AZURE constant and hits the explicit throw. This can also happen if a config file or CLI default was set to 'azure' in anticipation of future support.
Common situations: Documentation or examples reference 'azure' as a supported backend, but the implementation hasn't shipped yet; a CI pipeline or deployment script defaults to azure based on an outdated roadmap; the user is migrating from a different tool that supported Azure Document Intelligence and assumed this library did too.
Related errors
- Google Document AI backend is not yet implemented
- Hybrid backend type cannot be null or empty
- Unknown hybrid backend: %s. Supported backends: %s
- Unsupported hybrid backend '%s'. Supported values: %s
- Option --hybrid requires a value. Supported values: %s
AI-assisted analysis of opendataloader-project/opendataloader-pdf@a7789b8e77 (2026-08-14).
Data as JSON: /api/errors/128ce72fe6f5074a.
Report an issue: GitHub.