title: Spring Webflow Serialization error on object holding reference to JPA Data Repository (JSF Integration)
body: <p>Spring Webflow: <strong>2.3.1</strong><br>
  Spring Data: <strong>1.0.2</strong><br>
  JSF: <strong>2.1.9</strong><br>
  Primefaces: <strong>3.3.1</strong><br></p>
  
  <p>I'm trying to combine Spring Data JPA Repositories with JSF DataModel, in this case, Primefaces with LazyDataModel. This happens in a WebApp integrating Spring with JSF, using Spring Webflow.</p>
  
  <p>The problem is when i use a JpaRepository inside LazyDataModel that lives in ViewScope of Spring Webflow:</p>
  
  <hr>
  
  <blockquote>
    <p>Could not serialize flow execution; make sure all objects stored in
    flow or flash scope are serializable
    org.springframework.webflow.execution.repository.snapshot.SerializedFlowExecutionSnapshot.(SerializedFlowExecutionSnapshot.java:75)"</p>
  </blockquote>
  
  <hr>
  
  <p>Without the JpaRepository inside LazyDataModel, i cannot get the correct page and use the Pagination model of spring data. I already found someone with the same problem, but unfortunately no one answered:</p>
  
  <p><a href="http://forum.springsource.org/showthread.php?116022-Webflow-Serialization-error-on-object-holding-ref-to-JPA-Data-Repository" rel="nofollow">http://forum.springsource.org/showthread.php?116022-Webflow-Serialization-error-on-object-holding-ref-to-JPA-Data-Repository</a></p>
  
  <p>Thanks for you help in advance</p>
  
  <p>Best regards</p>
  
  <p>JSimas</p>