{"record":{"id":"6ce4577e8240570a","repo":"apache/flink","slug":"can-not-create-new-instance-for-custom-class-from","errorCode":null,"errorMessage":"Can not create new instance for custom class from %s","messagePattern":"Can not create new instance for custom class from (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/table/PartitionCommitPolicyFactory.java","lineNumber":92,"sourceCode":"                                                    parameters.toArray(new String[0]);\n                                            Class<?>[] classes = new Class<?>[parameters.size()];\n                                            for (int i = 0; i < parameters.size(); i++) {\n                                                classes[i] = String.class;\n                                            }\n                                            return (PartitionCommitPolicy)\n                                                    cl.loadClass(customClass)\n                                                            .getConstructor(classes)\n                                                            .newInstance((Object[]) paramStrings);\n                                        } else {\n                                            return (PartitionCommitPolicy)\n                                                    cl.loadClass(customClass).newInstance();\n                                        }\n                                    } catch (ClassNotFoundException\n                                            | IllegalAccessException\n                                            | InstantiationException\n                                            | NoSuchMethodException\n                                            | InvocationTargetException e) {\n                                        throw new RuntimeException(\n                                                \"Can not create new instance for custom class from \"\n                                                        + customClass,\n                                                e);\n                                    }\n                                default:\n                                    throw new UnsupportedOperationException(\n                                            \"Unsupported policy: \" + name);\n                            }\n                        })\n                .collect(Collectors.toList());\n    }\n}\n","sourceCodeStart":74,"sourceCodeEnd":105,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-connectors/flink-connector-files/src/main/java/org/apache/flink/connector/file/table/PartitionCommitPolicyFactory.java#L74-L105","documentation":"Error \"Can not create new instance for custom class from %s\" thrown in apache/flink.","triggerScenarios":"Triggered at runtime when the operation fails because: Can not create new instance for custom class from the reported value.","commonSituations":"Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Can not create new instance for custom class from the reported value.","solutions":["Address the cause reported by the error message: Can not create new instance for custom class from the reported value","Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry."],"exampleFix":"Correct the condition described (\"Can not create new instance for custom class from 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"}