pinpoint-apm/pinpoint · error · InvalidHbaseSchemaException

modifyTable :

Error message

modifyTable : 

What it means

ChangeSetMapper.mapTableChanges maps each <modifyTable> element via TableChangeMapper; if the mapper raises InvalidHbaseSchemaException, it is rethrown with the modifyTable's table name prepended so the failing table is identifiable. The original cause is preserved.

Source

Thrown at hbase/hbase-schema/src/main/java/com/navercorp/pinpoint/hbase/schema/reader/xml/mapper/ChangeSetMapper.java:84

    private Marshaller createMarshaller() throws JAXBException {
        Marshaller marshaller = jaxbContext.createMarshaller();
        marshaller.setSchema(schema);
        marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
        marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
        return marshaller;
    }

    private List<TableChange> mapTableChanges(List<com.navercorp.pinpoint.hbase.schema.definition.xml.ChangeSet.ModifyTable> modifyTables,
                                              List<com.navercorp.pinpoint.hbase.schema.definition.xml.ChangeSet.CreateTable> createTables) {
        if (modifyTables.isEmpty() && createTables.isEmpty()) {
            return Collections.emptyList();
        }
        List<TableChange> tableChanges = new ArrayList<>(modifyTables.size() + createTables.size());
        for (com.navercorp.pinpoint.hbase.schema.definition.xml.ChangeSet.ModifyTable modifyTable : modifyTables) {
            try {
                tableChanges.add(tableChangeMapper.map(modifyTable));
            } catch (InvalidHbaseSchemaException e) {
                throw new InvalidHbaseSchemaException("modifyTable : " + modifyTable.getName() + ", " + e.getMessage(), e.getCause());
            }
        }
        for (com.navercorp.pinpoint.hbase.schema.definition.xml.ChangeSet.CreateTable createTable : createTables) {
            try {
                tableChanges.add(tableChangeMapper.map(createTable));
            } catch (InvalidHbaseSchemaException e) {
                throw new InvalidHbaseSchemaException("createTable : " + createTable.getName() + ", " + e.getMessage(), e.getCause());
            }
        }
        return tableChanges;
    }
}

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Read the nested cause message — it names the exact invalid element inside the modifyTable
  2. Fix or remove the invalid modifyTable definition for the table named in the message
  3. Validate the XML against the schema definition XSD
  4. Check that all nested elements (e.g. createColumnFamily) are supported and non-empty

Example fix

// before
<modifyTable name="AgentStat"><unknownElement/></modifyTable>
// after
<modifyTable name="AgentStat"><createColumnFamily name="CF"></createColumnFamily></modifyTable>
Defensive patterns

Strategy: try-catch

Validate before calling

// pre-check modifyTable elements for required fields before loading
for (Element mt : modifyTableElements) {
    if (mt.getAttribute("name").isEmpty()) throw new IllegalArgumentException("modifyTable missing name");
}

Try / catch

try {
    changeSets = schemaReader.loadChangeSets(resource);
} catch (InvalidHbaseSchemaException e) {
    if (e.getMessage().startsWith("modifyTable : ")) {
        String table = e.getMessage().split(",")[0].substring("modifyTable : ".length());
        logger.error("Invalid modifyTable for {}", table, e.getCause());
    } else {
        throw e;
    }
}

Prevention

When it happens

Trigger: A <modifyTable> element in a change set contains an invalid definition (per TableChangeMapper's validation) — e.g. invalid column family change, unsupported element, or missing required fields.

Common situations: Typo or invalid attribute inside modifyTable/columnFamily elements; using a definition element not supported by the mapper version; copy-pasted modifyTable from another table with stale references.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/376156448c7cb206. Report an issue: GitHub.