{"record":{"id":"219c25d01a369174","repo":"pinpoint-apm/pinpoint","slug":"can-not-create-application-applicationname-app","errorCode":null,"errorMessage":"can not create application. applicationName: ${applicationName}","messagePattern":"can not create application\\. applicationName: (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":500,"severity":"error","filePath":"web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/ResponseTimeController.java","lineNumber":379,"sourceCode":"        for (ApplicationPair applicationPair : applicationPairs) {\n            String applicationName = applicationPair.getApplicationName();\n            short serviceTypeCode = applicationPair.getServiceTypeCode();\n            Application application = applicationFactory.createApplication(Service.DEFAULT, applicationName, serviceTypeCode);\n            applications.add(application);\n        }\n        return applications;\n    }\n\n    private Application createApplication(Service service, String applicationName, Short serviceTypeCode, String serviceTypeName) {\n        if (StringUtils.hasLength(applicationName)) {\n            if (serviceTypeCode != null) {\n                return applicationFactory.createApplication(service, applicationName, serviceTypeCode);\n            } else if (serviceTypeName != null) {\n                return applicationFactory.createApplicationByTypeName(service, applicationName, serviceTypeName);\n            }\n        }\n        logger.error(\"can not create application. applicationName: {}, serviceTypeCode: {}, serviceTypeName: {}\", applicationName, serviceTypeCode, serviceTypeName);\n        throw new IllegalArgumentException(\"can not create application. applicationName: \" + applicationName);\n    }\n}\n","sourceCodeStart":361,"sourceCodeEnd":382,"githubUrl":"https://github.com/pinpoint-apm/pinpoint/blob/744c3d3075e595656abb1ae331ad2c0e4c9eb996/web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/ResponseTimeController.java#L361-L382","documentation":"ResponseTimeController.createApplication converts request parameters into an Application object via ApplicationFactory; when neither serviceTypeCode nor serviceTypeName is supplied (or neither factory path applies), it logs an error and throws IllegalArgumentException saying the application cannot be created.","triggerScenarios":"Calling response-time endpoints without serviceTypeCode and without serviceTypeName, or with both null while applicationName is set, so applicationFactory is never invoked.","commonSituations":"API clients omitting the serviceType params after an API change; params passed with empty values; UI/script constructing URLs without the service type for the from/to application.","solutions":["Add serviceTypeCode or serviceTypeName as a query parameter for the application","Use the service type shown next to the application in the Pinpoint UI","Verify query parameter names (serviceTypeCode/serviceTypeName) and that values are non-empty"],"exampleFix":"// before\nGET /getResponseTime/histogramData?applicationName=myApp&from=...&to=...\n// after\nGET /getResponseTime/histogramData?applicationName=myApp&serviceTypeName=TOMCAT&from=...&to=...","handlingStrategy":"validation","validationCode":"if (serviceTypeCode == null && (serviceTypeName == null || serviceTypeName === '')) throw new Error('serviceTypeCode or serviceTypeName required to resolve application');","typeGuard":null,"tryCatchPattern":"try { ... } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"can not create application\")) { /* add serviceType params */ } else { throw e; } }","preventionTips":["Always pass serviceTypeName or serviceTypeCode with applicationName","Reuse a URL builder that includes service type params","Validate non-empty param values before the call"],"tags":["service-type","missing-parameter","rest-api","pinpoint"],"backgroundTag":"missing-required-argument","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"}