pinpoint-apm/pinpoint · error · IllegalArgumentException

application serviceType not found. code:${serviceTypeCode},

Error message

application serviceType not found. code:${serviceTypeCode}, name:${serviceTypeName}

What it means

ScatterChartController.findServiceType resolves the scatter-chart request's ServiceType from serviceTypeCode then serviceTypeName; when neither maps to a registered non-UNDEFINED type it throws IllegalArgumentException with this message. The scatter chart needs the concrete service type to build its data query.

Source

Thrown at web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/ScatterChartController.java:153

    private static ScatterView.ResultView wrapScatterResultView(Range range, ScatterView.DotView dotView) {
        final Status status = new Status(System.currentTimeMillis(), range);
        return ScatterView.wrapResult(dotView, status);
    }

    private ServiceType findServiceType(Integer serviceTypeCode, String serviceTypeName) {
        if (serviceTypeCode != null) {
            ServiceType serviceTypeFromCode = serviceTypeRegistryService.findServiceType(serviceTypeCode);
            if (!ServiceType.UNDEFINED.equals(serviceTypeFromCode) && serviceTypeFromCode != null) {
                return serviceTypeFromCode;
            }
        }
        if (serviceTypeName != null) {
            ServiceType serviceTypeFromName = serviceTypeRegistryService.findServiceTypeByName(serviceTypeName);
            if (!ServiceType.UNDEFINED.equals(serviceTypeFromName) && serviceTypeFromName != null) {
                return serviceTypeFromName;
            }
        }
        throw new IllegalArgumentException("application serviceType not found. code:" + serviceTypeCode + ", name:" + serviceTypeName);
    }

    private String findServiceTypeName(int serviceTypeCode) {
        final ServiceType serviceType = serviceTypeRegistryService.findServiceType(serviceTypeCode);
        if (serviceType == null) {
            return null;
        }
        return serviceType.getName();
    }
}

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Supply the exact registered serviceTypeName (e.g. TOMCAT) or its correct serviceTypeCode
  2. Deploy/verify custom service-type definitions on the Pinpoint web server
  3. Check the application's service type in the Pinpoint UI and use that value

Example fix

// before
GET /getScatterData?applicationName=myApp&serviceTypeName=tomcat&from=...&to=...
// after
GET /getScatterData?applicationName=myApp&serviceTypeName=TOMCAT&from=...&to=...
Defensive patterns

Strategy: validation

Validate before calling

if (!serviceTypeCode && !serviceTypeName) throw new Error('scatter chart requires serviceTypeCode or serviceTypeName');

Try / catch

try { ... } catch (IllegalArgumentException e) { if (e.getMessage().contains("serviceType not found")) { /* correct serviceTypeName/code and retry */ } else { throw e; } }

Prevention

When it happens

Trigger: Calling scatter chart endpoints (getScatterData) with an unregistered serviceTypeCode or a serviceTypeName that findServiceTypeByName cannot resolve.

Common situations: Typo or wrong-case serviceTypeName; custom service types not deployed on the web server; stale clients sending outdated type codes after an upgrade.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of pinpoint-apm/pinpoint@744c3d3075 (2026-09-07). Data as JSON: /api/errors/57a06c265f4a6258. Report an issue: GitHub.