apache/druid · error · IllegalArgumentException
One or more values are required for parameter %s
Error message
One or more values are required for parameter %s
What it means
CatalogUtils.getUriListArg extracts a URI-list parameter (a comma/newline separated string) from an argument map and throws when the raw string is null or empty, because at least one URI value is mandatory. It guards before splitting via stringToList.
Source
Thrown at server/src/main/java/org/apache/druid/catalog/model/CatalogUtils.java:220
* Get a string parameter that can either be null or non-blank.
*/
public static String getNonBlankString(Map<String, Object> args, String parameter)
{
String value = CatalogUtils.getString(args, parameter);
if (value != null) {
value = value.trim();
if (value.isEmpty()) {
throw new IAE("%s parameter cannot be a blank string", parameter);
}
}
return value;
}
public static List<String> getUriListArg(Map<String, Object> args, String parameter)
{
String urisString = CatalogUtils.getString(args, parameter);
if (Strings.isNullOrEmpty(urisString)) {
throw new IAE("One or more values are required for parameter %s", parameter);
}
return stringToList(urisString);
}
public static List<URI> stringToUriList(String uris)
{
return stringListToUriList(stringToList(uris));
}
/**
* Convert a list of strings to a list of {@link URI} objects.
*/
public static List<URI> stringListToUriList(List<String> list)
{
if (list == null) {
return null;
}
List<URI> uris = new ArrayList<>();View on GitHub (pinned to 9b90983fd2)
Solutions
- Provide at least one URI in the parameter, e.g. "uris": "file:///path/to/resource" or a comma-separated list.
- Verify the property key spelling matches what the model expects (a typo means the key is read as null).
- If URIs are genuinely optional, switch the model definition to a property type that permits absence rather than getUriListArg.
Example fix
// before
{"properties": {"uris": ""}}
// after
{"properties": {"uris": "file:///opt/druid/lookups/country.json,http://host/country.json"}} Defensive patterns
Strategy: validation
Validate before calling
Object v = args.get("uris");
if (v == null || (v instanceof String && ((String) v).trim().isEmpty())) {
throw new IllegalArgumentException("uris must contain at least one URI");
} Type guard
boolean hasUriList(Map<String, Object> args, String key) { return args.get(key) instanceof String && !Strings.isNullOrEmpty(((String) args.get(key)).trim()); } Try / catch
try { List<String> uris = CatalogUtils.getUriListArg(args, "uris"); ... } catch (IllegalArgumentException e) { // prompt user for at least one URI } Prevention
- Always supply at least one URI when the model requires external resources.
- Verify property key spellings so required keys are not silently read as null.
- Template-driven configs: fail at template-render time if a required URI list is empty.
When it happens
Trigger: Calling getUriListArg(args, "uris") with args missing the key, holding null, "", or a whitespace-only string. Typically reached when a catalog/table property that must list URIs is omitted or blank.
Common situations: A lookup or table definition referencing external URI resources is created without the required URI property; a template expands with no URIs; the user deletes the value but keeps the empty key.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- An external S3 table with a format must also provide the cor
- Provide either the %s property, or one of the S3 input sourc
- The %s property cannot be provided when the %s property is s
- S3 external table defines the %s property. The table functio
- [%s] is an invalid granularity string.
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/fff9737cf5e23c09.
Report an issue: GitHub.