Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Mauro D'Uva
p:fileupload - ArrayIndexOutOfBoundsException
November 9, 2017 1:52 PM
Answer

Mauro D'Uva

Rank: New Member

Posts: 1

Join Date: June 8, 2015

Recent Posts

We have an issue using p:fileupload tag. The page is displayed correctly and everything works fine, but when the file is uploaded, it creates the following error message in the logs:

Exception:
 1Nov 09, 2017 2:16:59 PM com.liferay.faces.bridge.context.map.RequestParameterMapMultiPartImpl <init>
 2SEVERE: Array index out of range: 2
 3java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 2
 4        at com.liferay.faces.bridge.context.map.NamespacedParameterMap.append(NamespacedParameterMap.java:44)
 5        at com.liferay.faces.bridge.context.map.RequestParameterMapMultiPartImpl.<init>(RequestParameterMapMultiPartImpl.java:283)
 6        at com.liferay.faces.bridge.context.map.RequestParameterMapFactory.<init>(RequestParameterMapFactory.java:50)
 7        at com.liferay.faces.bridge.context.BridgeContextImpl.getRequestParameterMapFactory(BridgeContextImpl.java:1012)
 8        at com.liferay.faces.bridge.context.BridgeContextImpl.getRequestParameterMap(BridgeContextImpl.java:1003)
 9        at com.liferay.faces.bridge.context.BridgeContextImpl.getRequestHeaderValuesMap(BridgeContextImpl.java:992)
10        at com.liferay.faces.bridge.context.BridgeContextImpl.getRequestHeaderMap(BridgeContextImpl.java:982)
11        at com.liferay.faces.bridge.context.ExternalContextImpl.getRequestHeaderMap(ExternalContextImpl.java:449)
12        at com.sun.faces.context.PartialViewContextImpl.isAjaxRequest(PartialViewContextImpl.java:111)
13        at javax.faces.context.PartialViewContextWrapper.isAjaxRequest(PartialViewContextWrapper.java:117)
14        at org.primefaces.context.PrimePartialViewContext.isAjaxRequest(PrimePartialViewContext.java:80)
15        at com.sun.faces.context.ExceptionHandlerFactoryImpl.getExceptionHandler(ExceptionHandlerFactoryImpl.java:65)
16        at com.liferay.faces.bridge.context.ExceptionHandlerFactoryImpl.getExceptionHandler(ExceptionHandlerFactoryImpl.java:36)
17        at com.wcb.common.web.app.error.CustomExceptionHandlerFactory.getExceptionHandler(CustomExceptionHandlerFactory.java:20)
18        at com.sun.faces.context.FacesContextFactoryImpl.getFacesContext(FacesContextFactoryImpl.java:93)
19        at org.primefaces.context.PrimeFacesContextFactory.getFacesContext(PrimeFacesContextFactory.java:28)
20        at com.sun.faces.context.InjectionFacesContextFactory.getFacesContext(InjectionFacesContextFactory.java:121)
21        at com.liferay.faces.bridge.BridgePhaseBaseImpl.getFacesContext(BridgePhaseBaseImpl.java:356)
22        at com.liferay.faces.bridge.BridgePhaseBaseImpl.init(BridgePhaseBaseImpl.java:188)
23        at com.liferay.faces.bridge.BridgePhaseResourceImpl.execute(BridgePhaseResourceImpl.java:56)
24        at com.liferay.faces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:128)
25        at javax.portlet.faces.GenericFacesPortlet.serveResource(GenericFacesPortlet.java:178)
26        at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:122)
27        at com.liferay.portlet.ScriptDataPortletFilter.doFilter(ScriptDataPortletFilter.java:82)
28        at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:116)
29        at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:71)
30        at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:112)
31        at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
32        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:280)
33        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:254)
34        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:136)
35        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:346)
36        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:25)
37        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
38        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
39        at sun.reflect.GeneratedMethodAccessor575.invoke(Unknown Source)
40        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
41        at java.lang.reflect.Method.invoke(Method.java:620)
42        at com.liferay.portal.kernel.bean.ClassLoaderBeanHandler.invoke(ClassLoaderBeanHandler.java:67)
43        at com.sun.proxy.$Proxy917.doFilter(Unknown Source)
44        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
45        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
46        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
47        at com.liferay.portal.kernel.servlet.PortalClassLoaderFilter.doFilter(PortalClassLoaderFilter.java:74)
48        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
49        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
50        at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:117)
51        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:79)
52        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
.

xhtml excerpt:
1<p:fileUpload update="@form" value="#{batchUploadInvoiceBean.uploadedFile}"
2                mode="advanced" allowTypes="/(\.|\/)(xml)$/" label="Browse"
3                fileUploadListener="#{batchUploadInvoiceBean.upload}" />


We are using Liferay 6.2 GA1 and liferay-faces-bridge-impl-3.2.4-ga5.jar. Hpw do we get rid of the error message?

Thanks
Mauro
Neil Griffin
RE: p:fileupload - ArrayIndexOutOfBoundsException
November 9, 2017 2:02 PM
Answer

Neil Griffin

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2511

Join Date: July 26, 2005

Recent Posts

Hi Mauro,

Please upgrade to our latest Liferay Faces dependencies and see if the problem goes away. You can determine the dependencies using the dropdown list at http://www.liferayfaces.org/

Kind Regards,

Neil

Participate in the State of Liferay Community 2017. Help the community and even win some prizes!