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:

  1. Visual Designer works really good - as already known from Woodstock.
  2. Page Flow designer works.
  3. EJB 3 injection of Stateless and Stateful Session Beans into managed beans works.
  4. Deployment to Glassfish v2 works.
  5. Declarative Data Binding (Value Binding) between ICEFaces components and JavaBeans (JPA-entities) works.
  6. "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 :-).

Comments:

So the good web-xml is containing only:
<welcome-file>faces/Page1.iface</welcome-file>

or what?

Posted by Joe on January 05, 2009 at 02:09 PM CET #

Hi Joe,

I just deleted the welcome-file entry -
neither: <welcome-file>faces/Page1.iface</welcome-file>
nor <welcome-file>Page1.iface</welcome-file>
worked in my case...

regards,

adam

Posted by Adam Bien on January 05, 2009 at 02:35 PM CET #

Hi Adam,

This is fantastic. Could you please submit this to the NetBeans Community Docs wiki?

Thanks,

--James Branam
NetBeans Community Docs Manager

Posted by James Branam on January 20, 2009 at 04:02 PM CET #

Hi Adam,

for me, using Glassfish v3 prelude it doesn't work.
I've deleted the <welcome-file> section in web.xml and pointed the browser to the URL: http://localhost:8080/[WAR_NAME]/Page1.iface.

ERROR 500 on browser.
The following exception on Glassfish v3 log:

SEVERE: StandardWrapperValve[Persistent Faces Servlet]: PWC1406: Servlet.service() for servlet Persistent Faces Servlet threw exception
java.lang.UnsupportedOperationException
at javax.faces.context.FacesContext.setCurrentPhaseId(FacesContext.java:644)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:87)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:107)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at com.icesoft.faces.webapp.http.core.JsfLifecycleExecutor.apply(JsfLifecycleExecutor.java:17)
at com.icesoft.faces.context.View$2$1.respond(View.java:41)
at com.icesoft.faces.webapp.http.servlet.GlassFishAdaptingServlet$GlassFishRequestResponse.respondWith(GlassFishAdaptingServlet.java:159)
at com.icesoft.faces.context.View$2.serve(View.java:48)
at com.icesoft.faces.context.View.servePage(View.java:130)
at com.icesoft.faces.webapp.http.core.SingleViewServer.service(SingleViewServer.java:51)
at com.icesoft.faces.webapp.http.common.standard.PathDispatcherServer.service(PathDispatcherServer.java:24)
at com.icesoft.faces.webapp.http.servlet.MainSessionBoundServlet.service(MainSessionBoundServlet.java:160)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher$1.service(SessionDispatcher.java:38)
at com.icesoft.faces.webapp.http.servlet.GlassFishAdaptingServlet.service(GlassFishAdaptingServlet.java:60)
at com.icesoft.faces.webapp.http.servlet.EnvironmentAdaptingServlet.service(EnvironmentAdaptingServlet.java:63)
at com.icesoft.faces.webapp.http.servlet.SessionDispatcher.service(SessionDispatcher.java:55)
at com.icesoft.faces.webapp.http.servlet.PathDispatcher.service(PathDispatcher.java:23)
at com.icesoft.faces.webapp.http.servlet.MainServlet.service(MainServlet.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:431)
at org.apache.catalina.core.StandardWrapperValve.preInvoke(StandardWrapperValve.java:462)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:139)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:186)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:96)
at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:142)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:719)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:657)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:651)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1030)
at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:242)
at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:180)
at com.sun.grizzly.http.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:633)
at com.sun.grizzly.http.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:570)
at com.sun.grizzly.http.DefaultProcessorTask.process(DefaultProcessorTask.java:827)
at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:152)
at com.sun.enterprise.v3.services.impl.GlassfishProtocolChain.executeProtocolFilter(GlassfishProtocolChain.java:71)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:103)
at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:89)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:67)
at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:56)
at com.sun.grizzly.util.WorkerThreadImpl.processTask(WorkerThreadImpl.java:325)
at com.sun.grizzly.util.WorkerThreadImpl.run(WorkerThreadImpl.java:184)

Any idea?
Thanks in advance!

Antonio

Posted by Antonio on January 26, 2009 at 05:32 PM CET #

Hi Adam,

for me, using Glassfish v3 prelude it doesn't work.
I've deleted the <welcome-file> section in web.xml and pointed the browser to the URL: http://localhost:8080/[WAR_NAME]/Page1.iface.

ERROR 500 on browser.
The following exception on Glassfish v3 log:

SEVERE: StandardWrapperValve[Persistent Faces Servlet]: PWC1406: Servlet.service() for servlet Persistent Faces Servlet threw exception
java.lang.UnsupportedOperationException
at javax.faces.context.FacesContext.setCurrentPhaseId(FacesContext.java:644)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:87)
at ...

Any idea?
Thanks in advance!

Antonio

Posted by Antonio on January 26, 2009 at 05:33 PM CET #

Same problem. I did the following:

1. Create an index.html

<html>
<head>
<title>CypDIS</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Refresh" content="0; URL=Page1.iface">
</head>
<body>
</body>
</html>

2. Changed web.xml to the following

<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

It's more of a trick than a solution.

Posted by kostas on February 25, 2009 at 12:55 PM CET #

Another solution (like the one kostas did):

1. Create an index.jsp

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<jsp:forward page="welcomeJSF.iface" />

2. Modify web.xml:

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

Posted by sgermini on February 26, 2009 at 02:38 PM CET #

StandardWrapperValve[Persistent Faces Servlet]: PWC1406 meens that jar files are missing.

I belive you are missing the ice Faces jars or the sun impl.

Check out: http://facestutorials.icefaces.org/tutorial/easy-ajax-push.html
for ICE Faces. If you are using 1.8 you will need all listed jars too.

welcome-file-list works fine. Check the file prefix. (.faces etc.)

Paul

Posted by Paul on April 12, 2009 at 04:31 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments
License