pinpoint-apm/pinpoint · error · IllegalArgumentException
Invalid or undefined service type for application:
Error message
Invalid or undefined service type for application:
What it means
After parsing a nodeKey, ServerMapHistogramController.newApplication resolves the service type by name from the registry and rejects keys whose service type is unknown or resolves to UNDEFINED, throwing IllegalArgumentException. This guarantees histogram statistics are only queried for applications with a concrete service type.
Solutions
- Correct the serviceTypeName in the node key to a registered name (check the server's service-type descriptors)
- Deploy the missing service-type plugin on the Pinpoint web server
- Reuse node keys returned by the server map API rather than hand-writing them
Example fix
// before nodeKey = "myApp^SrpingBoot"; // after nodeKey = "myApp^SPRING_BOOT";
Defensive patterns
Strategy: validation
Validate before calling
ServiceType st = registry.findServiceTypeByName(typeName);
if (st == null || st.getCode() == ServiceType.UNDEFINED.getCode()) {
throw new IllegalArgumentException("Unknown service type: " + typeName);
} Try / catch
try {
view = api.getNodeHistogramStatistics(nodeKey);
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Invalid or undefined service type")) {
// mark node as unresolvable and continue
} else throw e;
} Prevention
- Use exact service type names from the server's service-type descriptor files
- Keep custom plugins deployed on all Pinpoint web instances
- Prefer passing serviceTypeCode with the name so both resolve consistently
When it happens
Trigger: A nodeKey whose serviceTypeName portion is not registered in the service type registry, or that resolves to ServiceType.UNDEFINED (e.g. key 'myApp^UNKNOWN_TYPE').
Common situations: Custom plugins missing on the web server, typos in the service type name part of the key, agent emitting a newer service type than the web module knows, stale UI state from a different deployment.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- application serviceType not found. code:, name:
- Invalid node key format:
- Node key must not be null or empty
- agentStartTimeIndex not found
- Cannot add an existing column family :
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/e71a3aae6f7b6510.
Report an issue: GitHub.
Appendix: source
Thrown at web/src/main/java/com/navercorp/pinpoint/web/applicationmap/controller/ServerMapHistogramController.java:281
private Application newApplication(Service service, String nodeKey) {
if (!StringUtils.hasLength(nodeKey)) {
throw new IllegalArgumentException("Node key must not be null or empty");
}
if (!NODE_KEY_VALIDATION_PATTERN.matcher(nodeKey).matches()) {
throw new IllegalArgumentException("Invalid node key format: " + nodeKey);
}
String[] parts = NODE_DELIMITER_PATTERN.split(nodeKey, 2);
String applicationName = parts[0];
String serviceTypeName = parts[1];
ServiceType serviceType = null;
if (StringUtils.hasLength(serviceTypeName)) {
serviceType = registry.findServiceTypeByName(serviceTypeName);
}
if (serviceType != null && serviceType.getCode() != ServiceType.UNDEFINED.getCode()) {
return new Application(service, applicationName, serviceType);
}
throw new IllegalArgumentException("Invalid or undefined service type for application: " + nodeKey);
}
@GetMapping(value = "/statistics", params = {
"fromApplicationNames", "fromServiceTypeCodes", "toApplicationNames", "toServiceTypeCodes"
})
public NodeHistogramSummaryView getNodeHistogramData(
@ServiceParam ServiceName serviceName,
@Valid @ModelAttribute
ApplicationForm appForm,
@Valid @ModelAttribute
RangeForm rangeForm,
@RequestParam(value = "fromApplicationNames", defaultValue = "", required = false)
List<String> fromApplicationNames,
@RequestParam(value = "fromServiceTypeCodes", defaultValue = "", required = false)
List<Integer> fromServiceTypeCodes,
@RequestParam(value = "toApplicationNames", defaultValue = "", required = false)
List<String> toApplicationNames,
@RequestParam(value = "toServiceTypeCodes", defaultValue = "", required = false)View on GitHub (pinned to 744c3d3075)