{"record":{"id":"e3278ce44a4b9ed1","repo":"conductor-oss/conductor","slug":"missing-jar-file","errorCode":null,"errorMessage":"missing Jar file ","messagePattern":"missing Jar file ","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"annotations-processor/src/main/java/com/netflix/conductor/annotationsprocessor/protogen/ProtoGen.java","lineNumber":111,"sourceCode":"        Handlebars handlebars =\n                new Handlebars(loader)\n                        .infiniteLoops(true)\n                        .prettyPrint(true)\n                        .with(EscapingStrategy.NOOP);\n\n        Template protoFile = handlebars.compile(\"file\");\n\n        for (ProtoFile file : protoFiles) {\n            File filename = new File(root, file.getFilePath());\n            try (Writer writer = new FileWriter(filename)) {\n                System.out.printf(\"protogen: writing '%s'...\\n\", filename);\n                protoFile.apply(file, writer);\n            }\n        }\n    }\n\n    public void processPackage(File jarFile, String packageName) throws IOException {\n        if (!jarFile.isFile()) throw new IOException(\"missing Jar file \" + jarFile);\n\n        URL[] urls = new URL[] {jarFile.toURI().toURL()};\n        ClassLoader loader =\n                new URLClassLoader(urls, Thread.currentThread().getContextClassLoader());\n        ClassPath cp = ClassPath.from(loader);\n\n        System.out.printf(\"protogen: processing Jar '%s'\\n\", jarFile);\n        for (ClassPath.ClassInfo info : cp.getTopLevelClassesRecursive(packageName)) {\n            try {\n                processClass(info.load());\n            } catch (NoClassDefFoundError ignored) {\n            }\n        }\n    }\n\n    public void processClass(Class<?> obj) {\n        if (obj.isAnnotationPresent(ProtoMessage.class)) {\n            System.out.printf(\"protogen: found %s\\n\", obj.getCanonicalName());","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/annotations-processor/src/main/java/com/netflix/conductor/annotationsprocessor/protogen/ProtoGen.java#L93-L129","documentation":"Thrown as IOException by ProtoGen.processPackage when the supplied jarFile is not a regular file (!jarFile.isFile()). protogen scans the jar's classes via a URLClassLoader + ClassPath, so a missing/inaccessible jar means there is nothing to introspect for @ProtoMessage annotations.","triggerScenarios":"Running ProtoGenTask with a --sourceJar path that does not exist, points to a directory, or is unreadable. processPackage is called early in generate() and fails before any class scanning.","commonSituations":"Build misconfiguration pointing sourceJar at a stale or not-yet-built artifact; relative path resolved against an unexpected working directory; jar deleted by a clean step; typo in the path argument.","solutions":["Verify the sourceJar path exists and is a file: new File(path).isFile() must be true before running protogen.","Use an absolute path for sourceJar to avoid working-directory ambiguity.","Ensure the upstream jar build (the artifact containing @ProtoMessage classes) runs before protogen.","Check file permissions if the path exists but isFile() returns false (e.g., it is a directory)."],"exampleFix":"// before\n--sourceJar build/libs/app.jar   // not built yet\n// after\n./gradlew jar && --sourceJar $(pwd)/build/libs/app.jar","handlingStrategy":"validation","validationCode":"import java.io.File;\nFile jar = new File(sourceJarPath);\nif (!jar.isFile()) {\n    throw new IllegalArgumentException(\n        \"sourceJar does not exist or is not a file: \" + jar.getAbsolutePath());\n}\n// only then: generator.processPackage(jar, packageName);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pass an absolute path for sourceJar.","Ensure the upstream jar build runs before protogen.","Verify isFile() (not just exists()) to catch directory-vs-file mistakes."],"tags":["protogen","build","configuration","classpath"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}