{"record":{"id":"9ca7924299b0ea64","repo":"apache/iceberg","slug":"cannot-create-s-to-generate-and-configure-the-cli","errorCode":null,"errorMessage":"Cannot create %s to generate and configure the client SDK Plugin builder","messagePattern":"Cannot create (.+?) to generate and configure the client SDK Plugin builder","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIOProperties.java","lineNumber":1190,"sourceCode":"  public S3CrtAsyncClientBuilder applyS3CrtConfigurations(S3CrtAsyncClientBuilder builder) {\n    return builder.maxConcurrency(s3CrtMaxConcurrency());\n  }\n\n  /**\n   * Dynamically load the http client builder to avoid runtime deps requirements of any optional SDK\n   * Plugins\n   */\n  private <T> T loadSdkPluginConfigurations(String impl, Map<String, String> properties) {\n    Object sdkPluginConfigurations;\n    try {\n      sdkPluginConfigurations =\n          DynMethods.builder(\"create\")\n              .hiddenImpl(impl, Map.class)\n              .buildStaticChecked()\n              .invoke(properties);\n      return (T) sdkPluginConfigurations;\n    } catch (NoSuchMethodException e) {\n      throw new IllegalArgumentException(\n          String.format(\n              \"Cannot create %s to generate and configure the client SDK Plugin builder\", impl),\n          e);\n    }\n  }\n\n  public Map<String, String> properties() {\n    return allProperties;\n  }\n}\n","sourceCodeStart":1172,"sourceCodeEnd":1201,"githubUrl":"https://github.com/apache/iceberg/blob/86d9c8fc543e7c56c9f624eb725f76c9baff9570/aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIOProperties.java#L1172-L1201","documentation":"IllegalArgumentException thrown when dynamically loading an S3 SDK plugin configuration class via DynMethods: the configured class was found but has no static create(Map) method (NoSuchMethodException from buildStaticChecked). This happens when s3.sdk-plugins (or similar) names a class that does not implement the expected plugin factory contract of a static create(Map<String, String>) method returning the builder/plugin instance.","triggerScenarios":"Configuring s3.sdk-plugins=<impl> where impl resolves to a class lacking a visible static create(Map) method, or whose signature doesn't match Map.class (e.g. create(Properties), or non-static create).","commonSituations":"Custom S3ClientConfigurations/SdkPlugin class written against an older Iceberg/AWS SDK contract; wrong fully-qualified class name resolving to a different class; class compiled with a non-static or differently typed create method; typos pointing at a wrapper class instead of the plugin factory.","solutions":["Ensure the configured class exposes public static T create(java.util.Map<String, String> properties) with exactly that signature.","Verify the fully-qualified class name in s3.sdk-plugins is correct and the class is on the classpath.","Update the custom plugin to match the current Iceberg SDK plugin contract, or use a shipped implementation (e.g. S3ClientConfigurations).","If create exists but with a different parameter type, add an overload accepting Map<String, String>."],"exampleFix":"// before\nclass MyPlugin {\n  public MyPlugin(Map<String, String> props) { ... } // no static create(Map) -> IllegalArgumentException\n}\n// after\nclass MyPlugin {\n  public static MyPlugin create(Map<String, String> properties) {\n    return new MyPlugin(properties);\n  }\n  private MyPlugin(Map<String, String> props) { ... }\n}","handlingStrategy":"validation","validationCode":"Class<?> impl = Class.forName(pluginClassName);\nMethod create = impl.getMethod(\"create\", Map.class);\nif (!java.lang.reflect.Modifier.isStatic(create.getModifiers())) {\n  throw new IllegalArgumentException(\"create must be static\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  props = S3FileIOProperties.loadSdkPlugin(impl, properties);\n} catch (IllegalArgumentException e) {\n  throw new IllegalStateException(\"s3.sdk-plugins class lacks static create(Map) method: \" + impl, e);\n}","preventionTips":["Implement the plugin contract exactly: public static <T> T create(Map<String, String>)","Unit-test custom plugins by invoking create(Map.of()) reflectively","Double-check fully-qualified class names in s3.sdk-plugins","Recompile plugins against the Iceberg AWS module version you deploy"],"tags":["aws","s3","reflection","configuration","sdk-plugin"],"backgroundTag":"class-not-found","analyzedSha":"86d9c8fc543e7c56c9f624eb725f76c9baff9570","analyzedAt":"2026-09-12T00:46:39.097Z","contentChangedAt":"2026-09-12T00:46:39.097Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}