{"record":{"id":"9cde18ce004928bf","repo":"quarkusio/quarkus","slug":"graphql-graphql-client-js-not-found-on-classpath","errorCode":null,"errorMessage":"graphql/graphql-client.js not found on classpath","messagePattern":"graphql/graphql-client\\.js not found on classpath","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java","lineNumber":521,"sourceCode":"            }\n        }\n    }\n\n    @BuildStep\n    void generateJsClient(\n            SmallRyeGraphQLConfig graphQLConfig,\n            SmallRyeGraphQLSchemaBuildItem schemaBuildItem,\n            HttpRootPathBuildItem httpRootPathBuildItem,\n            BuildProducer<GeneratedStaticResourceBuildItem> staticResourceProducer) {\n\n        if (!graphQLConfig.jsClient().enabled()) {\n            return;\n        }\n\n        ClassLoader tccl = Thread.currentThread().getContextClassLoader();\n        try (InputStream is = tccl.getResourceAsStream(\"graphql/graphql-client.js\")) {\n            if (is == null) {\n                throw new IllegalStateException(\"graphql/graphql-client.js not found on classpath\");\n            }\n            staticResourceProducer.produce(\n                    new GeneratedStaticResourceBuildItem(\n                            \"/_static/quarkus-graphql/graphql-client.js\",\n                            IoUtil.readBytes(is)));\n        } catch (IOException e) {\n            throw new UncheckedIOException(e);\n        }\n\n        try (InputStream is = tccl.getResourceAsStream(\"graphql/graphql-client.d.ts\")) {\n            if (is == null) {\n                throw new IllegalStateException(\"graphql/graphql-client.d.ts not found on classpath\");\n            }\n            staticResourceProducer.produce(\n                    new GeneratedStaticResourceBuildItem(\n                            \"/_static/quarkus-graphql/graphql-client.d.ts\",\n                            IoUtil.readBytes(is)));\n        } catch (IOException e) {","sourceCodeStart":503,"sourceCodeEnd":539,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/smallrye-graphql/deployment/src/main/java/io/quarkus/smallrye/graphql/deployment/SmallRyeGraphQLProcessor.java#L503-L539","documentation":"SmallRyeGraphQLProcessor.generateJsClient copies the bundled JavaScript GraphQL client (graphql/graphql-client.js) from the processor's classpath into generated static resources for the GraphQL UI. If the resource cannot be loaded from the TCCL, it throws IllegalStateException 'graphql/graphql-client.js not found on classpath', indicating a broken/partial extension deployment artifact rather than a user code problem.","triggerScenarios":"During an application build with the GraphQL UI enabled (quarkus.smallrye-graphql.ui.enabled, default true in dev/test and with UI dependencies present) when the runtime/deployment artifact of the extension is inconsistent — e.g. a partially corrupted local Maven repository, a mismatched quarkus-smallrye-graphql version on the classpath, or a custom build that stripped resources.","commonSituations":"Corrupted ~/.m2 repository after an interrupted download; mixing quarkus-smallrye-graphql versions via dependencyManagement overrides; shading/repackaging Quarkus deployment artifacts; running an old incremental build output after upgrading Quarkus.","solutions":["Clean the local Maven repo entry for io.quarkus:quarkus-smallrye-graphql-* and rebuild (delete ~/.m2/repository/io/quarkus/quarkus-smallrye-graphql*, then ./mvnw clean install -U)","Run ./mvnw clean so stale build outputs from a previous Quarkus version are discarded","Verify all io.quarkus:* dependencies resolve to the same Quarkus version (mvn dependency:tree, align quarkus.platform.version / quarkus-bom)","If the UI is not needed, disable it with quarkus.smallrye-graphql.ui.enabled=false to skip the resource generation"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Verify the resource is present in the resolved deployment artifact before building\ntry (JarFile jar = new JarFile(\"~/.m2/repository/io/quarkus/quarkus-smallrye-graphql/<v>/quarkus-smallrye-graphql-<v>.jar\")) {\n    if (jar.getEntry(\"graphql/graphql-client.js\") == null) {\n        System.err.println(\"Corrupted quarkus-smallrye-graphql artifact - re-download\");\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-download artifacts with -U after interrupted builds","Keep all io.quarkus dependencies on one version via quarkus-bom","Run ./mvnw clean when switching Quarkus versions","Disable the UI (quarkus.smallrye-graphql.ui.enabled=false) when unused"],"tags":["graphql","classpath","build-time","static-resources"],"backgroundTag":"missing-classpath-resource","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}