pinpoint-apm/pinpoint · error · IllegalArgumentException

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

Error message

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

What it means

HeatMapController.findServiceType resolves the application's ServiceType from serviceTypeCode then serviceTypeName; if neither resolves to a registered, non-UNDEFINED type it throws IllegalArgumentException with this message. The heatmap API cannot proceed without knowing the app's service type.

Source

Thrown at web/src/main/java/com/navercorp/pinpoint/web/authorization/controller/HeatMapController.java:140

    }

    public record PagingStatus(boolean complete, long resultFrom) {
    }

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

View on GitHub (pinned to 744c3d3075)

Solutions

  1. Pass the correct serviceTypeName exactly as registered (e.g. TOMCAT) or the matching serviceTypeCode
  2. Check that custom service-type definitions are deployed to the Pinpoint web server (service-types.yml / plugin jars)
  3. Verify the application's actual service type in the Pinpoint UI server list

Example fix

// before
GET /heatmap?applicationName=myApp&serviceTypeName=Tomcat
// after
GET /heatmap?applicationName=myApp&serviceTypeName=TOMCAT
Defensive patterns

Strategy: validation

Validate before calling

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

Try / catch

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

Prevention

When it happens

Trigger: Calling the heatmap endpoint with an unknown/invalid serviceTypeCode and/or a serviceTypeName not present in serviceTypeRegistryService (or resolving to UNDEFINED).

Common situations: Typo'd serviceTypeName (e.g. 'tomcat ' with whitespace or wrong case); custom service-type plugins not loaded on the web server so the code is unregistered; stale UI caching an old type code.

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/a8c77cb6a36d78ab. Report an issue: GitHub.