Я сталкиваюсь с этим исключением в проекте java 1.7:
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: -1
at java.util.LinkedList.checkPositionIndex(LinkedList.java:558) ~[na:1.7.0_251]
at java.util.LinkedList.listIterator(LinkedList.java:865) ~[na:1.7.0_251]
at java.util.AbstractList.listIterator(AbstractList.java:299) ~[na:1.7.0_251]
at java.util.AbstractSequentialList.iterator(AbstractSequentialList.java:239) ~[na:1.7.0_251]
at com.project.exceptions.handlers.JsfExceptionHandler.handle(JsfExceptionHandler.java:74) ~[project-0.0.1-SNAPSHOT.jar:na]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:119) ~[jsf-impl-2.1.13-redhat-1.jar!/:2.1.13-redhat-1]
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) ~[jsf-impl-2.1.13-redhat-1.jar!/:2.1.13-redhat-1]
at org.springframework.faces.webflow.FlowLifecycle.render(FlowLifecycle.java:80) ~[spring-faces-2.3.2.RELEASE.jar:2.3.2.RELEASE]
at org.springframework.faces.webflow.JsfView.render(JsfView.java:89) ~[spring-faces-2.3.2.RELEASE.jar:2.3.2.RELEASE]
at org.springframework.webflow.engine.ViewState.render(ViewState.java:296) ~[spring-webflow-2.3.2.RELEASE.jar:2.3.2.RELEASE]
at org.springframework.webflow.engine.ViewState.resume(ViewState.java:207) ~[spring-webflow-2.3.2.RELEASE.jar:2.3.2.RELEASE]
at org.springframework.webflow.engine.Flow.resume(Flow.java:545) [spring-webflow-2.3.2.RELEASE.jar:2.3.2.RELEASE]
at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:258) [spring-webflow-2.3.2.RELEASE.jar:2.3.2.RELEASE]
... 62 common frames omitted
, но я не могу понять, в какой ситуации размер LinkedList мог бы быть -1, не так ли Предположим, будет положительным числом? Любое предложение?
Код обработчика пользовательских исключений (строка 74 предназначена для)
public class JsfExceptionHandler extends ExceptionHandlerWrapper {
...
@Override
public void handle() throws FacesException {
FacesContext fc = ContextUtils.getFacesContextInstance();
for (Iterator<ExceptionQueuedEvent> i = getUnhandledExceptionQueuedEvents().iterator(); i.hasNext();) {
...
}
}
}