Ajax - prime faces

Pessoal estou desenvolvendo uma aplicação com JSF2 + PRIMEFACES, porem os componentes do prime é ajax por padrão certo?
Tem vez que funciona normal, ai do nada para de funcionar tudo que é ajax;;; alguem sabe o que pode ser?

erroo que dá quando (por exemplo clica em um botao do prime)

javax.faces.FacesException: Unexpected error restoring state for component with id j_idt3.  Cause: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0.
	at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:273)
	at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:151)
	at javax.faces.component.UIComponent.visitTree(UIComponent.java:1485)
	at javax.faces.component.UIComponent.visitTree(UIComponent.java:1496)
	at com.sun.faces.component.visit.VisitUtils.doFullNonIteratingVisit(VisitUtils.java:75)
	at com.sun.faces.application.view.StateManagementStrategyImpl.restoreView(StateManagementStrategyImpl.java:257)
	at com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:181)
	at com.sun.faces.application.view.ViewHandlingStrategy.restoreView(ViewHandlingStrategy.java:123)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.restoreView(FaceletViewHandlingStrategy.java:448)
	at com.sun.faces.application.view.MultiViewHandler.restoreView(MultiViewHandler.java:148)
	at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:187)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:111)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:383)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
	at java.util.ArrayList.RangeCheck(Unknown Source)
	at java.util.ArrayList.get(Unknown Source)
	at javax.faces.component.AttachedObjectListHolder.restoreState(AttachedObjectListHolder.java:165)
	at javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1432)
	at com.sun.faces.application.view.StateManagementStrategyImpl$1.visit(StateManagementStrategyImpl.java:265)
	... 29 more

Observação : Coisa bisarra, se eu pegar por exemplo um p:commandlink do prime que não esta funcionando e mudar para h:commandLink e salvar, e depois mudar para p: novamente vai funcinar por um periodo, depois para de funcionar.

Pessoal alguem?

Eu desenvolvo com o Primefaces tenho as vezes esse problema, somente quando modifico meu codigo e atualizo a view antes que o conteiner implemente todos minhas alterações, fora isso não acontece, quando acontece somente atualizo a pagina e não tenho mais o problema.

O meu acontece sempre,

Observação : eu eu fazer alguma requisição sem ser ajax antes de usar os componetes ajax do prime, ai funciona.

Ex: se eu dar um clique em um h:commandLink que faz um requisição ao servidor sem ser ajax, ai funciona belezinha, mais se de cara eu for usar o prime, por exemplo clicar na DataTable…ai gera este erro

Qual versão do primefaces você está usando ?

A ultima 2.2

manda seu código ae pra gnte ver!"

cadastroCliente.xhtml

<h:head>
	<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
	<title>Cadastro de Clientes</title>
</h:head>
<f:view>
	<h:body>
		<h:form id="frmGridCliente">
			<p:growl id="menssagensCliente"
					 life="3000"/>  
			<p:dataTable widgetVar="dtClientes"
						 var="cliente" 
						 value="#{mbCliente.clientes}" 
						 paginator="true"
						 rows="5" 
						 selection="#{mbCliente.cliente}" 
						 selectionMode="single"
						 onselectComplete="dlgCliente.show();"
				         emptyMessage="Nao existe Cliente cadastrado"
				         style="width:70%"
				         update="frmCadastroCliente:dlgCliente">
	 			<p:column sortBy="#{cliente.id}" 
				          filterBy="#{cliente.id}"
				          style="width:20%">
					<f:facet name="header">
						<h:outputText value="Id" />
					</f:facet>
					<h:outputText value="#{cliente.id}" />
				</p:column>
	 			<p:column sortBy="#{cliente.nome}" 
				          filterBy="#{cliente.nome}">
					<f:facet name="header">
						<h:outputText value="Nome" />
					</f:facet>
					<h:outputText value="#{cliente.nome}" />
				</p:column>
	 			<p:column sortBy="#{cliente.cnpj}" 
					      filterBy="#{cliente.cnpj}">
					<f:facet name="header">
						<h:outputText value="Cnpj" />
					</f:facet>
					<h:outputText value="#{cliente.cnpj}" />
				</p:column>
			</p:dataTable>
			<p:panel style="width:69.2%">
				<p:commandLink title="Novo"
				               oncomplete="dlgCliente.show();"
				               action="#{mbCliente.incluir}"
				               update="frmCadastroCliente:pnl">
					<h:graphicImage url="/imagens/novo.jpg"
									style="border:0"/>
				</p:commandLink>
				<h:commandLink title="Apagar"
			               actionListener="#{mbCliente.apagar}"
			               style="margin-left:20px"
			               update="frmGridCliente">
					<p:graphicImage url="/imagens/apagar.jpg"
									style="border:0"/>
				</h:commandLink>
				<h:commandLink title="Voltar"
			      	         action="#{mbCliente.voltar}"
			    	           ajax="false"
			        	       style="margin-left:20px">
					<h:graphicImage url="/imagens/voltar.jpg"
									style="border:0"/>
				</h:commandLink>
			</p:panel>
		</h:form>		
		<h:form id="frmCadastroCliente">
			<p:dialog id="dlgCliente"
					  widgetVar="dlgCliente"
		       		  header="Cliente"
					  width="500"> 
				<h:panelGrid columns="2" id="pnl" >
					<h:outputLabel value="Id" 
		   			   	           for="itxId" 
		   			   	           rendered="#{!empty mbCliente.cliente.id}"/>
					<p:inputText id="itxId"
							     value="#{mbCliente.cliente.id}" 
							     disabled="true"
							     rendered="#{!empty mbCliente.cliente.id}"/>
					<h:outputLabel value="Nome" 
		   			   	           for="itxNome" />
					<p:inputText id="itxNome"
							     value="#{mbCliente.cliente.nome}" 
							     size="35"
							     required="true"
							     requiredMessage="Informe o Nome"/>
					<h:outputLabel value="CNPJ" 
		   			   	           for="mskCnpj" />
					<p:inputMask id="mskCnpj"
								 mask="99.999.999/9999-99"
							     value="#{mbCliente.cliente.cnpj}"
							     required="true"
							     requiredMessage="Informe o CNPJ"/>
				</h:panelGrid>
				<h:panelGrid columns="3">
					<h:commandLink title="Gravar"
				                   action="#{mbCliente.gravar}"
				                   rendered="#{empty mbCliente.cliente.id}"
				                   update="menssagensCliente, itxId, itxNome, mskCnpj, frmGridCliente">
						<p:graphicImage url="/imagens/gravar.jpg"
									style="border:0"/>
					</h:commandLink>
					<p:commandLink title="Alterar"
				                   actionListener="#{mbCliente.alterar}"
				                   rendered="#{!empty mbCliente.cliente.id}"
				                   oncomplete="dlgCliente.hide();"
				                   update="menssagensCliente, itxId, itxCnpj, itxNome, frmGridCliente">
						<p:graphicImage url="/imagens/gravar.jpg"
									style="border:0"/>
					</p:commandLink>
				</h:panelGrid>
			</p:dialog>
		</h:form>
	</h:body>
</f:view>
</html>

MBCliente

package controladores;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.ViewScoped;
import javax.faces.event.ActionEvent;

import org.primefaces.event.RowEditEvent;
import org.primefaces.event.SelectEvent;

import negocios.ClienteBO;
import entidades.Cliente;


@ViewScoped
@ManagedBean(name="mbCliente")
public class MBCliente implements Serializable {
	
	private static final long serialVersionUID = 4718957167100835066L;
	private ClienteBO clienteBO;
	public Cliente cliente;
	private List<Cliente> clientes;
		
	
	public MBCliente(){
		this.setClienteBO(new ClienteBO());
	    this.setCliente(new Cliente());
		this.setClientes(this.listar());
	}

	public ClienteBO getClienteBO() {
		return clienteBO;
	}

	public void setClienteBO(ClienteBO clienteBO) {
		this.clienteBO = clienteBO;
	}

	public Cliente getCliente() {
		return cliente;
	}

	public void setCliente(Cliente cliente) {
		this.cliente = cliente;
	}

	public List<Cliente> getClientes() {
		return clientes;
	}

	public void setClientes(List<Cliente> clientes) {
		this.clientes = clientes;
	}
	
	public void incluir(){
		this.setCliente(new Cliente());
	}
	
	public void gravar(){
		try {
			this.getClienteBO().gravar(this.getCliente());
			this.getClientes().add(this.getCliente());
			this.setCliente(new Cliente());
			JSFUtil.enviarMenssagemSucesso("Cliente gravado com sucesso");
		} catch (Exception e) {
			JSFUtil.enviarMenssagemErro("Erro ao gravar"+" "+e.getMessage() );
		}
	}
	
	public void alterar(ActionEvent evento) {
		try {
			Integer indice = this.getClientes().indexOf(this.getCliente());
			this.getClienteBO().alterar(this.getCliente());
			this.getClientes().remove(this.getCliente());
			this.getClientes().add(indice, this.getCliente());
			JSFUtil.enviarMenssagemSucesso("Cliente alterado com sucesso");
		} catch (Exception e) {
			JSFUtil.enviarMenssagemErro("Erro ao alterar"+" "+e.getMessage() );
		}
	}

	
	public void apagar(ActionEvent evento) {
		if(this.getCliente() == null || (this.getCliente() != null && this.getCliente().getId() == null) ) {
			JSFUtil.enviarMenssagemAtencao("Selecione um cliente na grid");
		}else {
			try {
				this.getClienteBO().apagar(this.getCliente());
				this.getClientes().remove(this.getCliente());
				JSFUtil.enviarMenssagemSucesso("Cliente apagado com sucesso");
			} catch (Exception e) {
				JSFUtil.enviarMenssagemErro("Erro ao apagar"+" "+e.getMessage() );
			}
		}
	}
	
	public List<Cliente> listar(){ 
		List<Cliente> clientes = new ArrayList<Cliente>();
		try {
			clientes = this.getClienteBO().listar();
		} catch (Exception e) {
			JSFUtil.enviarMenssagemErro("Erro ao Listar Clientes"+" "+e.getMessage() );
		}
		return clientes;
	}
			
	
	public String voltar(){
		return "index";
	}
}