{"record":{"id":"85507f989cd4e768","repo":"gradle/gradle","slug":"unable-to-create-output-stream-for-file-s","errorCode":null,"errorMessage":"Unable to create output stream for file %s.","messagePattern":"Unable to create output stream for file (.+?)\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"platforms/core-configuration/file-operations/src/main/java/org/gradle/api/internal/file/archive/compression/SimpleCompressor.java","lineNumber":31,"sourceCode":" * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.gradle.api.internal.file.archive.compression;\n\nimport java.io.File;\nimport java.io.FileOutputStream;\nimport java.io.OutputStream;\n\npublic class SimpleCompressor implements ArchiveOutputStreamFactory {\n\n    @Override\n    public OutputStream createArchiveOutputStream(File destination) {\n        try {\n            return new FileOutputStream(destination);\n        } catch (Exception e) {\n            String message = String.format(\"Unable to create output stream for file %s.\", destination);\n            throw new RuntimeException(message, e);\n        }\n    }\n}\n","sourceCodeStart":13,"sourceCodeEnd":35,"githubUrl":"https://github.com/gradle/gradle/blob/534f27719b66953f95cc907aae7f2c1b12f5482d/platforms/core-configuration/file-operations/src/main/java/org/gradle/api/internal/file/archive/compression/SimpleCompressor.java#L13-L35","documentation":"Gradle throws this error when the following condition is violated: Unable to create output stream for file <value>.","triggerScenarios":"Thrown at platforms/core-configuration/file-operations/src/main/java/org/gradle/api/internal/file/archive/compression/SimpleCompressor.java:31 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Review the values passed to this API and correct the invalid input described in the error message."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"534f27719b66953f95cc907aae7f2c1b12f5482d","analyzedAt":"2026-08-22T08:09:12.375Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}