prestodb/presto · error · PrestoException
HIVE_SERDE_NOT_FOUND
HIVE_SERDE_NOT_FOUND
Error message
Serializer does not exist:
What it means
When writing to a Hive table, Presto instantiates the SerDe class named in the table metadata via reflection. ClassNotFoundException means the class named by the table's serde_lib property does not exist on Presto's classpath, so no Serializer can be created. Other reflective failures are reported as HIVE_WRITER_DATA_ERROR instead.
Source
Thrown at presto-hive/src/main/java/com/facebook/presto/hive/HiveWriteUtils.java:304
throws IOException
{
writer.close();
if (!abort) {
length = target.getFileSystem(conf).getFileStatus(target).getLen();
}
}
};
}
public static Serializer initializeSerializer(Configuration conf, Properties properties, String serializerName)
{
try {
Serializer result = (Serializer) Class.forName(serializerName).getConstructor().newInstance();
((AbstractSerDe) result).initialize(conf, properties, null);
return result;
}
catch (ClassNotFoundException e) {
throw new PrestoException(HIVE_SERDE_NOT_FOUND, "Serializer does not exist: " + serializerName);
}
catch (SerDeException | ReflectiveOperationException e) {
throw new PrestoException(HIVE_WRITER_DATA_ERROR, e);
}
}
public static ObjectInspector getJavaObjectInspector(Type type)
{
if (type.equals(BooleanType.BOOLEAN)) {
return javaBooleanObjectInspector;
}
else if (type.equals(BigintType.BIGINT)) {
return javaLongObjectInspector;
}
else if (type.equals(IntegerType.INTEGER)) {
return javaIntObjectInspector;
}
else if (type.equals(SmallintType.SMALLINT)) {View on GitHub (pinned to 55bb57d202)
Solutions
- Install the missing SerDe JAR into the plugin/hive/ directory on every Presto worker and restart
- Alter the table to use a built-in SerDe matching the storage format (e.g. org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe)
- Check the metastore (DESCRIBE FORMATTED / SDS table) for a wrong or outdated serde_lib value and correct it
Example fix
// before (table metadata) SERDE 'com.example.CustomSerDe' -- not on Presto classpath // after ALTER TABLE t SET SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe';
Defensive patterns
Strategy: validation
Validate before calling
String serdeName = table.getSerdeLib(); // from DESCRIBE FORMATTED / metastore
boolean available;
try { Class.forName(serdeName); available = true; } catch (ClassNotFoundException e) { available = false; }
if (!available) throw new IllegalStateException("SerDe missing on Presto classpath: " + serdeName); Try / catch
try {
insertInto(table);
} catch (PrestoException e) {
if (e.getErrorCode() == HIVE_SERDE_NOT_FOUND.toErrorCode()) {
// deploy the SerDe jar to plugin/hive/ or rewrite the table with a built-in SerDe
} else throw e;
} Prevention
- Only use SerDes bundled with Presto's hive plugin for Presto-written tables
- Keep custom SerDe jars synced on every worker under plugin/hive/
- Audit metastore serde_lib values after Hive upgrades
When it happens
Trigger: INSERT or CREATE TABLE AS into a Hive table whose SerDe fully-qualified class name (from the metastore's SDS.SERDE_LIB) cannot be loaded by Class.forName in the Presto JVM.
Common situations: Tables created with third-party or custom SerDes not deployed to Presto workers; metastore metadata pointing at a SerDe removed in newer Hive versions (e.g. old LazySimpleSerDe package names); typo in SERDE_LIB stored in the metastore.
Related errors
- HIVE_SERDE_NOT_FOUND
- HIVE_UNSUPPORTED_FORMAT
- HIVE_INVALID_METADATA
- GENERIC_INTERNAL_ERROR
- unsupported string field type:
AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04).
Data as JSON: /api/errors/ccab89fa83e7c189.
Report an issue: GitHub.