Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8235745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:54:59+00:00 2026-06-07T18:54:59+00:00

Spring Webflow: 2.3.1 Spring Data: 1.0.2 JSF: 2.1.9 Primefaces: 3.3.1 I’m trying to combine

  • 0

Spring Webflow: 2.3.1
Spring Data: 1.0.2
JSF: 2.1.9
Primefaces: 3.3.1

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.

The problem is when i use a JpaRepository inside LazyDataModel that lives in ViewScope of Spring Webflow:


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)”


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:

http://forum.springsource.org/showthread.php?116022-Webflow-Serialization-error-on-object-holding-ref-to-JPA-Data-Repository

Thanks for you help in advance

Best regards

JSimas

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T18:55:01+00:00Added an answer on June 7, 2026 at 6:55 pm

    Already found a solution for this problem!

    Whenever you need to add a reference to a Spring Data JPA Repository in an object that will live in your spring webflow context, just to declare the JPA repository as transient! Then you need to add the following annotations in the object that contain the transient reference:

    • @Configurable – to mark the class to be configured on the fly (this will add some overhead to your application, be careful to use this annotation only when you need)
    • @Autowired – add this to the transient JPA Repository

    So, if you’re extending a DataModel JSF base class, and you want to add some JPA repository, here is an example:

    @Configurable
    public class XptoLazyDataModel extends LazyDataModel<Xpto> {
    
        @Autowired
        private transient JpaRepository<Xpto> repository;
    
     (...)
    }
    

    And there you go. Hope that this can help someone.

    Best regards

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In our organization, we'd like to use JSF 2.0, Primefaces and Spring Webflow on
I am using JSF along with RichFaces and Spring Webflow. I am trying to
I'm having issues with the persistance of primefaces components in Spring Webflow. If the
I am preparing a registration page using JSF/Spring webflow&mvc application. I have added two
I'm developing a Spring webflow, trying to use TDD so I've extended AbstractXmlFlowExecutionTests. I
I'm using JSF2.0 with Spring Webflow 2.3 . I've been trying to get information
I am trying to @javax.naming.Inject a Spring 3 Bean called WtvrBean into a JSF
I`m developing an application using Spring WebFlow 2, Facelets and JSF. One of my
after adding spring webflow, jsf dependencies, i am getting the exception: java.lang.NoSuchMethodError: org.springframework.beans.MutablePropertyValues.add(Ljava/lang/String;Ljava/lang/Object;)Lorg/springframework/beans/MutablePropertyValues; any
I have a web application, that is build on spring webflow and jsf. Multiple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.