{"record":{"id":"43b0008f37407035","repo":"prestodb/presto","slug":"not-found-43b000","errorCode":"NOT_FOUND","errorMessage":"Configured serializer class not found","messagePattern":"Configured serializer class not found","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-accumulo/src/main/java/com/facebook/presto/accumulo/model/AccumuloTableHandle.java","lineNumber":100,"sourceCode":"    public String getSchema()\n    {\n        return schema;\n    }\n\n    @JsonProperty\n    public String getSerializerClassName()\n    {\n        return serializerClassName;\n    }\n\n    @JsonIgnore\n    public AccumuloRowSerializer getSerializerInstance()\n    {\n        try {\n            return (AccumuloRowSerializer) Class.forName(serializerClassName).getConstructor().newInstance();\n        }\n        catch (Exception e) {\n            throw new PrestoException(NOT_FOUND, \"Configured serializer class not found\", e);\n        }\n    }\n\n    @JsonProperty\n    public String getTable()\n    {\n        return table;\n    }\n\n    @JsonProperty\n    public boolean isExternal()\n    {\n        return external;\n    }\n\n    public SchemaTableName toSchemaTableName()\n    {\n        return new SchemaTableName(schema, table);","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-accumulo/src/main/java/com/facebook/presto/accumulo/model/AccumuloTableHandle.java#L82-L118","documentation":"AccumuloTableHandle.getSerializerInstance reflectively instantiates the configured serializer class (Class.forName + getConstructor().newInstance) and casts it to AccumuloRowSerializer. Any failure — class not found, no no-arg constructor, instantiation or cast failure — is rethrown as a PrestoException with code NOT_FOUND. Split generation cannot proceed without a serializer instance.","triggerScenarios":"Calling tabletSplits (query planning / split generation) when the table handle's serializerClassName is not on the classpath, lacks a public no-arg constructor, its constructor throws, or it does not implement AccumuloRowSerializer (ClassCastException).","commonSituations":"Custom serializer plugin jar not deployed to the node doing planning; serializer class refactored/renamed after the table was created; serializer written without a public no-arg constructor; serializer class present but not implementing AccumuloRowSerializer after an API change.","solutions":["Deploy the serializer's jar to the plugin directory on all Presto nodes and restart.","Ensure the serializer class has a public no-argument constructor (required by getConstructor().newInstance()).","Confirm the class implements/extends AccumuloRowSerializer and matches the connector's API version.","Check the serializerClassName stored in table metadata for typos or stale fully-qualified names after package renames; recreate the table metadata if stale.","Test instantiation of the class outside Presto to catch constructor-thrown exceptions."],"exampleFix":"// before: serializer without a no-arg constructor\npublic class MySerializer implements AccumuloRowSerializer {\n    public MySerializer(Config cfg) { ... }\n}\n// after: add a public no-arg constructor (or a default one)\npublic class MySerializer implements AccumuloRowSerializer {\n    public MySerializer() { }\n}","handlingStrategy":"validation","validationCode":"// verify the class instantiates with a public no-arg ctor before planning\ntry {\n    Object o = Class.forName(serializerClassName).getConstructor().newInstance();\n    if (!(o instanceof AccumuloRowSerializer)) throw new IllegalStateException(\"Not an AccumuloRowSerializer\");\n} catch (ReflectiveOperationException e) {\n    throw new IllegalStateException(\"Bad serializer class: \" + serializerClassName, e);\n}","typeGuard":"boolean isInstantiableSerializer(String name) {\n    try {\n        return AccumuloRowSerializer.class.isAssignableFrom(Class.forName(name));\n    } catch (ClassNotFoundException e) { return false; }\n}","tryCatchPattern":"try {\n    AccumuloRowSerializer s = tableHandle.getSerializerInstance();\n} catch (PrestoException e) {\n    // NOT_FOUND: check jar deployment + no-arg constructor, rethrow\n    throw e;\n}","preventionTips":["Always give custom serializers a public no-argument constructor.","Verify the class implements AccumuloRowSerializer for your connector version.","Deploy the jar cluster-wide before creating tables that reference it.","Update table metadata if the serializer class is ever renamed or repackaged."],"tags":["reflection","serialization","accumulo","not-found"],"backgroundTag":"class-not-found","analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}