Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-3131

Exception thrown on submit of h:selectMany* components in "Default Value" examples

    Details

      Description

      Step to reproduce:

      1. Deploy the jsf-showcase as a webapp.
      2. Navigate to the h:selectManyListbox "Default Value" example.
      3. Click Submit.

      If the bug still exists, the following exception will appear in the server logs:

      07-Jul-2017 09:58:35.575 SEVERE [http-nio-8181-exec-26] com.sun.faces.renderkit.html_basic.MenuRenderer.createCollection Unable to create new Collection instance for type java.util.Arrays$ArrayList
       java.lang.InstantiationException: java.util.Arrays$ArrayList
              at java.lang.Class.newInstance(Class.java:427)
              at com.sun.faces.renderkit.html_basic.MenuRenderer.createCollection(MenuRenderer.java:910)
              at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectManyValuesForModel(MenuRenderer.java:366)
              at com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectManyValue(MenuRenderer.java:128)
              at com.sun.faces.renderkit.html_basic.MenuRenderer.getConvertedValue(MenuRenderer.java:314)
              at javax.faces.component.UIInput.getConvertedValue(UIInput.java:1045)
              at javax.faces.component.UIInput.validate(UIInput.java:975)
              at javax.faces.component.UIInput.executeValidate(UIInput.java:1248)
              at javax.faces.component.UIInput.processValidators(UIInput.java:712)
              at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1261)
              at javax.faces.component.UIForm.processValidators(UIForm.java:253)
              at com.sun.faces.context.PartialViewContextImpl$PhaseAwareVisitCallback.visit(PartialViewContextImpl.java:575)
              at com.sun.faces.component.visit.PartialVisitContext.invokeVisitCallback(PartialVisitContext.java:183)
              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1689)
              at javax.faces.component.UIForm.visitTree(UIForm.java:371)
              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
              at javax.faces.component.UIComponent.visitTree(UIComponent.java:1700)
              at com.sun.faces.context.PartialViewContextImpl.processComponents(PartialViewContextImpl.java:403)
              at com.sun.faces.context.PartialViewContextImpl.processPartial(PartialViewContextImpl.java:266)
              at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:219)
              at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:1193)
              at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:720)
              at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:466)
              at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:391)
              at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:318)
              at com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:137)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
              at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
              at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: java.lang.NoSuchMethodException: java.util.Arrays$ArrayList.<init>()
              at java.lang.Class.getConstructor0(Class.java:3082)
              at java.lang.Class.newInstance(Class.java:412)
              ... 60 more
      

      This issue also occurs for h:selectManyCheckbox and h:selectManyListbox. This issue seems to be due to the use of Arrays.asList() in SelectManyModelBean. This issue occurs with Mojarra 2.2.13 and 2.2.14 and in jsf-showcase 3.0.0 as well as 3.0.1-SNAPSHOT.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                showcase-2.0.1
                showcase-3.0.1