apache/pulsar · error · IllegalArgumentException
Trigger Data is not provided
Error message
Trigger Data is not provided
What it means
Thrown by the trigger-request validation in ComponentImpl when neither trigger data (input string) nor an uploaded input stream is supplied. Triggering a function means feeding it data, so at least one of the two must be present. Topic may be null, but the trigger payload itself cannot.
Source
Thrown at pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/rest/api/ComponentImpl.java:1661
private void validateTriggerRequestParams(final String tenant,
final String namespace,
final String functionName,
final String topic,
final String input,
final InputStream uploadedInputStream) {
// Note : Checking topic is not required it can be null
if (tenant == null) {
throw new IllegalArgumentException("Tenant is not provided");
}
if (namespace == null) {
throw new IllegalArgumentException("Namespace is not provided");
}
if (functionName == null) {
throw new IllegalArgumentException("Function name is not provided");
}
if (uploadedInputStream == null && input == null) {
throw new IllegalArgumentException("Trigger Data is not provided");
}
}
private void throwStateStoreUnvailableResponse() {
throw new RestException(Status.SERVICE_UNAVAILABLE,
"State storage client is not done initializing. " + "Please try again in a little while.");
}
public static String createPackagePath(String tenant, String namespace, String functionName, String fileName) {
return String.format("%s/%s/%s/%s", tenant, namespace, Codec.encode(functionName),
getUniquePackageName(Codec.encode(fileName)));
}
/**
* @deprecated use {@link #isAuthorizedRole(String, String, AuthenticationParameters)} instead.
*/
@Deprecated
public boolean isAuthorizedRole(String tenant, String namespace, String clientRole,View on GitHub (pinned to 820761864e)
Solutions
- Provide the trigger data as the request body (e.g. curl --data 'payload').
- Or attach the input via multipart file upload (uploadedInputStream).
- If programmatically calling, assert at least one of input/uploadedInputStream is non-null first.
Example fix
// before curl -X POST /admin/v3/functions/public/default/my-fn/trigger // after curl -X POST /admin/v3/functions/public/default/my-fn/trigger --data 'test-message'
Defensive patterns
Strategy: validation
Validate before calling
if ((input == null || input.isEmpty()) && uploadedInputStream == null) throw new IllegalArgumentException("trigger data (input or file) required"); Type guard
boolean hasTriggerData(String input, java.io.InputStream stream) { return (input != null && !input.isEmpty()) || stream != null; } Try / catch
try { admin.functions().triggerFunction(t, ns, fn, topic, input, is); }
catch (IllegalArgumentException e) { /* log missing trigger data */ } Prevention
- Always pass --data or a file when triggering via curl
- Check both input string and stream before calling the trigger API
When it happens
Trigger: POST to /functions/{tenant}/{namespace}/{functionName}/trigger with an empty body and no multipart uploadedInputStream, or ComponentImpl.triggerFunction called with input == null && uploadedInputStream == null.
Common situations: curl POST with no --data body; multipart form missing the data field; scripts testing functions that forget to attach the trigger input.
Understand the failure class
Background: Missing required parameter errors: what 'X is required' and 'the required X param is missing' mean, and how to fix them — this error's family across 27 libraries.
Related errors
- Function name is not provided
- Tenant is not provided
- Namespace is not provided
- %s Instance Id is not provided
- %s name is not provided
AI-assisted analysis of apache/pulsar@820761864e (2026-09-06).
Data as JSON: /api/errors/096853656f0666c5.
Report an issue: GitHub.