Re: tomahawk t:saveState and HTTPSession
Hi Jacob, can you show the exception and specify your environment details (version of JSF, container...) 2012/3/8 jacobpan jacob.el...@gmail.com Hello, I have added tomahawk t:saveState into my JSF code having page scope set as request. After adding tomahawk t:saveState I am getting error with HTTPSession like I am getting error with the following line session = (HttpSession)context.getExternalContext().getSession(false); What could be the reason for this? Any help is highly appreciated. -- View this message in context: http://old.nabble.com/tomahawk-t%3AsaveState-and-HTTPSession-tp33465710p33465710.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: tomahawk t:saveState and HTTPSession
My JSF version 1.1 and I am running on Jdeveloper embedded OC4J 10.1.3 version. Exception pasted below. Caused by: java.lang.IllegalStateException at com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:421) at com.sun.faces.context.FacesContextImpl.getExternalContext(FacesContextImpl.java:136) at ManagedBean.getSelectItemsVehicleSuppliers(ManagedBean.java:828) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:99) 2012-03-08 19:02:59,556 ERROR (com.sun.faces.lifecycle.ProcessValidationsPhase;103) javax.faces.el.EvaluationException: Error getting property 'selectItemsVehicleSuppliers' from bean of type ManagedBean: java.lang.IllegalStateException javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'selectItemsSuppliers' from bean of type ManagedBean: java.lang.IllegalStateException at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190) at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143) at javax.faces.component.UISelectItems.getValue(UISelectItems.java:110) at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:116) -- View this message in context: http://old.nabble.com/tomahawk-t%3AsaveState-and-HTTPSession-tp33465710p33465970.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: tomahawk t:saveState and HTTPSession
So you are using JSF RI 1.1 - can you verify that your tomahawk library is compatible with JSF RI 1.1? Can you also verify that you have configured all extensions in right way in web.xml? Also why do you call external context in the getSelectItemsVehicleSuppliers ? 2012/3/8 jacobpan jacob.el...@gmail.com My JSF version 1.1 and I am running on Jdeveloper embedded OC4J 10.1.3 version. Exception pasted below. Caused by: java.lang.IllegalStateException at com.sun.faces.context.FacesContextImpl.assertNotReleased(FacesContextImpl.java:421) at com.sun.faces.context.FacesContextImpl.getExternalContext(FacesContextImpl.java:136) at ManagedBean.getSelectItemsVehicleSuppliers(ManagedBean.java:828) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sun.faces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:99) 2012-03-08 19:02:59,556 ERROR (com.sun.faces.lifecycle.ProcessValidationsPhase;103) javax.faces.el.EvaluationException: Error getting property 'selectItemsVehicleSuppliers' from bean of type ManagedBean: java.lang.IllegalStateException javax.faces.el.EvaluationException: javax.faces.el.EvaluationException: Error getting property 'selectItemsSuppliers' from bean of type ManagedBean: java.lang.IllegalStateException at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:190) at com.sun.faces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:143) at javax.faces.component.UISelectItems.getValue(UISelectItems.java:110) at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:116) -- View this message in context: http://old.nabble.com/tomahawk-t%3AsaveState-and-HTTPSession-tp33465710p33465970.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: tomahawk t:saveState and HTTPSession
External content is used to make the session available like the following: session = (HttpSession)context.getExternalContext().getSession(false); I have added all extensions in web.xml, copied from myfaces site. My web.xml is pasted below. My Tomahawk version is tomahawk-1.1.11 I guess it is compatible with JSF 1.1, correct me if I am wrong. Web.xml ?xml version = '1.0' encoding = 'windows-1252'? web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; descriptionEmpty web.xml file for Web Application/description filter filter-nameextensionsFilter/filter-name filter-class org.apache.myfaces.component.html.util.ExtensionsFilter/filter-class init-param descriptionSet the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB /description param-nameuploadMaxFileSize/param-name param-value100m/param-value /init-param init-param descriptionSet the threshold size - files below this limit are stored in memory, files above this limit are stored on disk. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB /description param-nameuploadThresholdSize/param-name param-value100k/param-value /init-param /filter filter-mapping filter-nameextensionsFilter/filter-name url-pattern*.jsf/url-pattern /filter-mapping filter-mapping filter-nameextensionsFilter/filter-name url-pattern/faces/*/url-pattern /filter-mapping filter-mapping filter-nameextensionsFilter/filter-name url-pattern/faces/myFacesExtensionResource/*/url-pattern /filter-mapping context-param param-nameorg.apache.myfaces.redirectTracker.POLICY/param-name param-valueorg.apache.myfaces.custom.redirectTracker.policy.FullRedirectTrackPolicy/param-value /context-param servlet servlet-nameFaces Servlet/servlet-name servlet-classjavax.faces.webapp.FacesServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet servlet-nameLogin/servlet-name servlet-classvms_proj.Login/servlet-class /servlet servlet-mapping servlet-nameFaces Servlet/servlet-name url-pattern/faces/*/url-pattern /servlet-mapping servlet-mapping servlet-nameLogin/servlet-name url-pattern/login/url-pattern /servlet-mapping session-config session-timeout35/session-timeout /session-config mime-mapping extensionhtml/extension mime-typetext/html/mime-type /mime-mapping mime-mapping extensiontxt/extension mime-typetext/plain/mime-type /mime-mapping welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list jsp-config/ /web-app -- View this message in context: http://old.nabble.com/tomahawk-t%3AsaveState-and-HTTPSession-tp33465710p33466274.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: tomahawk t:saveState and HTTPSession
Hi Jacob, I dont know if tomahawk is compatible with your version, even more - I dont know if this combination works fine in OC4J container which you are using - its something that you need to verify. Why do you need to get access to session in getter method? what are you looking for in session and what makes you think that saveState component is root cause of the issue? Thanks, Anton 2012/3/8 jacobpan jacob.el...@gmail.com External content is used to make the session available like the following: session = (HttpSession)context.getExternalContext().getSession(false); I have added all extensions in web.xml, copied from myfaces site. My web.xml is pasted below. My Tomahawk version is tomahawk-1.1.11 I guess it is compatible with JSF 1.1, correct me if I am wrong. Web.xml ?xml version = '1.0' encoding = 'windows-1252'? web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; descriptionEmpty web.xml file for Web Application/description filter filter-nameextensionsFilter/filter-name filter-class org.apache.myfaces.component.html.util.ExtensionsFilter/filter-class init-param descriptionSet the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB /description param-nameuploadMaxFileSize/param-name param-value100m/param-value /init-param init-param descriptionSet the threshold size - files below this limit are stored in memory, files above this limit are stored on disk. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB /description param-nameuploadThresholdSize/param-name param-value100k/param-value /init-param /filter filter-mapping filter-nameextensionsFilter/filter-name url-pattern*.jsf/url-pattern /filter-mapping filter-mapping filter-nameextensionsFilter/filter-name url-pattern/faces/*/url-pattern /filter-mapping filter-mapping filter-nameextensionsFilter/filter-name url-pattern/faces/myFacesExtensionResource/*/url-pattern /filter-mapping context-param param-nameorg.apache.myfaces.redirectTracker.POLICY/param-name param-valueorg.apache.myfaces.custom.redirectTracker.policy.FullRedirectTrackPolicy/param-value /context-param servlet servlet-nameFaces Servlet/servlet-name servlet-classjavax.faces.webapp.FacesServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet servlet-nameLogin/servlet-name servlet-classvms_proj.Login/servlet-class /servlet servlet-mapping servlet-nameFaces Servlet/servlet-name url-pattern/faces/*/url-pattern /servlet-mapping servlet-mapping servlet-nameLogin/servlet-name url-pattern/login/url-pattern /servlet-mapping session-config session-timeout35/session-timeout /session-config mime-mapping extensionhtml/extension mime-typetext/html/mime-type /mime-mapping mime-mapping extensiontxt/extension mime-typetext/plain/mime-type /mime-mapping welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list jsp-config/ /web-app -- View this message in context: http://old.nabble.com/tomahawk-t%3AsaveState-and-HTTPSession-tp33465710p33466274.html Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: tomahawk t:saveState and HTTPSession
Hi The report doesn't sounds like something related to tomahawk t:saveState. Are you invalidating the session (logout or something like that)? If the session is invalidated and then it is manipulated, an IllegalStateException could happen. In that case, a redirect could solve the problem. regards, Leonardo Uribe 2012/3/8 Anton Gavazuk antongava...@gmail.com: Hi Jacob, I dont know if tomahawk is compatible with your version, even more - I dont know if this combination works fine in OC4J container which you are using - its something that you need to verify. Why do you need to get access to session in getter method? what are you looking for in session and what makes you think that saveState component is root cause of the issue? Thanks, Anton 2012/3/8 jacobpan jacob.el...@gmail.com External content is used to make the session available like the following: session = (HttpSession)context.getExternalContext().getSession(false); I have added all extensions in web.xml, copied from myfaces site. My web.xml is pasted below. My Tomahawk version is tomahawk-1.1.11 I guess it is compatible with JSF 1.1, correct me if I am wrong. Web.xml ?xml version = '1.0' encoding = 'windows-1252'? web-app xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; descriptionEmpty web.xml file for Web Application/description filter filter-nameextensionsFilter/filter-name filter-class org.apache.myfaces.component.html.util.ExtensionsFilter/filter-class init-param descriptionSet the size limit for uploaded files. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB /description param-nameuploadMaxFileSize/param-name param-value100m/param-value /init-param init-param descriptionSet the threshold size - files below this limit are stored in memory, files above this limit are stored on disk. Format: 10 - 10 bytes 10k - 10 KB 10m - 10 MB 1g - 1 GB /description param-nameuploadThresholdSize/param-name param-value100k/param-value /init-param /filter filter-mapping filter-nameextensionsFilter/filter-name url-pattern*.jsf/url-pattern /filter-mapping filter-mapping filter-nameextensionsFilter/filter-name url-pattern/faces/*/url-pattern /filter-mapping filter-mapping filter-nameextensionsFilter/filter-name url-pattern/faces/myFacesExtensionResource/*/url-pattern /filter-mapping context-param param-nameorg.apache.myfaces.redirectTracker.POLICY/param-name param-valueorg.apache.myfaces.custom.redirectTracker.policy.FullRedirectTrackPolicy/param-value /context-param servlet servlet-nameFaces Servlet/servlet-name servlet-classjavax.faces.webapp.FacesServlet/servlet-class load-on-startup1/load-on-startup /servlet servlet servlet-nameLogin/servlet-name servlet-classvms_proj.Login/servlet-class /servlet servlet-mapping servlet-nameFaces Servlet/servlet-name url-pattern/faces/*/url-pattern /servlet-mapping servlet-mapping servlet-nameLogin/servlet-name url-pattern/login/url-pattern /servlet-mapping session-config session-timeout35/session-timeout /session-config mime-mapping extensionhtml/extension mime-typetext/html/mime-type /mime-mapping mime-mapping extensiontxt/extension mime-typetext/plain/mime-type /mime-mapping welcome-file-list welcome-fileindex.html/welcome-file /welcome-file-list jsp-config/ /web-app -- View this message in context: http://old.nabble.com/tomahawk-t%3AsaveState-and-HTTPSession-tp33465710p33466274.html Sent from the MyFaces - Users mailing list archive at Nabble.com.