pinpoint-apm/pinpoint · error · ObjectNameValidationFailedException

ApplicationName not provided

Error message

ApplicationName not provided

What it means

ObjectNameResolverV1.resolve() requires the application name to be supplied via system property -Dpinpoint.applicationName. When the resolved property is absent or fails validation (length check), the resolver throws ObjectNameValidationFailedException because the agent cannot be uniquely identified without an application name.

Solutions

  1. Add -Dpinpoint.applicationName=<name> to the JVM arguments of the profiled application
  2. Ensure the value is non-empty and within the allowed length/character set of the id validator
  3. Check for typos or conflicting properties in agent config (pinpoint.config vs system properties)
  4. Wrap agent startup in validation that checks required pinpoint properties before boot

Example fix

// before
java -jar app.jar
// after
java -Dpinpoint.applicationName=myApp -jar app.jar
Defensive patterns

Strategy: validation

Validate before calling

String appName = System.getProperty("pinpoint.applicationName");
if (appName == null || appName.trim().isEmpty() || appName.length() > 24) {
    throw new IllegalArgumentException("set -Dpinpoint.applicationName before starting the agent");
}

Try / catch

try {
    agentNameResolver.resolve();
} catch (ObjectNameValidationFailedException e) {
    logger.error("Agent identity invalid ({}): provide -Dpinpoint.applicationName", e.getPropertyType());
}

Prevention

When it happens

Trigger: Starting the Pinpoint agent without -Dpinpoint.applicationName (v1 naming mode), or supplying one that fails AgentIdValidator validation (empty, too long, invalid characters).

Common situations: Missing or mistyped JVM startup flag (-Dpinpoint.applicationName spelled wrong); application name exceeding the configured max length; whitespace-only value; migration to v1 name resolver without updating launch scripts.

Understand the failure class

Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.

Related errors


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

Appendix: source

Thrown at agent-module/profiler/src/main/java/com/navercorp/pinpoint/profiler/name/v1/ObjectNameResolverV1.java:78

        ObjectNameFilter filter = new ObjectNameFilter(agentPropertyList);

        // required
        ObjectNameProperty agentIdField = filter.resolve(AgentProperties::getAgentId, idValidator::validateAgentId);
        String agentId;
        if (!agentIdField.hasLengthValue()) {
            logger.info("Failed to resolve AgentId(-Dpinpoint.agentId)");
            agentId = base64Uid();
            logger.info("Auto generate AgentId='{}'", agentId);
        } else {
            agentId = agentIdField.getValue();
            resolveLog(agentIdField);
        }

        // required
        final ObjectNameProperty applicationName = filter.resolve(AgentProperties::getApplicationName, idValidator::validateApplicationName);
        if (!applicationName.hasLengthValue()) {
            logger.warn("Failed to resolve ApplicationName(-Dpinpoint.applicationName)");
            throw new ObjectNameValidationFailedException(AgentIdType.ApplicationName, "ApplicationName not provided");
        } else {
            resolveLog(applicationName);
        }

        // optional
        final ObjectNameProperty agentName = filter.resolve(AgentProperties::getAgentName, idValidator::validateAgentName);
        if (!agentName.hasLengthValue()) {
            logger.info("No AgentName(-Dpinpoint.agentName) provided, it's optional!");
        } else {
            resolveLog(agentName);
        }
        String agentNameStr = agentName.getValue();
        if (StringUtils.isEmpty(agentNameStr)) {
            agentNameStr = agentId;
        }
        return new ObjectNameV1(agentId, agentNameStr, applicationName.getValue());
    }

View on GitHub (pinned to 744c3d3075)