ICEfaces WAR and Woodstock WAR in one EAR in GF v2ur2 breaks  XML
Forum Index -> General Help
Author Message

Joined: 27/Jun/2008 00:00:00
Messages: 108

I'm doing a project that currently has a Woodstock WAR inside of my EAR. All is fine and dandy, and I want to put in a ICEfaces WAR now to implement a new set of functionality (we are deciding which framework to use, planning on implementing a full set of business features with each JSF framework).

For simplicitly, Ill refer to the enterprise app as EAR, and each war as Woodstock.WAR and ICEfaces.WAR.

What works:

EAR (common libs in root)
Woodstock.WAR (woodstock impl libs in WEB-INF/lib, sun-web.xml delegate="false")

EAR (common libs in root)
ICEfaces.WAR (icefaces impl libs in WEB-INF/lib, sun-web.xml delegate="false" OR delegate="true")

What doesnt work:

EAR (common libs in root)
Woodstock.WAR (impl libs in WEB-INF/lib, BROKEN IN THIS CONFIGURATION)
ICEfaces.WAR (impl libs in WEB-INF/lib, sun-web.xml delegate="false" OR delegate="true")

Despite changing the classloader delegate value for the ICEfaces.WAR, the Woodstock.WAR fails to function properly. Glassfish reports the EAR and both WARs as being deployed, and JSF 1.2 initialized for each web app context when deploying; but when visiting the Woodstock.WAR, the following exception is thrown:

[#|2008-06-27T22:37:20.312-0400|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=16;_ThreadName=httpSSLWorkerThread-6080-1;_RequestID=76a57f5d-3946-4030-92b9-0fdf1ca05865;|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:594)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:325)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:153)
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)

As you can see, the Woodstock.WAR is somehow attempting to use the ICEfaces Persistent Servlet impl classes. Interestingly, if I include both WARs inside the EAR, but comment out the application.xml module for the ICEfaces.WAR so it is not deployed, this Exception STILL occurs. If the ICEfaces.WAR is present in the EAR, it appears that its WEB-INF/lib is ALWAYS loaded and puts those impl classes somewhere early on the classpath causing issues with the Woodstock.WAR

Are there any suggestions, besides delegate="false" (which doesnt seem to work) for integrating both of these WARs into a single EAR?


Joined: 27/Jun/2008 00:00:00
Messages: 108

I have solved this issue, and now it seems obvious. Instead of using icefaces.jar, just-ice.jar must be used.

This can be used either as a shared lib in the EAR root, or in the WEB-INF/lib dir of the Web App. In either configuration, ICEfaces no longer conflicts with the default Sun JSF 1.2 RI classes and a WAR with any other core/3rd party jsf framework should be able to be used.
Forum Index -> General Help
Go to:   
Powered by JForum 2.1.7ice © JForum Team