voyent
Compatibility problem: 1 Ear with 2 war, one uses Woodstock, one uses ICE  XML
Forum Index -> Woodstock to ICEfaces Migration
Author Message
roastedbanana

Joined: 10/Feb/2009 00:00:00
Messages: 25
Offline


Hi guys,

I have an EAR application with 2 war applications.

We developed the first one with Woodstock components under netbeans + glassifsh. It was working perfectly.

Second one, within the same ear was developed with ICE 1.7.2, works beautifully.

When we try to run the Woodstock one, we realize that we canĀ“t render h:components sucha as h:panelGrid or plain output text because apparently the ViewHandler tries to render them with an ICEfaces renderer and the ICEFAces servlet is not installed.

In this same ear some of the Woodstock JSF pages have no h:components or output text at all, ant they still get properly rendererd as they used to.

If we remove the ICEFaces war from the ear and we redepploy, again the old application works perfectly.

Basically, this is the stack trace we get:

Code:
StandardWrapperValve[Faces Servlet]: PWC1406: Servlet.service() for servlet Faces Servlet threw exception
 com.sun.rave.web.ui.appbase.ApplicationException: ICEfaces requires the PersistentFacesServlet. Please check your web.xml servlet mappings
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:537)
         at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:288)
         at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:151)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
         at com.sun.faces.extensions.avatar.lifecycle.PartialTraversalLifecycle.render(PartialTraversalLifecycle.java:106)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
         at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:267)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
         at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
         at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.executeServlet(CometEngine.java:547)
         at com.sun.enterprise.web.connector.grizzly.comet.CometEngine.handle(CometEngine.java:299)
         at com.sun.enterprise.web.connector.grizzly.comet.CometAsyncFilter.doFilter(CometAsyncFilter.java:87)
         at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters(DefaultAsyncExecutor.java:175)
         at com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt(DefaultAsyncExecutor.java:153)
         at com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask(AsyncProcessorTask.java:92)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
         at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
 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.GridRenderer.encodeBegin(GridRenderer.java:54)
         at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:884)
         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 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:283)
         ... 38 more
 


Aa you can see, at some point the ICE engine jumps in. To my knowledge there is no reason for it in this war appliction.

We never added Ice Libraries to the project, and there are no traces of Ice components in web.xml or faces-config.xml.

Thank you in advance.
Pablo.
frank.ye

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


The Exception is related to handling h: components with ICEfaces, using just-ice.jar will avoid the exception.

Is any reason that you need two wars in the same EAR?
[Email]
roastedbanana

Joined: 10/Feb/2009 00:00:00
Messages: 25
Offline


That woodstock based war giving trouble has no ICE libraries at all, do you mean using just-ice.jar on the ICE powered war?

At the moment the ICE powered jar has the followinf libraries (what I see in Netbeans Libraries under the project properties)

icefaces-jsf12-designtime-172 (unchecked)
icefaces-VWP-jsf12-runtime-support
icefaces-jsf12-backbeans & model
icefaces-jsf12-Runtime-Support

Each one with a bunch of jars that I guess you now...

Am I ment to replace all these for just-ice.jar in the war that is running ICE perfectly?

Is there anyway we could specify the woodstock jar to use the non ice rendere for h: components?

The only reason for having two wars is for modularity. One is the administration tool, the other one is the website itself. We like keeping it separate, but we could live with all in one I guess.

Thank you.
frank.ye

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


search for project.properties and project.xml and replace
icefaces-runtime-172
with
ws-icefaces-runtime-172

also,
url mapping as:
ICEfacesPage.iface
faces/WoodstockPage.jsp
[Email]
bleathem

Joined: 14/Jan/2009 00:00:00
Messages: 6
Offline


We also have an ear with two wars, one an icefaces war, the other a generic facelets war, and we get the same exception when we try to invoke the non-icefaces application:
Code:
 ICEfaces requires the PersistentFacesServlet. Please check your web.xml servlet mappings
 


Upon removing the icefaces war from the ear, the non-icefaces application works perfectly.

It seems as though the same servlet/class is trying to serve both war files. As far as I understand, each war is supposed to have it's own classloader, so this shouldn't be happening. Anyone have any ideas?

Thanks,
Brian Leathem
bleathem

Joined: 14/Jan/2009 00:00:00
Messages: 6
Offline


Following someone's advice in another thread, I replaced the icefaces.jar with just-ice.jar. This seems to have solved my problem, although at the cost of a much more complicated pom.xml (maven).

What's the reason for this? Why does the icefaces.jar cause the servelet to interfere with other wars in the same ear?
 
Forum Index -> Woodstock to ICEfaces Migration
Go to:   
Powered by JForum 2.1.7ice © JForum Team