{"record":{"id":"a1acac579fd7d96d","repo":"quarkusio/quarkus","slug":"resource-not-found-manifestpath","errorCode":null,"errorMessage":"Resource not found: \" + manifestPath","messagePattern":"Resource not found: \" \\+ manifestPath","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"extensions/kubernetes-client/deployment/src/main/java/io/quarkus/kubernetes/client/deployment/DevServicesKubernetesProcessor.java","lineNumber":299,"sourceCode":"                }\n            }\n        } catch (Exception e) {\n            log.error(\"Failed to create Kubernetes client while trying to apply manifests.\", e);\n        }\n    }\n\n    private InputStream getManifestStream(String manifestPath) throws IOException {\n        try {\n            URL url = new URL(manifestPath);\n            // For file:// URLs, optionally check if you want to support those or not\n            return url.openStream();\n        } catch (MalformedURLException e) {\n            // Not a URL, so treat as classpath resource\n            InputStream stream = Thread.currentThread()\n                    .getContextClassLoader()\n                    .getResourceAsStream(manifestPath);\n            if (stream == null) {\n                throw new IOException(\"Resource not found: \" + manifestPath);\n            }\n            return stream;\n        }\n    }\n\n    @SuppressWarnings(\"rawtypes\")\n    private <T extends KubernetesVersionEnum<T>, C extends KubernetesContainer> C createContainer(\n            Function<KubernetesImageSpec<T>, C> constructor,\n            Class<T> versionClass,\n            KubernetesDevServiceCfg config,\n            Flavor flavor) {\n        T version = config.apiVersion\n                .map(v -> findOrElseThrow(flavor, v, versionClass))\n                .orElseGet(() -> latest(versionClass));\n\n        KubernetesImageSpec<T> imageSpec = version.withImage(config.imageName);\n        return constructor.apply(imageSpec);\n    }","sourceCodeStart":281,"sourceCodeEnd":317,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/kubernetes-client/deployment/src/main/java/io/quarkus/kubernetes/client/deployment/DevServicesKubernetesProcessor.java#L281-L317","documentation":"Dev Services for Kubernetes loads a manifest (kube resources for the kind cluster) either from a URL or, after a MalformedURLException, from the classpath. When the path is not a valid URL and no classpath resource exists at that path, an IOException 'Resource not found: <path>' is thrown.","triggerScenarios":"quarkus.kubernetes-client.dev-services.manifests (or similar dev services manifest config) references a file path that is neither a resolvable URL nor present on the classpath.","commonSituations":"Typo in the manifest path in application.properties; manifest file not placed under src/main/resources or test resources; path valid on a dev machine but absent in CI.","solutions":["Correct the manifest path in quarkus.kubernetes-client.dev-services.manifests (check spelling/relative path).","Move the manifest into src/main/resources (or test resources) so it lands on the classpath.","Verify the file exists at the configured location: ls <path>, or use an absolute file:// URL if outside the classpath."],"exampleFix":"// before\nquarkus.kubernetes-client.dev-services.manifests=manifests/kube.yaml // missing\n// after\nquarkus.kubernetes-client.dev-services.manifests=kubernetes/kube.yaml // file exists in src/main/resources","handlingStrategy":"validation","validationCode":"// Verify each configured manifest resolves before running dev services\nfor (String m : manifests) {\n    try {\n        new URL(m).openStream().close();\n    } catch (MalformedURLException e) {\n        if (Thread.currentThread().getContextClassLoader().getResourceAsStream(m) == null\n                && !Files.exists(Path.of(m))) {\n            throw new IllegalStateException(\"Manifest not resolvable: \" + m);\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    startDevServices();\n} catch (IOException e) {\n    if (e.getMessage().startsWith(\"Resource not found:\")) {\n        throw new ConfigurationException(\"Fix quarkus.kubernetes-client.dev-services.manifests path: \"\n            + e.getMessage(), e);\n    }\n    throw e;\n}","preventionTips":["Keep dev-service manifests under src/main/resources so they are on the classpath.","Use absolute file:// URLs for manifests outside the project.","Add a test that asserts every configured manifest path resolves."],"tags":["kubernetes","dev-services","manifest","classpath"],"backgroundTag":"resource-not-found","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}