pinpoint-apm/pinpoint · error · IllegalArgumentException

basePackageNames must not be empty

Error message

basePackageNames must not be empty

What it means

Constructor guard in DefaultMultiPackageBasedMatcher: the basePackageNames list supplied by the plugin is null or empty, so a package-based matcher cannot be constructed. The input at fault is the caller's package name collection.

Solutions

  1. Provide at least one non-empty package name when creating the matcher
  2. Filter empty lists before calling newDefaultMultiPackageBasedMatcher
  3. Fix plugin config (profiler configuration package patterns) that resolves to nothing
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at agent-module/bootstraps/bootstrap-core/src/main/java/com/navercorp/pinpoint/bootstrap/instrument/matcher/DefaultMultiPackageBasedMatcher.java:42 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/4c40c7444fca729c. Report an issue: GitHub.

Appendix: source

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

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * @author jaehong.kim
 */
@InterfaceStability.Unstable
public class DefaultMultiPackageBasedMatcher implements MultiPackageBasedMatcher {
    private final List<String> basePackageNames;
    private final MatcherOperand matcherOperand;

    DefaultMultiPackageBasedMatcher(final List<String> basePackageNames) {
        this(basePackageNames, null);
    }

    DefaultMultiPackageBasedMatcher(final List<String> basePackageNames, final MatcherOperand additional) {
        if (CollectionUtils.isEmpty(basePackageNames)) {
            throw new IllegalArgumentException("basePackageNames must not be empty");
        }

        final List<String> buildBasePackageName = buildBasePackageNameList(basePackageNames);
        final MatcherOperand operand = joinOr(buildBasePackageName);
        if (operand == null) {
            throw new IllegalStateException("operand is null");
        }
        this.matcherOperand = addOr(operand, additional);

        this.basePackageNames = Collections.unmodifiableList(buildBasePackageName);
    }

    private MatcherOperand addOr(MatcherOperand operand, MatcherOperand additional) {
        if (additional == null) {
            return operand;
        }
        // (package OR ...) AND additional
        operand = operand.and(additional);

View on GitHub (pinned to 744c3d3075)