{"record":{"id":"c124a73801a163c3","repo":"pinpoint-apm/pinpoint","slug":"application-is-not-was-application-application","errorCode":null,"errorMessage":"application is not WAS. application:${application}, serviceTypeCode:${serviceType}","messagePattern":"application is not WAS\\. application:(.+?), serviceTypeCode:(.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":500,"severity":"error","filePath":"web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/ResponseTimeController.java","lineNumber":198,"sourceCode":"            @RequestParam(\"from\") Timestamp from,\n            @RequestParam(\"to\") Timestamp to\n    ) {\n        final Range range = Range.between(from, to);\n        this.rangeValidator.validate(range);\n        TimeWindow timeWindow = new TimeWindow(range);\n\n        Application application = createApplication(Service.DEFAULT, applicationName, serviceTypeCode, serviceTypeName);\n\n        ResponseTimeHistogramServiceOption option = createWasOptionBuilder(application, timeWindow)\n                .setUseStatisticsAgentState(true)\n                .build();\n        NodeHistogramSummary nodeHistogramSummary = responseTimeHistogramService.selectNodeHistogramData(option);\n        return HistogramView.view(nodeHistogramSummary);\n    }\n\n    private ResponseTimeHistogramServiceOption.Builder createWasOptionBuilder(Application application, TimeWindow timeWindow) {\n        if (!application.getServiceType().isWas()) {\n            throw new IllegalArgumentException(\"application is not WAS. application:\" + application + \", serviceTypeCode:\" + application.getServiceType());\n        }\n        return new ResponseTimeHistogramServiceOption.Builder(application, timeWindow, Collections.emptyList(), Collections.emptyList());\n    }\n\n    @PreAuthorize(\"@naverPermissionEvaluator.hasInspectorPermission(#serviceName.getName(), #applicationName)\")\n    @PostMapping(value = \"/getNode/serverHistogramData\")\n    public ServerHistogramView postNodeServerHistogramData(\n            @ServiceParam ServiceName serviceName,\n            @RequestParam(\"applicationName\") @NotBlank String applicationName,\n            @RequestParam(value = \"serviceTypeCode\", required = false) Short serviceTypeCode,\n            @RequestParam(value = \"serviceTypeName\", required = false) @NotBlank String serviceTypeName,\n            @RequestParam(\"from\") Timestamp from,\n            @RequestParam(\"to\") Timestamp to,\n            @RequestBody ApplicationPairs applicationPairs\n    ) {\n        final Range range = Range.between(from, to);\n        this.rangeValidator.validate(range);\n        TimeWindow timeWindow = new TimeWindow(range);","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/ResponseTimeController.java#L180-L216","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\n// querying the USER node\napplicationName=USER&serviceTypeCode=2\n// after\n// query the real WAS application\napplicationName=myApp&serviceTypeName=TOMCAT","handlingStrategy":"validation","validationCode":"if (!['AGENT','TOMCAT','SPRING_BOOT','JETTY','THRIFT'].includes(serviceTypeName)) { skipHistogramQuery(); }","typeGuard":"function isWas(serviceType) { return serviceType && serviceType.isWas && serviceType.isWas(); }","tryCatchPattern":"try { ... } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"is not WAS\")) { /* select a WAS node instead of USER/terminal */ } else { throw e; } }","preventionTips":["Only request response-time histograms for WAS nodes","Skip USER/UNKNOWN/terminal nodes in UI-driven queries","Fix agents misreporting serviceType in pinpoint.config"],"tags":["service-type","invalid-argument","histogram","pinpoint"],"backgroundTag":"invalid-argument-value","analyzedSha":"744c3d3075e595656abb1ae331ad2c0e4c9eb996","analyzedAt":"2026-09-07T18:48:45.289Z","contentChangedAt":"2026-09-07T18:48:45.289Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}