title: Why do I get JSF (primefaces) Unable to create new Collection instance for type java.util.Arrays$ArrayList
body: <p>Maybe someone can help me with this:
  I've got a dataTable and it's populated by ArrayList&lt;> and when I try to update this dataTable after causing some changes in it I've got an exception</p>
  
  <blockquote>
    <p>SEVERE [http-apr-8080-exec-1] 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</p>
  </blockquote>
  
  <p>Caused by: java.lang.NoSuchMethodException: java.util.Arrays$ArrayList.()</p>
  
  <p>I saw similar questions on SOF but, unfortunatly, it's no use for me.
  (my ArrayList doesn't instantiated by Arrays.asList). My app works fine, but I need to remove this exception.</p>
  
  <p>this is a part of my .xhtml where dataTable is define:</p>
  
  <pre><code>&lt;p:dataTable id="columnsDef"
     widgetVar="columnsList"
     value="#{setup.columnWrapperList}"
     var="columnVar"
     rowKey="#{columnVar.wrappedColumnId}"
     selectionMode="single"
     selection="#{setup.selectedColumn}"
     lazy="false"
     rows="10"
     paginator="false"
     style="width: 100%"
     emptyMessage="#{msg['common.emptyMsg']}"
     resizableColumns="true"
     filterEvent="enter"
     tableStyle="width: auto"&gt;
  </code></pre>
  
  <p>here is part of .xhtml whre setup.columnWrapperList updated</p>
  
  <pre><code>&lt;div class="left"&gt;
              &lt;p:commandButton icon="ui-icon-triangle-1-n"
                               actionListener="#{setup.decOrder}"
                               update="@([id$=columnsDef])"
                               /&gt;
              &lt;p:commandButton icon="ui-icon-triangle-1-s"
                               actionListener="#{setup.incOrder}"
                               update="@([id$=columnsDef])"
                               /&gt;
          &lt;/div&gt;
  </code></pre>
  
  <p>and finaly part of "setup" bean that cause changes in ArrayList:</p>
  
  <pre><code>    public void decOrder() {
      int i = selectedColumn.getOrder();
      if (i &gt; 0) {
          columnWrapperList.get(i).setOrder(i - 1);
          columnWrapperList.get(i - 1).setOrder(i);
          columnWrapperList.sort(new Comparator&lt;ColumnWrapper&gt;() {
              @Override
              public int compare(ColumnWrapper o1, ColumnWrapper o2) {
                  return o1.getOrder() &lt; o2.getOrder() ? -1 : 1;
              }
          });
      }
  }
  </code></pre>
  
  <p>can some one help me please?</p>