{"record":{"id":"5287a8aeea00e081","repo":"apache/flink","slug":"could-not-serialize-value-s","errorCode":null,"errorMessage":"Could not serialize value '%s'.","messagePattern":"Could not serialize value '(.+?)'\\.","errorType":"exception","errorClass":"java.lang.RuntimeException","httpStatus":null,"severity":"error","filePath":"flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonSerializationSchema.java","lineNumber":55,"sourceCode":"    public JsonSerializationSchema() {\n        this(() -> new ObjectMapper());\n    }\n\n    public JsonSerializationSchema(SerializableSupplier<ObjectMapper> mapperFactory) {\n        this.mapperFactory = mapperFactory;\n    }\n\n    @Override\n    public void open(InitializationContext context) {\n        mapper = mapperFactory.get();\n    }\n\n    @Override\n    public byte[] serialize(T element) {\n        try {\n            return mapper.writeValueAsBytes(element);\n        } catch (JsonProcessingException e) {\n            throw new RuntimeException(\n                    String.format(\"Could not serialize value '%s'.\", element), e);\n        }\n    }\n}\n","sourceCodeStart":37,"sourceCodeEnd":60,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-formats/flink-json/src/main/java/org/apache/flink/formats/json/JsonSerializationSchema.java#L37-L60","documentation":"Error \"Could not serialize value '%s'.\" thrown in apache/flink.","triggerScenarios":"Triggered at runtime when the operation fails because: Could not serialize value 'the reported value'.","commonSituations":"Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Could not serialize value 'the reported value'.","solutions":["Address the cause reported by the error message: Could not serialize value 'the reported value'.","Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry."],"exampleFix":"Correct the condition described (\"Could not serialize value 'the reported value'.\") and rerun the job or command.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}