-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 still occurs #4260
Comments
@skybber Commented |
@xinyuan-zhang Commented |
@skybber Commented |
@BalusC Commented Most probably you're somewhere using Related reading: https://stackoverflow.com/q/14911158/157882 |
@edburns Commented https://javaee.groups.io/g/jsf-spec/message/30 Also, please consider joining that group, as that group has taken the Thanks, Ed Burns |
|
Hi, is there any progress or workaround for this issue? We bumped same exception under heavy server load and can't find a workaround.
|
We are using JSF 2.3 and Payara 5.2 also facing this issue.
|
we have similar problem with jakarta.faces 2.3.15 but may it's possible to adapt the code and provide some check instead run into IndexOutOfBoundsException ? |
@EugenFischer nice point, we also use omnifaces but not cache component only onloadScript component. We use in our base template page like below;
May be @BalusC can show us the right solution? |
@EugenFischer, @murathazer |
Relabeling as 2.3 as folks are saying it is an issue in 2.3 releases as well. Note that attaching a reproducer using only Mojarra will make it easier for the maintainers to address the issue. |
Signed-off-by: melloware <mellowaredev@gmail.com>
Signed-off-by: melloware <mellowaredev@gmail.com>
Submitted PR. In the IF branch above it its checking |
@melloware : I'm not seeing how that fixes the issue. Probably you meant to check A reproducer would still be useful so it could be covered in IT / TCK. |
You are right this only prevents possible NPE. I will update the PR |
Scratch above commit, the ticket number was wrong, it's actually for #5072 |
Signed-off-by: melloware <mellowaredev@gmail.com>
Signed-off-by: melloware <mellowaredev@gmail.com>
Signed-off-by: melloware <mellowaredev@gmail.com>
OK I added |
Signed-off-by: melloware <mellowaredev@gmail.com>
Signed-off-by: melloware <mellowaredev@gmail.com>
Signed-off-by: melloware <mellowaredev@gmail.com>
Fix #4260: AttachedObjectListHolder IndexOutOfBounds fix 4.0
Fix #4260: AttachedObjectListHolder IndexOutOfBounds fix 3.0
Fix #4260: AttachedObjectListHolder IndexOutOfBounds fix 2.3
3.0.2 is affected too. Can the fix be ported to 3.x? |
It is fixed in 3.0 it just has not been released to Maven Central. |
I'll take a look at doing a 3.0 release later this week if there's demand. Until now 3.0.x has not been released as much since seemingly few people cared about it. All the requests were for 2.3.x and 4.x. |
Arjan, it needed to be released nonetheless. I have been diligently upmerging all 2.x fixes into 3.x as well. We personally and on our private jobs indeed do not care about 3.x but there are definitely people out caring about this. Mojarra must be independent from our personal/professional preferences. As long as Jakarta EE 9 has not been marked EOL. |
@BalusC Are you volunteering to do Mojarra releases? Arjan really is stretched too thin across all things Jakarta EE so I completely understand why he is opting to only do releases where there is a demand. |
I've over the past year asked at least twice for the exact plan/process/automatability, yes. Until now it's not terribly clear to me.
Me too but I do not agree this. |
For a @ViewScoped page we are catching an exception in phase RESTORE_VIEW:
javax.faces.FacesException: Unexpected error restoring state for component with id gF:dgr_tabset:dgrStatus. Cause: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0.
The issue should have been fixed with #4011 in [2.1.29-05] which ports #3245 (JAVASERVERFACES-3241).
Our stacktrace looks very much the same as those mentioned in #3245: Stacktrace-ACME-2017-07-12.txt
The issue still occurs very often with [2.1.29-08] in our performance tests. And occasionally in production, in fact just a few minutes ago. Apparently the exception does not happen deterministically.
The cause is the following code in AttachedObjectListHolder.restoreState
this.attachedObjects is an empty list and thus throws the IndexOutOfBoundsException. This is the same code in all versions up to [2.3.2]. (Except for formatting of generics).
First of all I would like to point on the assumption that is documented in the comment. This assumption of an 1:1 relation is not fulfilled, so in my opinion the code should throw an IllegalStateException.
Neither could we find the root cause of the problem, nor do we have a simple test to reproduce the problem. Strong load seems to facilitate the problem.
The text was updated successfully, but these errors were encountered: