4 Replies Latest reply: Jul 25, 2007 11:38 AM by Noah White RSS

Help with examples

Noah White Newbie

I'm new to Seam and I am working through the examples. I have the booking demo working in my environment:

J2EE5 SDK w/GlassFish

I tried to get the remoting progressbar example working in this environment using the jee5/booking example for glassfish as my reference point for configuration and required jars. However, the best I have gotten is to render the page sans button so it appears to me that the tags <h:> etc in progressbar.xhtml are not being processed. This leads me to believe its a faces configuration issue but I'm stumped because things like pretty much as they do in that regard to the working jee5 example I have. Any thoughts on where to poke further?

TIA

  • 1. Re: Help with examples
    Noah White Newbie

    I should have noted that these are the examples included in the 2.0.0-Beta1 SEAM package.

  • 2. Re: Help with examples
    Noah White Newbie

    I noticed the faces-config.xml file was empty so following the documentation I added


    <application>
     <el-resolver>org.jboss.seam.jsf.SeamELResolver</el-resolver>
    </application>
    
    <lifecycle>
     <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
    </lifecycle>
    


    It appears that the phase listener is triggering the following error on deployment:

    [#|2007-07-25T10:59:18.543-0500|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=10;_ThreadName=main;_RequestID=10ab338e-4d03-4968-8a3d-a2f2e9974bb3;|WebModule[/seam-progressbar]PWC1275: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
    javax.faces.FacesException: java.lang.UnsupportedOperationException
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:408)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4493)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:5150)


    Caused by: java.lang.UnsupportedOperationException
    at com.sun.faces.config.ConfigureListener$InitFacesContext.getViewRoot(ConfigureListener.java:1690)
    at com.sun.faces.util.MessageFactory.getMessage(MessageFactory.java:113)
    at com.sun.faces.util.MessageUtils.getExceptionMessageString(MessageUtils.java:277)
    at com.sun.faces.util.Util.createInstance(Util.java:477)
    at com.sun.faces.util.Util.createInstance(Util.java:436)
    at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:617)
    at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:503)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:402)

    Thoughts? TIA


  • 3. Re: Help with examples
    Michael Yuan Novice

    No, read the seam2migration.txt file. It says you do not need those elements.

    We have not updated the official docs for Seam2.

  • 4. Re: Help with examples
    Noah White Newbie

    Thanks! That was the bread crumb I needed. It's working now once I changed the faces-config.xml to contain the following:

     <application>
     <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
     </application>