pinpoint-apm/pinpoint · error · IllegalArgumentException
application is not WAS. application:${application}, serviceT
Error message
application is not WAS. application:${application}, serviceTypeCode:${serviceType} What it means
createWasOptionBuilder validates that the requested application's service type is a WAS (application.getServiceType().isWas()); non-WAS applications (e.g. USER, UNKNOWN, terminal types) have no response-time histogram, so an IllegalArgumentException is thrown with the application name and service type.
Source
Thrown at web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/ResponseTimeController.java:198
@RequestParam("from") Timestamp from,
@RequestParam("to") Timestamp to
) {
final Range range = Range.between(from, to);
this.rangeValidator.validate(range);
TimeWindow timeWindow = new TimeWindow(range);
Application application = createApplication(Service.DEFAULT, applicationName, serviceTypeCode, serviceTypeName);
ResponseTimeHistogramServiceOption option = createWasOptionBuilder(application, timeWindow)
.setUseStatisticsAgentState(true)
.build();
NodeHistogramSummary nodeHistogramSummary = responseTimeHistogramService.selectNodeHistogramData(option);
return HistogramView.view(nodeHistogramSummary);
}
private ResponseTimeHistogramServiceOption.Builder createWasOptionBuilder(Application application, TimeWindow timeWindow) {
if (!application.getServiceType().isWas()) {
throw new IllegalArgumentException("application is not WAS. application:" + application + ", serviceTypeCode:" + application.getServiceType());
}
return new ResponseTimeHistogramServiceOption.Builder(application, timeWindow, Collections.emptyList(), Collections.emptyList());
}
@PreAuthorize("@naverPermissionEvaluator.hasInspectorPermission(#serviceName.getName(), #applicationName)")
@PostMapping(value = "/getNode/serverHistogramData")
public ServerHistogramView postNodeServerHistogramData(
@ServiceParam ServiceName serviceName,
@RequestParam("applicationName") @NotBlank String applicationName,
@RequestParam(value = "serviceTypeCode", required = false) Short serviceTypeCode,
@RequestParam(value = "serviceTypeName", required = false) @NotBlank String serviceTypeName,
@RequestParam("from") Timestamp from,
@RequestParam("to") Timestamp to,
@RequestBody ApplicationPairs applicationPairs
) {
final Range range = Range.between(from, to);
this.rangeValidator.validate(range);
TimeWindow timeWindow = new TimeWindow(range);View on GitHub (pinned to 744c3d3075)
Solutions
- Query an actual WAS application (AGENT, TOMCAT, SPRING_BOOT, etc.), not the USER or terminal node
- Fix the application's service type if it was registered incorrectly
- Check why the app resolves to UNKNOWN/USER — usually misconfigured agent serviceType in pinpooint.conf
Example fix
// before // querying the USER node applicationName=USER&serviceTypeCode=2 // after // query the real WAS application applicationName=myApp&serviceTypeName=TOMCAT
Defensive patterns
Strategy: validation
Validate before calling
if (!['AGENT','TOMCAT','SPRING_BOOT','JETTY','THRIFT'].includes(serviceTypeName)) { skipHistogramQuery(); } Type guard
function isWas(serviceType) { return serviceType && serviceType.isWas && serviceType.isWas(); } Try / catch
try { ... } catch (IllegalArgumentException e) { if (e.getMessage().contains("is not WAS")) { /* select a WAS node instead of USER/terminal */ } else { throw e; } } Prevention
- Only request response-time histograms for WAS nodes
- Skip USER/UNKNOWN/terminal nodes in UI-driven queries
- Fix agents misreporting serviceType in pinpoint.config
When it happens
Trigger: Requesting response-time histogram endpoints (e.g. /getResponseTime/histogramData) for an application whose resolved ServiceType is not a WAS — typically selecting a USER/terminal or UNKNOWN node in the server map.
Common situations: Querying the synthetic 'USER' node or an application whose agents report with a non-WAS/UNKNOWN service type; apps registered with the wrong service type code in the UI.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- slot type:${slot}
- application serviceType not found. code:${serviceTypeCode},
- can not create application. applicationName: ${applicationNa
- application serviceType not found. code:${serviceTypeCode},
- found rpc fromNode linkData:{}
AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07).
Data as JSON: /api/errors/c124a73801a163c3.
Report an issue: GitHub.