{"record":{"id":"c253f3c71cc7d93f","repo":"opendataloader-project/opendataloader-pdf","slug":"google-document-ai-backend-is-not-yet-implemented","errorCode":null,"errorMessage":"Google Document AI backend is not yet implemented","messagePattern":"Google Document AI backend is not yet implemented","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"java/opendataloader-pdf-core/src/main/java/org/opendataloader/pdf/hybrid/HybridClientFactory.java","lineNumber":102,"sourceCode":"        String lowerHybrid = hybrid.toLowerCase();\n\n        return CLIENT_CACHE.computeIfAbsent(lowerHybrid, key -> createClient(key, config));\n    }\n\n    /**\n     * Creates a new hybrid client instance.\n     */\n    private static HybridClient createClient(String hybrid, HybridConfig config) {\n        if (BACKEND_DOCLING_FAST.equals(hybrid)) {\n            return new DoclingFastServerClient(config);\n        } else if (BACKEND_HANCOM.equals(hybrid)) {\n            return new HancomClient(config);\n        } else if (BACKEND_HANCOM_AI.equals(hybrid)) {\n            return new HancomAIClient(config);\n        } else if (BACKEND_AZURE.equals(hybrid)) {\n            throw new UnsupportedOperationException(\"Azure Document Intelligence backend is not yet implemented\");\n        } else if (BACKEND_GOOGLE.equals(hybrid)) {\n            throw new UnsupportedOperationException(\"Google Document AI backend is not yet implemented\");\n        } else {\n            throw new IllegalArgumentException(\"Unknown hybrid backend: \" + hybrid +\n                \". Supported backends: \" + getSupportedBackends());\n        }\n    }\n\n    /**\n     * Creates a hybrid client for the specified backend.\n     *\n     * @param hybrid The backend type (e.g., \"docling\", \"hancom\", \"azure\", \"google\").\n     * @param config The configuration for the hybrid client.\n     * @return A new HybridClient instance for the specified backend.\n     * @throws IllegalArgumentException If the backend type is unknown or not supported.\n     * @deprecated Use {@link #getOrCreate(String, HybridConfig)} instead to reuse clients.\n     */\n    @Deprecated\n    public static HybridClient create(String hybrid, HybridConfig config) {\n        return getOrCreate(hybrid, config);","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/opendataloader-project/opendataloader-pdf/blob/a7789b8e77dd05e2b8659eb3ea12fc458f80bfb8/java/opendataloader-pdf-core/src/main/java/org/opendataloader/pdf/hybrid/HybridClientFactory.java#L84-L120","documentation":"The 'google' backend type is declared as a constant (BACKEND_GOOGLE) and routed by the factory, but no GoogleHybridClient implementation exists yet. An UnsupportedOperationException signals this is a planned feature. The error is intentionally distinct from the 'Unknown hybrid backend' IllegalArgumentException to distinguish 'recognized but not built' from 'completely unrecognized'.","triggerScenarios":"Calling HybridClientFactory.getOrCreate('google', config) or HybridClientFactory.create('google', config). The factory matches BACKEND_GOOGLE and throws the stub exception. This can occur when a configuration file or CLI default references 'google' expecting Google Document AI support.","commonSituations":"Project documentation mentions Google Document AI as a future backend; a user migrating from a Google-Cloud-centric workflow defaults to 'google'; the Javadoc on getOrCreate lists 'google' as an example backend name, creating false expectations.","solutions":["Use a currently-implemented backend instead: 'docling-fast', 'hancom', or 'hancom-ai'.","If Google Document AI is required, call it directly via the Google Cloud Document AI client library and adapt the output.","Check the project roadmap for when Google backend support is planned.","Contribute a GoogleHybridClient implementation following the HybridClient interface."],"exampleFix":"// before: google is not yet implemented\nHybridClient client = HybridClientFactory.getOrCreate(\"google\", config);\n\n// after: use an implemented backend\nHybridClient client = HybridClientFactory.getOrCreate(\"hancom\", config);\n// or call Google Document AI directly via google-cloud-documentai SDK","handlingStrategy":"validation","validationCode":"// Validate backend is implemented before calling the factory\nSet<String> implementedBackends = Set.of(\n    HybridClientFactory.BACKEND_DOCLING_FAST,\n    HybridClientFactory.BACKEND_HANCOM,\n    HybridClientFactory.BACKEND_HANCOM_AI\n);\nif (!implementedBackends.contains(backend)) {\n    throw new IllegalArgumentException(\n        \"Backend '\" + backend + \"' is not yet implemented. Available: \" + implementedBackends);\n}","typeGuard":"public static boolean isImplementedBackend(String backend) {\n    return HybridClientFactory.BACKEND_DOCLING_FAST.equals(backend)\n        || HybridClientFactory.BACKEND_HANCOM.equals(backend)\n        || HybridClientFactory.BACKEND_HANCOM_AI.equals(backend);\n}","tryCatchPattern":"try {\n    client = HybridClientFactory.getOrCreate(backend, config);\n} catch (UnsupportedOperationException e) {\n    if (e.getMessage().contains(\"not yet implemented\")) {\n        LOGGER.warning(\"Backend '\" + backend + \"' not implemented. Falling back to 'hancom'.\");\n        client = HybridClientFactory.getOrCreate(HybridClientFactory.BACKEND_HANCOM, config);\n    } else {\n        throw e;\n    }\n}","preventionTips":["Check the release notes for when google backend support is planned.","Filter unsupported backends from user-facing CLI help text.","If Google Document AI is required now, integrate google-cloud-documentai SDK directly.","Validate backend names against implemented backends before calling the factory."],"tags":["hybrid","factory","not-implemented","google","unsupported"],"backgroundTag":null,"analyzedSha":"a7789b8e77dd05e2b8659eb3ea12fc458f80bfb8","analyzedAt":"2026-08-14T05:22:03.953Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}