{"record":{"id":"b1feaab05d5329d8","repo":"apache/hadoop","slug":"class-classname-e-configuration-key-fs-s3a-ht","errorCode":null,"errorMessage":"Class {className} {e} (configuration key fs.s3a.http.signer.class)","messagePattern":"Class (.+?) (.+?) \\(configuration key fs\\.s3a\\.http\\.signer\\.class\\)","errorType":"exception","errorClass":"InstantiationIOException","httpStatus":null,"severity":"error","filePath":"hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/SignerFactory.java","lineNumber":187,"sourceCode":"   * @param scheme scheme to bond to\n   * @param configKey configuration key\n   * @return the auth scheme\n   * @throws InstantiationIOException failure to instantiate\n   * @throws IllegalStateException if the signer class is not defined\n   * @throws RuntimeException other configuration problems\n   */\n  public static AuthScheme<AwsCredentialsIdentity> createHttpSigner(\n      Configuration conf, String scheme, String configKey) throws IOException {\n\n    final Class<? extends HttpSigner> clazz = conf.getClass(HTTP_SIGNER_CLASS_NAME,\n        null, HttpSigner.class);\n    checkState(clazz != null, \"No http signer class defined in %s\", configKey);\n    LOG.debug(\"Creating http signer {} from {}\", clazz, configKey);\n    try {\n      return createAuthScheme(scheme, clazz.newInstance());\n\n    } catch (InstantiationException | IllegalAccessException e) {\n      throw new InstantiationIOException(\n          InstantiationIOException.Kind.InstantiationFailure,\n          null,\n          clazz.getName(),\n          HTTP_SIGNER_CLASS_NAME,\n          e.toString(),\n          e);\n    }\n  }\n\n}\n","sourceCodeStart":169,"sourceCodeEnd":198,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/auth/SignerFactory.java#L169-L198","documentation":"SignerFactory.createHttpSigner loads the class named by fs.s3a.http.signer.class and instantiates it reflectively with clazz.newInstance(). If instantiation fails (InstantiationException for abstract/interface classes or missing no-arg constructor, IllegalAccessException for non-public class/constructor) it throws InstantiationIOException with Kind.InstantiationFailure, carrying the class name, the config key, and the original exception. The signer chosen here produces the AuthScheme used to sign S3 requests.","triggerScenarios":"fs.s3a.http.signer.class points at an abstract class, an interface, a class whose only constructors take arguments, or a non-public class. The failure happens at S3A client initialization, before any request is signed.","commonSituations":"Custom HttpSigner implementation written with a configuration-taking constructor instead of a nullary one; class not made public; deployment jars where a shading/relocation step changed accessibility; Hadoop upgrade that changed the HttpSigner interface so old custom signers no longer link.","solutions":["Give the signer class a public no-arg constructor and make the class itself public and concrete, implementing org.apache.hadoop.fs.s3a.auth.HttpSigner","Move any configuration the signer needs out of the constructor into the initialize/configuration phase the factory drives","Verify the FQCN in fs.s3a.http.signer.class is spelled exactly and resolvable on every client classpath","Read the chained cause (toString in the message): IllegalAccessException means an access problem, InstantiationException means abstract/interface or no usable constructor"],"exampleFix":"// before: only an argument-taking constructor -> InstantiationException\npublic class MySigner implements HttpSigner {\n  public MySigner(S3AInstrumentation stats) { ... }\n}\n\n// after: public nullary constructor, configure later\npublic class MySigner implements HttpSigner {\n  public MySigner() { }\n  @Override public void initialize(Configuration conf) { ... }\n}","handlingStrategy":"validation","validationCode":"String cn = conf.getTrimmed(\"fs.s3a.http.signer.class\", \"\");\nif (!cn.isEmpty()) {\n  Class<?> c = Class.forName(cn);\n  int m = c.getModifiers();\n  boolean concrete = !Modifier.isAbstract(m) && !Modifier.isInterface(m);\n  boolean noArg = Arrays.stream(c.getConstructors()).anyMatch(k -> k.getParameterCount() == 0);\n  if (!HttpSigner.class.isAssignableFrom(c) || !concrete || !noArg) {\n    throw new IOException(cn + \" must be a public concrete HttpSigner with a public no-arg constructor\");\n  }\n}","typeGuard":"static boolean isInstantiableHttpSigner(Class<?> c) {\n  return HttpSigner.class.isAssignableFrom(c)\n      && !Modifier.isAbstract(c.getModifiers())\n      && !Modifier.isInterface(c.getModifiers())\n      && Arrays.stream(c.getConstructors()).anyMatch(k -> k.getParameterCount() == 0);\n}","tryCatchPattern":"try {\n  AuthScheme<AwsCredentialsIdentity> scheme =\n      SignerFactory.createHttpSigner(conf, scheme, \"fs.s3a.http.signer.class\");\n} catch (InstantiationIOException e) {\n  // construction defect in the configured signer: fix config/class, do not retry\n  LOG.error(\"signer {} could not be instantiated: {}\", e.getClassName(), e.getCause());\n  throw e;\n}","preventionTips":["Keep custom signer constructors nullary; configure through initialize()","Add a CI test that reflectively instantiates every configured signer class","Lint the FQCN in fs.s3a.http.signer.class at deploy time"],"tags":["aws","s3a","signer","reflection","configuration"],"backgroundTag":"class-instantiation-failure","analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-22T20:17:22.307Z"}