Bug 62376 - PropertyNotFoundException since 8.5.25
Summary: PropertyNotFoundException since 8.5.25
Status: RESOLVED INVALID
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: EL (show other bugs)
Version: 8.5.x-trunk
Hardware: PC All
: P2 normal (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-15 15:54 UTC by Martin Sadowski
Modified: 2018-08-05 10:04 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Sadowski 2018-05-15 15:54:31 UTC
Upgrading from Tomcat 8.5.24 to 8.5.31 we encountered a lot of PropertyNotFoundException's. I nailed it down to this change: 

https://github.com/apache/tomcat/commit/b7ce5679b9e6a073dadbc31e6ecde12ad1e0ede8#diff-5dfeea95029bca0c6f37f20eeb4940a4

With this change you now compare the paramCount with the passed values which didn't happen before.
I believe that line 186 should be: "if (m.isVarArgs() ...)" (no "!").

We only see these errors when using f:ajax or p:ajax wrapped by composite components which define the listener as an attribute. Perhaps my issue in Primefaces can help: https://github.com/primefaces/primefaces/issues/3659

When debugging this issue I also found, that Mojarra (https://github.com/javaserverfaces/mojarra/blob/2.2.16/jsf-ri/src/main/java/com/sun/faces/facelets/tag/jsf/core/AjaxHandler.java#L460) and Primefaces (https://github.com/primefaces/primefaces/blob/master/src/main/java/org/primefaces/behavior/ajax/AjaxBehaviorListenerImpl.java#L64) are expecting a "MethodNotFoundException" but a "PropertyNotFoundException" is thrown because of (https://github.com/javaserverfaces/mojarra/blob/2.2.16/jsf-ri/src/main/java/com/sun/faces/facelets/el/ContextualCompositeMethodExpression.java#L241)
Comment 1 Mark Thomas 2018-05-15 16:09:14 UTC
Line 186 looks correct to me. It is checking that, for non-vararg methods where the parameter values are provided that the number of parameters matches the number of values. For a non-vararg method they should be equal.

A test case that we could run would be helpful. Ideally as a Tomcat unit test but we should be able to work with anything that reproduces the issue.
Comment 2 Mark Thomas 2018-05-18 08:28:39 UTC
You are going to need to provide a test case to reproduce this.
Comment 3 Mark Thomas 2018-06-05 09:44:54 UTC
Without a test case that demonstrates this issue, this bug report is going to be resolved as INVALID based on the analysis in comment #1.
Comment 4 Mark Thomas 2018-08-05 10:04:34 UTC
2 months have passed with no further information. Resolving as INVALID as per previous comment.