Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Varargs: jakarta.el.MethodNotFoundException

Open
#3 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
java
Domain
backend

Research direction

Start at ELUtil.findMethod and findMostSpecificWrapper, following the call from BeanELResolver.invoke, and reproduce the supplied varargs expression with the TestBean methods. Check how ambiguous overloads and enum arguments are resolved against the applicable specification. Done means the expected method selection or a confirmed specification limitation is covered by a regression test.

Written by the indexing model from the issue text.

Description

I encountered the following exception when testing the code below on Wildfly 24."

Tomcat had updated their varargs handling in BZ 65358, and I'm wondering if this API could have something similar applied?

However, I understand this might also be due to vagueness in the spec? Enum could be coerce to a string? I appreciate any assistance. Thanks!

Caused by: javax.el.MethodNotFoundException: Unable to find unambiguous method: class com.test.TestBean.testMethod(com.test.Level, com.test.Level, com.test.Level)
	at javax.el.ELUtil.findMostSpecificWrapper(ELUtil.java:407)
	at javax.el.ELUtil.findWrapper(ELUtil.java:376)
	at javax.el.ELUtil.findMethod(ELUtil.java:271)
	at javax.el.ELUtil.findMethod(ELUtil.java:230)
	at javax.el.BeanELResolver.invoke(BeanELResolver.java:327)
	at org.apache.jasper.el.JasperELResolver.invoke(JasperELResolver.java:147)

public enum Level {
    LOW   (1);

    private final int levelCode;

    private Level(int levelCode) {
        this.levelCode = levelCode;
    }
}
public class TestBean {

    public Level getLevel() {
        return Level.LOW;
    }
    
    public String testMethod(Level level1, Level... level2) {
        return "(Level level1, Level... level2)";
    }

    public String testMethod(String param1, Level... level2) {
        return "(String param1, Level... level2)";
    }
}

EL Expression:
${testBean.testMethod(testBean.getLevel(), testBean.getLevel(), testBean.getLevel())}

Dominant language
Java
Stars
15
Forks
10
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-ee4j/expressly

All issues in eclipse-ee4j/expressly

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.