{"record":{"id":"f324a956a916cb64","repo":"apache/seatunnel","slug":"prepare-method-is-not-supported","errorCode":null,"errorMessage":"prepare method is not supported","messagePattern":"prepare method is not supported","errorType":"exception","errorClass":"java.lang.UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/common/SeaTunnelPluginLifeCycle.java","lineNumber":43,"sourceCode":" *\n * @deprecated SeaTunnel will not invoke prepare when init plugin, instead by {@link\n *     org.apache.seatunnel.api.table.factory.Factory}\n */\n@Deprecated\npublic interface SeaTunnelPluginLifeCycle {\n\n    /**\n     * Use the pluginConfig to do some initialize operation.\n     *\n     * @param pluginConfig plugin config.\n     * @throws PrepareFailException if plugin prepare failed, the {@link PrepareFailException} will\n     *     throw.\n     * @deprecated SeaTunnel will not invoke prepare when init plugin, instead by {@link\n     *     org.apache.seatunnel.api.table.factory.Factory}\n     */\n    @Deprecated\n    default void prepare(Config pluginConfig) throws PrepareFailException {\n        throw new UnsupportedOperationException(\"prepare method is not supported\");\n    }\n}\n","sourceCodeStart":25,"sourceCodeEnd":46,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/common/SeaTunnelPluginLifeCycle.java#L25-L46","documentation":"ExcelReadStrategy.getExcelEngine resolves the user-configured excel_engine option against the ExcelEngine enum by comparing, case-insensitively, both the enum name and its display name. When no enum value matches the configured string, it throws FileConnectorException with ILLEGAL_ARGUMENT. This is a configuration error: the connector only supports the engines defined in the ExcelEngine enum (e.g. POI, EasyExcel).","triggerScenarios":"Calling getExcelEngine (indirectly via excelEngine or maxBytesForEntry during source reader setup) with a plugin_config excel_engine value that is not the name or display name of any ExcelEngine enum constant, e.g. excel_engine = \"xlsx\" or \"poi-xssf\".","commonSituations":"Typo in the config value (easyexel, poi ); copying an engine name from another library's docs; assuming the file extension (xlsx) is a valid engine name; config generated programmatically with a null or empty engine string.","solutions":["Set excel_engine to a supported value: POI or EasyExcel (case-insensitive) in the source plugin config.","Omit excel_engine entirely to use the option's default value.","Check the ExcelEngine enum in connector-file-base to see the exact accepted names (name() and getExcelEngineName())."],"exampleFix":"// before\nplugin_config {\n  excel_engine = \"xlsx\"\n}\n// after\nplugin_config {\n  excel_engine = \"EasyExcel\"\n}","handlingStrategy":"validation","validationCode":"java\nSet<String> valid = Arrays.stream(ExcelEngine.values())\n    .flatMap(e -> Stream.of(e.name(), e.getExcelEngineName()))\n    .map(String::toLowerCase)\n    .collect(Collectors.toSet());\nif (!valid.contains(configuredEngine.toLowerCase())) {\n    throw new IllegalArgumentException(\n        \"excel_engine must be one of \" + valid + \", got: \" + configuredEngine);\n}","typeGuard":null,"tryCatchPattern":"java\ntry {\n    ExcelEngine engine = ExcelEngine.valueOf(configuredEngine.trim().toUpperCase());\n} catch (FileConnectorException | IllegalArgumentException e) {\n    LOG.error(\"Unsupported excel_engine '{}' — use POI or EasyExcel\", configuredEngine, e);\n}","preventionTips":["Always copy excel_engine values from the docs/enum, never from memory","Trim and normalize the config value before writing it","Omit the option to accept the default engine"],"tags":["excel","configuration","enum","connector-file"],"backgroundTag":"invalid-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}