title: PrimeFaces autocomplete 3.3.1 not working for me
body: <p>I have set up a test page using the PrimeFaces showcase labs code to test out the  component. When I start typing in the autocomplete box, I receive an exception. Note that depending on whether I have client or server state saving turned on, the exceptions are different. I am using WebLogic 11g, PrimeFaces 3.3.1, Apache Tomahawk 1.1.13 and Mojarra 2.1.8. Any ideas?</p>
  
  <p><strong>AutoCompleteBean.java</strong></p>
  
  <pre><code>@ManagedBean
  public class AutoCompleteBean {  
  
      private String txt1;        
  
      public List&lt;String&gt; complete(String query) {  
          List&lt;String&gt; results = new ArrayList&lt;String&gt;();  
  
          for (int i = 0; i &lt; 10; i++) {  
              results.add(query + i);  
          }  
  
          return results;  
      }  
  
      public String getTxt1() {  
          return txt1;  
      }  
  
      public void setTxt1(String txt1) {  
          this.txt1 = txt1;  
      }  
  
  }  
  </code></pre>
  
  <p><strong>autocomplete.xhtml</strong></p>
  
  <pre><code>    &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html 
      xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"&gt;
  
  &lt;h:head&gt;&lt;/h:head&gt;
  
  &lt;h:form id="form"&gt;  
      &lt;p:panel header="AutoComplete" toggleable="true" id="panel"&gt;  
              &lt;h:outputLabel value="Simple :" for="acSimple" /&gt;  
              &lt;p:autoComplete id="acSimple" value="#{autoCompleteBean.txt1}"   
                      completeMethod="#{autoCompleteBean.complete}"/&gt;                         
      &lt;/p:panel&gt;  
  &lt;/h:form&gt;  
  
  &lt;/html&gt;
  </code></pre>
  
  <p><strong>Exception when javax.faces.STATE_SAVING_METHOD = client</strong></p>
  
  <pre><code>Jul 3, 2012 10:00:03 AM com.sun.faces.renderkit.ClientSideStateHelper doGetState
  SEVERE: Not in GZIP format
  java.io.IOException: Not in GZIP format
          at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:137)
          at java.util.zip.GZIPInputStream.&lt;init&gt;(GZIPInputStream.java:58)
          at java.util.zip.GZIPInputStream.&lt;init&gt;(GZIPInputStream.java:68)
          at com.sun.faces.renderkit.ClientSideStateHelper.doGetState(ClientSideStateHelper.java:244)
          at com.sun.faces.renderkit.ClientSideStateHelper.getState(ClientSideStateHelper.java:211)
          at com.sun.faces.renderkit.ResponseStateManagerImpl.getState(ResponseStateManagerImpl.java:100)
          at com.sun.faces.application.view.FaceletPartialStateManagementStrategy.restoreView(FaceletPartialStateManagemen
  tStrategy.java:331)
          at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:138)
          at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
          at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:513)
          at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:142)
          at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:303)
          at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:192)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
          at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
          at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
          at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
          at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
          at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
          at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
          at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
          at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
          at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
          at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
  </code></pre>
  
  <p><strong>Exception when javax.faces.STATE_SAVING_METHOD = server</strong></p>
  
  <pre><code>java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      at java.lang.String.substring(String.java:1937)
      at com.sun.faces.renderkit.ServerSideStateHelper.getState(ServerSideStateHelper.java:277)
      at com.sun.faces.renderkit.ResponseStateManagerImpl.getState(ResponseStateManagerImpl.java:100)
      at com.sun.faces.application.view.FaceletPartialStateManagementStrategy.restoreView(FaceletPartialStateManagementStrategy.java:331)
      at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:138)
      at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:513)
      at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:142)
      at javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:303)
      at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:192)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
      at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
      at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
      at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
      at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
  </code></pre>