{"record":{"id":"907344f50363ef42","repo":"prestodb/presto","slug":"hive-serde-not-found","errorCode":"HIVE_SERDE_NOT_FOUND","errorMessage":"deserializer does not exist: %s","messagePattern":"deserializer does not exist: (.+?)","errorType":"error_code","errorClass":"PrestoException","httpStatus":null,"severity":"error","filePath":"presto-hive/src/main/java/com/facebook/presto/hive/HiveUtil.java","lineNumber":575,"sourceCode":"        return deserializer;\n    }\n\n    private static Class<? extends Deserializer> getDeserializerClass(String name)\n    {\n        // CDH uses different names for Parquet\n        if (\"parquet.hive.serde.ParquetHiveSerDe\".equals(name)) {\n            return ParquetHiveSerDe.class;\n        }\n\n        if (\"org.apache.hadoop.hive.serde2.avro.AvroSerDe\".equals(name)) {\n            return AvroSerDe.class;\n        }\n\n        try {\n            return Class.forName(name, true, JavaUtils.getClassLoader()).asSubclass(Deserializer.class);\n        }\n        catch (ClassNotFoundException e) {\n            throw new PrestoException(HIVE_SERDE_NOT_FOUND, \"deserializer does not exist: \" + name);\n        }\n        catch (ClassCastException e) {\n            throw new RuntimeException(\"invalid deserializer class: \" + name);\n        }\n    }\n\n    private static Deserializer createDeserializer(Class<? extends Deserializer> clazz)\n    {\n        try {\n            return clazz.getConstructor().newInstance();\n        }\n        catch (ReflectiveOperationException e) {\n            throw new RuntimeException(\"error creating deserializer: \" + clazz.getName(), e);\n        }\n    }\n\n    private static void initializeDeserializer(Configuration configuration, Deserializer deserializer, Properties schema)\n    {","sourceCodeStart":557,"sourceCodeEnd":593,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-hive/src/main/java/com/facebook/presto/hive/HiveUtil.java#L557-L593","documentation":"getDeserializerClass loads the SerDe class named in table/partition metadata via Class.forName restricted to Deserializer subclasses; if the class is not found it throws HIVE_SERDE_NOT_FOUND. The table/partition references a serde that is not on the connector's classpath.","triggerScenarios":"Table/partition serde property (e.g. 'org.apache.hadoop.hive.serde2.SomeSerDe') that is misspelled, from a Hive release/custom plugin not present in Presto's classpath, or removed in a version upgrade.","commonSituations":"Custom serde jars not deployed to the Hive connector plugin directory; referencing serde classes available in Hive but not bundled with the connector; partition metadata copied from another cluster with different plugins.","solutions":["Fix the serde class name in table/partition metadata (ALTER TABLE ... SET SERDE)","Deploy the serde's jar to the Hive connector plugin classpath and restart Presto","Switch the table to a serde bundled with the connector (e.g. LazySimpleSerDe, OrcSerde, ParquetHiveSerDe)"],"exampleFix":"-- before\nALTER TABLE t SET SERDE 'com.example.MySerDe';\n-- after\nALTER TABLE t SET SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe';","handlingStrategy":"validation","validationCode":"try {\n    Class.forName(serdeName, false, getClass().getClassLoader()).asSubclass(org.apache.hadoop.hive.serde2.Deserializer.class);\n} catch (ClassNotFoundException e) {\n    throw new IllegalArgumentException(\"serde not on classpath: \" + serdeName, e);\n}","typeGuard":"boolean serdeAvailable(String name) {\n    try { Class.forName(name, false, Thread.currentThread().getContextClassLoader()); return true; }\n    catch (ClassNotFoundException e) { return false; }\n}","tryCatchPattern":"try { query(table); } catch (PrestoException e) { if (e.getErrorCode().getCode() == StandardErrorCode.HIVE_SERDE_NOT_FOUND.getCode()) { /* deploy serde jar or ALTER TABLE SET SERDE to a bundled one */ } else throw e; }","preventionTips":["Keep custom serde jars installed on every node of the Hive connector plugin classpath","Verify serde class names with SHOW CREATE TABLE before migration","Prefer serdes bundled with the connector; test queries after version upgrades"],"tags":["hive","serde","classpath","metadata"],"backgroundTag":"serde-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"}