voyent
java.lang.IllegalStateException: ICEfaces requires the PersistentFacesServlet  XML
Forum Index -> Woodstock to ICEfaces Migration Go to Page: 1, 2, 3 Next 
Author Message
KevinVinsen

Joined: 29/Dec/2008 00:00:00
Messages: 5
Offline


I've got a woodstock project which I want to convert to IceFaces as Sun are EOLing Woodstock. I've downloaded the plugin for Netbeans 6.5 (ICEfaces-1.7.2-SP1b-NetBeans-6.5-modules) and installed it. I can create new IceFace projects very nicely and all should be sweetness and light.

Unfortunately when I follow the guide to convert the existing project to IceFaces I get the following error.

Caused by: java.lang.IllegalStateException: ICEfaces requires the PersistentFacesServlet. Please check your web.xml servlet mappings
at com.icesoft.faces.context.DOMResponseWriter.<init>(DOMResponseWriter.java:126)
at com.icesoft.faces.context.DOMContext.createTemporaryDOMResponseWriter(DOMContext.java:166)
at com.icesoft.faces.context.DOMContext.attachDOMContext(DOMContext.java:107)
at com.icesoft.faces.renderkit.dom_html_basic.TextRenderer.renderUIOutput(TextRenderer.java:89)
at com.icesoft.faces.renderkit.dom_html_basic.TextRenderer.renderEnd(TextRenderer.java:66)
at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeEnd(DomBasicRenderer.java:126)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:836)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:896)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:245)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:176)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:320)


The servlet definition is in Web.xml, the class files are in the jars; I've used Google to look for solutions - nothing helpful.

Anyone any ideas??

Thanks in advance
Kevin
frank.ye

Joined: 26/Oct/2004 00:00:00
Messages: 709
Offline


add Visual ICEfaces Framework to existing Woodstock Project should resolve this exception.

[Email]
KevinVinsen

Joined: 29/Dec/2008 00:00:00
Messages: 5
Offline


That's exactly what I did. Just like it says here:
http://facestutorials.icefaces.org/tutorial/woodstock/PortingGuidePart1.html

But it didn't work
KevinVinsen

Joined: 29/Dec/2008 00:00:00
Messages: 5
Offline


I even found some code that might be causing the problem:
http://sventon.icefaces.org/svn/showfile.svn?name=repo&revision=16977&path=/icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/context/DOMResponseWriter.java


105: public DOMResponseWriter(FacesContext context, DOMSerializer serializer, Configuration configuration, Collection jsCode, Collection cssCode) {
106: this.serializer = serializer;
107: this.configuration = configuration;
108: this.jsCode = jsCode;
109: this.cssCode = cssCode;
110: try {
111: this.context = (BridgeFacesContext) context;
112: } catch (ClassCastException e) {
113: throw new IllegalStateException(
114: "ICEfaces requires the PersistentFacesServlet. " +
115: "Please check your web.xml servlet mappings");
116: }
117: boolean streamWritingParam = configuration.getAttributeAsBoolean("streamWriting", false);
118: isStreamWritingFlag = Beans.isDesignTime() || streamWritingParam;
119: }

 
frank.ye

Joined: 26/Oct/2004 00:00:00
Messages: 709
Offline


not likely to cause exception in this tutorial,

Please try to download the zip file and unzip it, open in NB 6.5.
http://facestutorials.icefaces.org/tutorial/woodstock/TwoPageCrudTable_Part1.zip

also, are you using IcePage1.iface URL mapping?
[Email]
KevinVinsen

Joined: 29/Dec/2008 00:00:00
Messages: 5
Offline


Sorry - I didn't explain myself very well.

I'm using the tutorial as a guide to migrate my code. Literally all I did (so far) was tell netbean to add the Visual IceFaces stuff reset the welcome page to be my one - compile it and deploy it. When I try to access a page I get the exception

I haven't even got to the "fun" part.

The servlet mappings look good to me:
Code:
     <servlet-mapping>
         <servlet-name>Persistent Faces Servlet</servlet-name>
         <url-pattern>/xmlhttp/*</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
         <servlet-name>Persistent Faces Servlet</servlet-name>
         <url-pattern>*.iface</url-pattern>
     </servlet-mapping>
     <servlet-mapping>
         <servlet-name>Persistent Faces Servlet</servlet-name>
         <url-pattern>*.jspx</url-pattern>
     </servlet-mapping>
 
frank.ye

Joined: 26/Oct/2004 00:00:00
Messages: 709
Offline


From the error message, it seems that client URL in the browser might be the cause

During the migration,

the old pages need to go the following URL:
ie
http://localhost/application/faces/Page1.jsp

the new created icefaces pages within the project need to go the following URL:
ie
http://localhost/application/IcePage1.iface

Give it a try and let me know if this resolve the exception.

enjoy,
Frank
[Email]
KevinVinsen

Joined: 29/Dec/2008 00:00:00
Messages: 5
Offline


I haven't got to creating any IceFaces pages yet. I wanted to keep the existing stuff working until I can get the time to migrate it.
japaphr

Joined: 23/Dec/2008 00:00:00
Messages: 4
Offline


I'm having the same problem, Did someone solve it ?
Thanks ..
frank.ye

Joined: 26/Oct/2004 00:00:00
Messages: 709
Offline


add "Visual Web ICEfaces" framework to the existing Woodstock project will also create a new page possible named as IcePage.jsp.

the following URL should work:
http://localhost/application/IcePage1.iface

Let me if it failed.
Frank
[Email]
japaphr

Joined: 23/Dec/2008 00:00:00
Messages: 4
Offline


One thing, a page with Woodstock works with ICE faces components in the same page ? Or must be one or another ?

Thanks ..
frank.ye

Joined: 26/Oct/2004 00:00:00
Messages: 709
Offline


mixing components are not supported in 1,7,2 level. Migration is supported.

thanks
[Email]
johnsonericj

Joined: 14/Nov/2007 00:00:00
Messages: 1
Offline


Adding the IceFaces framework simply makes the woodstock pages to not work anymore. There is something wrong with the Icefaces migration library.
frank.ye

Joined: 26/Oct/2004 00:00:00
Messages: 709
Offline


Woodstock pages could still be viewed as
faces/Page1.jsp

If any problems, post a simple example.
[Email]
frank.ye

Joined: 26/Oct/2004 00:00:00
Messages: 709
Offline


From your libraries file sent over, the problems is that you create a project by selecting Woodstock and Visual Web ICEfaces Framework which is not supported.

Please use Visual Web ICEfaces Framework to add to the existing Woodstock Project.

You could create a Woodstock Visual Web Project first and add Visual Web ICEfaces Framework
[Email]
 
Forum Index -> Woodstock to ICEfaces Migration Go to Page: 1, 2, 3 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team