Netbeans 6.5 With Visual Ice Faces - Installation, Test, EJB 3 Integration, An Error And Solution 📎
The installation of icefaces is very smooth. You don't even have to restart Netbeans 6.5 (and this without OSGI :-)) . It takes few minutes / seconds - it depends on your bandwidth (9MB). IceFaces installation enhances the web-project type, so you will get two additional choices in the "Frameworks" tab: ICEFaces and Visual Web ICEFaces. The latter choice let you design your page visually with drag and drop vrom pallette etc. - very much like woodstock. The first choice is for source editor only. Don't select both frameworks - it will not work...
First impressions:
- Visual Designer works really good - as already known from Woodstock.
- Page Flow designer works.
- EJB 3 injection of Stateless and Stateful Session Beans into managed beans works.
- Deployment to Glassfish v2 works.
- Declarative Data Binding (Value Binding) between ICEFaces components and JavaBeans (JPA-entities) works.
- "Start Page" support doesn not work. It generates in the web.xml something like this:
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>faces/Page1.jsp</welcome-file>
</welcome-file-list>
This will cause an error in case you will try to "Run" the application.
java.lang.NullPointerException
at com.sun.faces.renderkit.RenderKitImpl.createResponseWriter(RenderKitImpl.java:169)
at com.icesoft.faces.renderkit.D2DRenderKit.createResponseWriter(D2DRenderKit.java:82)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:168)
at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:151)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:283)
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 javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
Solution: Just delete the section <welcome-file-list> and change the Page1.jsp into Page1.iface. The URL should looks like: http://localhost:8080/[WAR_NAME]/Page1.iface. If you want to "Run" your application, put the Page1.iface (or your actual welcome page) into the Relative URL box in the Properties (Run) of your project.
I lost about one hour for finding a solution for the problem above, so my overall impression is just good and not very good :-).