{"record":{"id":"30331af933fd526b","repo":"github/copilot-sdk","slug":"blank-or-missing-version-property-in","errorCode":null,"errorMessage":"Blank or missing 'version' property in ","messagePattern":"Blank or missing 'version' property in ","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"java/sdk/src/main/java/com/github/copilot/ffi/NativeRuntimeLoader.java","lineNumber":281,"sourceCode":"        }\n        return version;\n    }\n\n    private static String readNativePackageVersion(ClassLoader loader, String classifier) throws IOException {\n        String resourcePath = \"native/\" + classifier + \"/\" + PLATFORM_PROPERTIES_FILENAME;\n        URL resource = loader.getResource(resourcePath);\n        if (resource == null) {\n            throw new FileNotFoundException(\"Native runtime metadata not found on classpath: \" + resourcePath\n                    + \" — add the matching classifier JAR to the classpath\");\n        }\n\n        Properties props = new Properties();\n        try (InputStream in = resource.openStream()) {\n            props.load(in);\n        }\n        String version = props.getProperty(\"version\");\n        if (version == null || version.isBlank()) {\n            throw new IllegalStateException(\"Blank or missing 'version' property in \" + resourcePath);\n        }\n        return version;\n    }\n\n    /**\n     * Resolves the runtime binary path using the given parameters. Package-private\n     * to allow injection of test doubles in unit tests.\n     */\n    static Path resolve(String cliPathEnv, Path cacheBase, ClassLoader loader, String classifier, String version)\n            throws IOException {\n        return resolve(cliPathEnv, cacheBase, loader, classifier, version, null, DEFAULT_PUBLISHER);\n    }\n\n    static Path resolve(String cliPathEnv, String bundledCliPath, Path cacheBase, ClassLoader loader, String classifier,\n            String version) throws IOException {\n        Path bundledCliDir = bundledCliPath == null ? null : Path.of(bundledCliPath).toAbsolutePath().getParent();\n        return resolve(cliPathEnv, cacheBase, loader, classifier, version, bundledCliDir, DEFAULT_PUBLISHER);\n    }","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/github/copilot-sdk/blob/cd8cf15dc3f9e762615790aaed0a771a0f392755/java/sdk/src/main/java/com/github/copilot/ffi/NativeRuntimeLoader.java#L263-L299","documentation":"The native/<classifier>/platform.properties resource exists but its `version` property is blank or absent. The classifier JAR was packaged without this metadata being set, so the native package version needed for the cache path cannot be read.","triggerScenarios":"A hand-built or misconfigured classifier JAR where platform.properties was copied without a version value; an empty or truncated properties file inside the JAR; resource filtering for the native module skipped during its build.","commonSituations":"Locally rebuilt classifier JARs (mvn install on the native module with filtering broken); corrupted downloads of the classifier artifact; internal forks of the native packaging pipeline that dropped the version substitution.","solutions":["Rebuild/replace the classifier JAR from the official release so platform.properties contains version=<native-version>.","Inspect the artifact: unzip -p copilot-sdk-native-linux-x64.jar native/<classifier>/platform.properties.","Purge the local Maven cache copy (~/.m2/repository/.../copilot-sdk-native-*) and re-download to rule out a corrupted artifact.","If building the native module yourself, ensure its resource filtering writes the version property."],"exampleFix":"// before: native/<classifier>/platform.properties inside jar\nversion=\n\n// after (regenerate artifact)\nversion=20241105.1","handlingStrategy":"validation","validationCode":"try (InputStream in = getClass().getResourceAsStream(\"/native/\" + classifier + \"/platform.properties\")) {\n    Properties p = new Properties(); p.load(in);\n    if (p.getProperty(\"version\") == null || p.getProperty(\"version\").isBlank())\n        throw new IllegalStateException(\"platform.properties in classifier JAR has no version — rebuild artifact\");\n}\n","typeGuard":null,"tryCatchPattern":"try {\n    Path runtime = NativeRuntimeLoader.resolve();\n} catch (IllegalStateException e) {\n    if (e.getMessage().startsWith(\"Blank or missing 'version' property in native/\")) {\n        throw new IllegalStateException(\"Classifier JAR is mis-packaged; replace with an official release artifact\", e);\n    } else throw e;\n}","preventionTips":["Use official release classifier JARs; avoid hand-built repacks.","Verify platform.properties version is non-empty as part of artifact CI.","Purge and re-download artifacts suspected of corruption from ~/.m2.","If forking the native packaging, keep the version substitution step intact."],"tags":["native-loader","classpath","metadata","versioning"],"backgroundTag":"missing-config-value","analyzedSha":"cd8cf15dc3f9e762615790aaed0a771a0f392755","analyzedAt":"2026-09-09T18:32:31.973Z","contentChangedAt":"2026-09-09T18:32:31.973Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}