apache/druid · warning · UOE

This Jobby does not implement getErrorMessage(), Jobby class

Error message

This Jobby does not implement getErrorMessage(), Jobby class: [%s]

What it means

Jobby's default getErrorMessage() is a stub that throws UOE. Requesting the failure reason from a Jobby implementation that does not override getErrorMessage() produces this error instead of a message.

Solutions

  1. Override getErrorMessage() in the Jobby implementation to return the failure reason (or null).
  2. Only call getErrorMessage() on implementations that support it.
  3. Guard the call with try-catch for UOE and fall back to a generic message.

Example fix

// before
class MyJob implements Jobby { /* no getErrorMessage */ }
// after
@Override
@Nullable
public String getErrorMessage() { return lastError; }
Defensive patterns

Strategy: try-catch

Validate before calling

if (!(job instanceof ErrorReportingJobby)) { return null; }

Type guard

boolean supportsErrorMessage(Object job) { try { job.getClass().getMethod("getErrorMessage"); return true; } catch (NoSuchMethodException e) { return false; } }

Try / catch

try { msg = job.getErrorMessage(); } catch (UOE e) { log.warn("Error message unsupported for {}: {}", job.getClass(), e.getMessage()); msg = "unknown failure"; }

Prevention

When it happens

Trigger: Calling getErrorMessage() on a Jobby whose class has not overridden it — typically when a job failed and the error-reporting code tries to collect its failure message.

Common situations: HadoopDruidIndexerJob failure reporting aggregating error messages across nested jobs; custom Jobby extensions lacking the override.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/070e0ec0bdfe0e1a. Report an issue: GitHub.

Appendix: source

Thrown at processing/src/main/java/org/apache/druid/indexer/Jobby.java:49

  boolean run();

  /**
   * @return A map containing statistics for a Jobby, optionally null if the Jobby is unable to provide stats.
   */
  @Nullable
  default Map<String, Object> getStats()
  {
    throw new UOE("This Jobby does not implement getJobStats(), Jobby class: [%s]", getClass());
  }

  /**
   * @return A string representing the error that caused a Jobby to fail. Can be null if the Jobby did not fail,
   * or is unable to provide an error message.
   */
  @Nullable
  default String getErrorMessage()
  {
    throw new UOE("This Jobby does not implement getErrorMessage(), Jobby class: [%s]", getClass());
  }
}

View on GitHub (pinned to 9b90983fd2)