You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Jeff Bischoff <jb...@klkurz.com> on 2006/09/22 23:05:54 UTC

Omit component from serializeView()?

I have a 3rd-party JSF component on one of my pages. When the page is 
redisplayed, JSF tries to serialze the view. But, it throws an exception 
because the component has a class that prevents it from being 
serialized. Can I tell JSF not to serialize this component?

I am using server-side state saving.

The exception is like this:

2006-09-22 16:57:45,849 ERROR 
[org.apache.myfaces.application.jsp.JspStateManagerImpl] Exiting 
deserializeView - Could not deserialize state: 
com.crystaldecisions.reports.reportengineinterface.JPEReportSource; no 
valid constructor
java.io.InvalidClassException: 
com.crystaldecisions.reports.reportengineinterface.JPEReportSource; no 
valid constructor

Regards,

Jeff Bischoff
Kenneth L Kurz & Associates, Inc.



Re: Omit component from serializeView()?

Posted by Martin Marinschek <ma...@gmail.com>.
Hi Jeff,

this is most probably a problem with
com.crystaldecisions.reports.reportengineinterface.JPEReportSource not
implementing the StateHolder - interface properly.

It would need to have a line "implements StateHolder" and the two
methods "restoreState" and "saveSate" available, plus a public no-args
constructor. This is a requirement as of the Spec.

There is no way to exclude one component from the state-saving
process. except for setting the "transient"-attribute on the
component, if something like this exists on this special one.

regards,

Martin

On 9/22/06, Jeff Bischoff <jb...@klkurz.com> wrote:
> I have a 3rd-party JSF component on one of my pages. When the page is
> redisplayed, JSF tries to serialze the view. But, it throws an exception
> because the component has a class that prevents it from being
> serialized. Can I tell JSF not to serialize this component?
>
> I am using server-side state saving.
>
> The exception is like this:
>
> 2006-09-22 16:57:45,849 ERROR
> [org.apache.myfaces.application.jsp.JspStateManagerImpl] Exiting
> deserializeView - Could not deserialize state:
> com.crystaldecisions.reports.reportengineinterface.JPEReportSource; no
> valid constructor
> java.io.InvalidClassException:
> com.crystaldecisions.reports.reportengineinterface.JPEReportSource; no
> valid constructor
>
> Regards,
>
> Jeff Bischoff
> Kenneth L Kurz & Associates, Inc.
>
>
>


-- 

http://www.irian.at

Your JSF powerhouse -
JSF Consulting, Development and
Courses in English and German

Professional Support for Apache MyFaces