You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Geoff Longo <gm...@gmail.com> on 2006/03/29 17:40:56 UTC

SaveState and Websphere 6

I am having what appears to be an issue with saveState not working on
Websphere 6.  My backing bean is request scoped and my jsf is saving
the state of the entire backing bean.  This works perfectly on Tomcat
5.5, but when I deploy to Websphere, things seem to fall apart. 
Currently, my backing bean holds a reference to a DataModel (not
serializable) that represents a table on my page.  When I try to
access this DataModel after the page is submitted, I get a null
pointer on Websphere, but Tomcat seems to have no problem.  Could this
be due to serialization differences between Websphere and Tomcat?

Any ideas?

Thanks,
Geoff

Re: SaveState and Websphere 6

Posted by Geoff Longo <gm...@gmail.com>.
Guess I should subscribe to the developers list as well :)

In any case, I have seen multiple posts on Websphere 6 and Myfaces,
but none of these (including the one you linked) looked the same as my
issue.  Maybe they are related, but my null pointer occurs in my
backing bean because the state of the list included on my bean was
never saved/restored.  At this point, I'm not sure if it is even
trying to save the state or not, although I can see the UISaveState
component in the component tree (thanks to Facelets). And if it is
failing, I'm not sure why there is no error/exception.

Thanks,
Geoff

On 3/29/06, Mike Kienenberger <mk...@gmail.com> wrote:
> On 3/29/06, Geoff Longo <gm...@gmail.com> wrote:
> > I am having what appears to be an issue with saveState not working on
> > Websphere 6.  My backing bean is request scoped and my jsf is saving
> > the state of the entire backing bean.  This works perfectly on Tomcat
> > 5.5, but when I deploy to Websphere, things seem to fall apart.
> > Currently, my backing bean holds a reference to a DataModel (not
> > serializable) that represents a table on my page.  When I try to
> > access this DataModel after the page is submitted, I get a null
> > pointer on Websphere, but Tomcat seems to have no problem.  Could this
> > be due to serialization differences between Websphere and Tomcat?
>
> See the following thread posted a couple hours earlier.
> Basically, there's another JSF implementation you need to remove.   I
> think there's also a ws.jar file (or something named like that) which
> also has to be removed.
>
> This question comes up a lot -- it'd be great if someone using
> WebSphere would add an entry to the wiki page on it.
>
> http://wiki.apache.org/myfaces/Installation_and_Configuration
>
>
> ---------- Forwarded message ----------
> From: sia far <si...@hotmail.com>
> Date: Mar 29, 2006 9:31 AM
> Subject: RE: websphere 6 and myfaces compatibility
> To: dev@myfaces.apache.org
>
>
> Websphere 6.0 loads IBM JSF jar files during the startup. You may need to
> remove them to avoid conflicts. Though I removed those jars and changing to
> Parent_Last, I was unable to run the sample apps on WAS6.0 fully. If this
> app is a production app, then good luck to you and let me know if you can
> make it work. If not, you may want to give it a break till things get more
> stable.
>
>
>
> >From: Mohamed Inelhaj <Mo...@netonomy.com>
> >Reply-To: "MyFaces Development" <de...@myfaces.apache.org>
> >To: "dev@myfaces.apache.org" <de...@myfaces.apache.org>
> >Subject: websphere 6 and myfaces compatibility
> >Date: Wed, 29 Mar 2006 14:30:48 +0200
> >
> >I am trying to migrate an application based on myfaces 1.1.0 from tomcat
> >to websphere 6 with no success.
> >
> >I get an nullPointerException
> >
> >
> >
> >[3/29/06 14:12:20:888 CEST] 00000049 ServletWrappe E   SRVE0068E: Could
> >not invoke the service() method on servlet Controller Servlet. Exception
> >thrown : java.lang.NullPointerException
> >
> >       at
> >javax.faces.component.UIComponentBase.processRestoreState(UIComponentBas
> >e.java:1032)
> >
> >       at
> >javax.faces.component.UIComponentBase.processRestoreState(UIComponentBas
> >e.java:1043)
> >
> >       at
> >javax.faces.component.UIComponentBase.processRestoreState(UIComponentBas
> >e.java:1043)
> >
> >       at
> >org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreComponentS
> >tate(JspStateManagerImpl.java:129)
> >
> >       at
> >org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspSt
> >ateManagerImpl.java:185)
> >
> >       at
> >org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspVie
> >wHandlerImpl.java:255)
> >
> >       at
> >org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.jav
> >a:113)
> >
> >       at
> >org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66
> >)
>

Re: SaveState and Websphere 6

Posted by Mike Kienenberger <mk...@gmail.com>.
On 3/29/06, Geoff Longo <gm...@gmail.com> wrote:
> I am having what appears to be an issue with saveState not working on
> Websphere 6.  My backing bean is request scoped and my jsf is saving
> the state of the entire backing bean.  This works perfectly on Tomcat
> 5.5, but when I deploy to Websphere, things seem to fall apart.
> Currently, my backing bean holds a reference to a DataModel (not
> serializable) that represents a table on my page.  When I try to
> access this DataModel after the page is submitted, I get a null
> pointer on Websphere, but Tomcat seems to have no problem.  Could this
> be due to serialization differences between Websphere and Tomcat?

See the following thread posted a couple hours earlier.
Basically, there's another JSF implementation you need to remove.   I
think there's also a ws.jar file (or something named like that) which
also has to be removed.

This question comes up a lot -- it'd be great if someone using
WebSphere would add an entry to the wiki page on it.

http://wiki.apache.org/myfaces/Installation_and_Configuration


---------- Forwarded message ----------
From: sia far <si...@hotmail.com>
Date: Mar 29, 2006 9:31 AM
Subject: RE: websphere 6 and myfaces compatibility
To: dev@myfaces.apache.org


Websphere 6.0 loads IBM JSF jar files during the startup. You may need to
remove them to avoid conflicts. Though I removed those jars and changing to
Parent_Last, I was unable to run the sample apps on WAS6.0 fully. If this
app is a production app, then good luck to you and let me know if you can
make it work. If not, you may want to give it a break till things get more
stable.



>From: Mohamed Inelhaj <Mo...@netonomy.com>
>Reply-To: "MyFaces Development" <de...@myfaces.apache.org>
>To: "dev@myfaces.apache.org" <de...@myfaces.apache.org>
>Subject: websphere 6 and myfaces compatibility
>Date: Wed, 29 Mar 2006 14:30:48 +0200
>
>I am trying to migrate an application based on myfaces 1.1.0 from tomcat
>to websphere 6 with no success.
>
>I get an nullPointerException
>
>
>
>[3/29/06 14:12:20:888 CEST] 00000049 ServletWrappe E   SRVE0068E: Could
>not invoke the service() method on servlet Controller Servlet. Exception
>thrown : java.lang.NullPointerException
>
>       at
>javax.faces.component.UIComponentBase.processRestoreState(UIComponentBas
>e.java:1032)
>
>       at
>javax.faces.component.UIComponentBase.processRestoreState(UIComponentBas
>e.java:1043)
>
>       at
>javax.faces.component.UIComponentBase.processRestoreState(UIComponentBas
>e.java:1043)
>
>       at
>org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreComponentS
>tate(JspStateManagerImpl.java:129)
>
>       at
>org.apache.myfaces.application.jsp.JspStateManagerImpl.restoreView(JspSt
>ateManagerImpl.java:185)
>
>       at
>org.apache.myfaces.application.jsp.JspViewHandlerImpl.restoreView(JspVie
>wHandlerImpl.java:255)
>
>       at
>org.apache.myfaces.lifecycle.LifecycleImpl.restoreView(LifecycleImpl.jav
>a:113)
>
>       at
>org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:66
>)