pinpoint-apm/pinpoint · error · IllegalArgumentException

basePackageName must not be empty

Error message

basePackageName must not be empty

What it means

Constructor guard in DefaultPackageBasedMatcher: basePackageName passed the requireNonNull check but is blank/whitespace-only (StringUtils.hasText fails), so a single-package matcher cannot be built. The input at fault is the caller's package name string.

Solutions

  1. Pass a non-blank package name such as 'com.example'
  2. Trim and validate configuration strings before constructing the matcher
  3. Check profiler plugin config for empty package patterns
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at agent-module/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/instrument/matcher/DefaultPackageBasedMatcher.java:40 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at agent-module/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/instrument/matcher/DefaultPackageBasedMatcher.java:40

import java.util.Objects;

/**
 * @author jaehong.kim
 */
@InterfaceStability.Unstable
public class DefaultPackageBasedMatcher implements PackageBasedMatcher {
    private final String basePackageName;
    private final MatcherOperand matcherOperand;

    DefaultPackageBasedMatcher(final String basePackageName) {
        this(basePackageName, null);
    }

    DefaultPackageBasedMatcher(final String basePackageName, final MatcherOperand additional) {
        Objects.requireNonNull(basePackageName, "basePackageName");
        if (!StringUtils.hasText(basePackageName)) {
            throw new IllegalArgumentException("basePackageName must not be empty");
        }
        this.basePackageName = basePackageName;

        MatcherOperand operand = new PackageInternalNameMatcherOperand(basePackageName);
        if (additional != null) {
            // package AND additional
            operand = operand.and(additional);
        }
        this.matcherOperand = operand;
    }

    @Override
    public String getBasePackageName() {
        return this.basePackageName;
    }

    @Override
    public MatcherOperand getMatcherOperand() {

View on GitHub (pinned to 744c3d3075)