apache/druid · error · IllegalStateException
Unknown Notice type [ ].
Error message
Unknown Notice type [%s].
What it means
updateToLoadAndDrop() partitions pending notices into lookups to load vs. drop. A Notice instance that is neither a LoadNotice nor a DropNotice is a programming/invariant violation, so an IllegalStateException naming the class is thrown.
Solutions
- Add the new Notice subtype handling to the instanceof chain in updateToLoadAndDrop().
- Check for mixed Druid server jar versions on the classpath (e.g., duplicate LookupReferencesManager classes).
- Undo any custom code that enqueues non-standard Notice objects.
- Capture notice.getClass().getName() from the message and confirm which subtype is unhandled.
Example fix
// before
} else {
throw new ISE("Unknown Notice type [%s].", notice.getClass().getName());
}
// after
} else if (notice instanceof RefreshNotice) {
RefreshNotice r = (RefreshNotice) notice;
lookupsToLoad.add(r.lookupName);
} else {
throw new ISE("Unknown Notice type [%s].", notice.getClass().getName());
} Defensive patterns
Strategy: validation
Validate before calling
// when adding custom notice types, assert handler coverage
if (!(notice instanceof LoadNotice) && !(notice instanceof DropNotice)) {
throw new AssertionError("Unhandled Notice subtype: " + notice.getClass().getName());
} Try / catch
try { state = manager.getAllLookupsState(...); } catch (IllegalStateException e) { if (e.getMessage().startsWith("Unknown Notice type")) { verifyDruidJarVersions(); } throw e; } Prevention
- Update updateToLoadAndDrop() whenever adding a new Notice subtype
- Keep all Druid server jars at the same version on the classpath
- Never enqueue foreign Notice implementations into pendingNotices
When it happens
Trigger: A new Notice subtype is added to LookupReferencesManager but updateToLoadAndDrop()'s instanceof chain is not extended; internal state corruption passing a foreign object into the pendingNotices list.
Common situations: Druid version mismatches or custom patches introducing a new Notice type without updating the handler; classpath mixing of two Druid server versions.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- URI parse failed
- announceHistoricalSegments failed with null metadata…
- bitmapEncoding[ ] does not match indexSpec.bitmap[ ]
- Both union and sketch were null!
- Cannot copy [%,d] bytes, only have [%,d] buffered
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/35059ffacf185e47.
Report an issue: GitHub.
Appendix: source
Thrown at server/src/main/java/org/apache/druid/query/lookup/LookupReferencesManager.java:370
}
private void updateToLoadAndDrop(
List<Notice> notices,
Map<String, LookupExtractorFactoryContainer> lookupsToLoad,
Set<String> lookupsToDrop
)
{
for (Notice notice : notices) {
if (notice instanceof LoadNotice) {
LoadNotice loadNotice = (LoadNotice) notice;
lookupsToLoad.put(loadNotice.lookupName, loadNotice.lookupExtractorFactoryContainer);
lookupsToDrop.remove(loadNotice.lookupName);
} else if (notice instanceof DropNotice) {
DropNotice dropNotice = (DropNotice) notice;
lookupsToDrop.add(dropNotice.lookupName);
lookupsToLoad.remove(dropNotice.lookupName);
} else {
throw new ISE("Unknown Notice type [%s].", notice.getClass().getName());
}
}
}
private void takeSnapshot(Map<String, LookupExtractorFactoryContainer> lookupMap)
{
if (lookupSnapshotTaker != null) {
lookupSnapshotTaker.takeSnapshot(lookupListeningAnnouncerConfig.getLookupTier(), getLookupBeanList(lookupMap));
}
}
/**
* Load a set of lookups based on the injected value in {@link LoadSpecHolder#getLookupLoadingSpec()}.
*/
private void loadLookupsAndInitStateRef()
{
LookupLoadingSpec lookupLoadingSpec = lookupListeningAnnouncerConfig.getLookupLoadingSpec();
LOG.info("Loading lookups using spec[%s].", lookupLoadingSpec);View on GitHub (pinned to 9b90983fd2)