oracle/graal · error · IllegalStateException
Document properties unexpected in version < 7
Error message
Document properties unexpected in version < 7
What it means
Document-level (stream) properties were introduced in protocol version 7. BinaryReader.loadDocumentProperties throws IllegalStateException when a STREAM_PROPERTIES root entry is encountered but the file declared a major version below 7. This combination cannot come from a conforming writer: it signals a corrupted stream, a hand-patched version header, or a producer that emits stream properties while announcing an old version.
Source
Thrown at compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/graphio/parsing/BinaryReader.java:1138
parseProperties(builder::setNodeProperty);
reporter.setDetail(ContextStrings::edges);
createEdges(id, preds, nodeClass.inputs, builder::inputEdge);
createEdges(id, 0, nodeClass.sux, builder::successorEdge);
builder.setNodeName(nodeClass);
builder.endNode(id);
reporter.popContext();
}
} finally {
// graph does NOT contain terminator byte, in case we encounter a SkipRootException or
// EOF
// we have to finish the graph.
builder.makeGraphEdges();
}
}
protected void loadDocumentProperties() throws IOException {
if (dataSource.getMajorVersion() < 7) {
throw new IllegalStateException("Document properties unexpected in version < 7");
}
try {
builder.startDocumentHeader();
parseProperties();
} finally {
builder.endDocumentHeader();
}
}
@Override
public final ConstantPool getConstantPool() {
return constantPool;
}
/**
* Used during reading, to compact, reset or change constant pool. Use with great care, wrong
* constant pool may damage the rest of reading process.
*/View on GitHub (pinned to a66e9ccd1d)
Solutions
- Re-dump with a producer that writes a consistent header (version >= 7 whenever stream properties are emitted).
- If a custom writer adds STREAM_PROPERTIES, make sure it initializes the protocol version to at least 7.
- Do not hand-edit version headers; instead upgrade the reader side.
Defensive patterns
Strategy: try-catch
Validate before calling
if (dataSource.getMajorVersion() < 7) { /* do not expect or emit STREAM_PROPERTIES */ } Try / catch
try { reader.parse(); } catch (IllegalStateException e) { if (e.getMessage().contains("Document properties unexpected")) { /* header/body version mismatch: regenerate dump */ } } Prevention
- Never hand-edit version headers to fake compatibility.
- Custom writers must negotiate version >= 7 before emitting stream properties.
- Treat header/body inconsistency as corruption.
When it happens
Trigger: A file whose version header says < 7 but whose body contains a STREAM_PROPERTIES root entry; manually downgraded version bytes; a custom writer emitting stream properties without bumping the negotiated version.
Common situations: Attempting to make new dumps loadable in old viewers by editing the version header; forks of the writer that added features without version negotiation; damaged files.
Related errors
- Unknown type
- unknown root :
- Property count is too big. Properties can contain only
- Invalid constant pool index :
- unknown klass type :
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/58351b5f3ed27295.
Report an issue: GitHub.