projectlombok/lombok · error · IllegalArgumentException

There is more than one parmaeter definition that does not…

Error message

There is more than one parmaeter definition that does not include TOPIC: 

What it means

Symmetric to the TOPIC check: at most one parameter definition list may omit TOPIC. A second non-TOPIC list triggers this IllegalArgumentException (note the 'parmaeter' typo is in the library's message).

Solutions

  1. Provide exactly one parameter list without TOPIC; collapse extra no-topic overloads.
  2. Distinguish overloads by including TOPIC in the additional list(s).
  3. Remove redundant empty parameter groups like '()()'.

Example fix

// before
lombok.log.customDeclaration = com.acme.F.create(TYPE)()
// after
lombok.log.customDeclaration = com.acme.F.create(TYPE)(TOPIC)
Defensive patterns

Strategy: validation

Validate before calling

int noTopicLists = 0;
// for each parenthesized param group: if (!group.contains("TOPIC")) noTopicLists++;
boolean valid = noTopicLists <= 1;

Try / catch

try {
  LogDeclaration decl = LogDeclaration.valueOf(cfgValue);
} catch (IllegalArgumentException e) {
  // collapse duplicate no-TOPIC groups and retry
}

Prevention

When it happens

Trigger: LogDeclaration.valueOf with a declaration containing two or more alternative parameter lists that both lack TOPIC, e.g. 'create()()' or 'create(TYPE)(TOPIC)(TYPE,TOPIC)' variants where the non-topic group repeats.

Common situations: Declaring multiple no-topic overloads for a custom logger factory method instead of one, when wiring custom logger declarations in lombok.config.

Understand the failure class

Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.

Related errors


AI-assisted analysis of projectlombok/lombok@6d6a3e9fec (2026-09-07). Data as JSON: /api/errors/f5ef7c977d58f795. Report an issue: GitHub.

Appendix: source

Thrown at src/core/lombok/core/configuration/LogDeclaration.java:70

		if (declaration == null) return null;
		
		Matcher matcher = DECLARATION_PATTERN.matcher(declaration);
		if (!matcher.matches()) throw new IllegalArgumentException("The declaration must follow the pattern: [LoggerType ]LoggerFactoryType.loggerFactoryMethod(loggerFactoryMethodParams)[(loggerFactoryMethodParams)]");
		
		TypeName loggerFactoryType = TypeName.valueOf(matcher.group(2));
		TypeName loggerType = TypeName.valueOf(matcher.group(1));
		if (loggerType == null) loggerType = loggerFactoryType;
		IdentifierName loggerFactoryMethod = IdentifierName.valueOf(matcher.group(3));
		List<List<LogFactoryParameter>> allParameters = parseParameters(matcher.group(4));
		
		List<LogFactoryParameter> parametersWithoutTopic = null;
		List<LogFactoryParameter> parametersWithTopic = null;
		for (List<LogFactoryParameter> parameters: allParameters) {
			if (parameters.contains(LogFactoryParameter.TOPIC)) {
				if (parametersWithTopic != null) throw new IllegalArgumentException("There is more than one parameter definition that includes TOPIC: " + parametersWithTopic + " and " + parameters);
				parametersWithTopic = parameters;
			} else {
				if (parametersWithoutTopic != null) throw new IllegalArgumentException("There is more than one parmaeter definition that does not include TOPIC: " + parametersWithoutTopic + " and " + parameters);
				parametersWithoutTopic = parameters;
			}
		}
		
		// sanity check (the pattern should disallow this situation
		if (parametersWithoutTopic == null && parametersWithTopic == null) throw new IllegalArgumentException("No logger factory method parameters specified.");
		
		return new LogDeclaration(loggerType, loggerFactoryType, loggerFactoryMethod, parametersWithoutTopic, parametersWithTopic);
	}
	
	private static List<List<LogFactoryParameter>> parseParameters(String parametersDefinitions) {
		List<List<LogFactoryParameter>> allParameters = new ArrayList<List<LogFactoryParameter>>();
		Matcher matcher = PARAMETERS_PATTERN.matcher(parametersDefinitions);
		while (matcher.find()) {
			String parametersDefinition = matcher.group(1);
			List<LogFactoryParameter> parameters = new ArrayList<LogFactoryParameter>();
			if (!parametersDefinition.isEmpty()) { 
				for (String parameter : parametersDefinition.split(",")) {

View on GitHub (pinned to 6d6a3e9fec)