8 Replies Latest reply on Apr 27, 2009 6:52 AM by Dan Allen

    Error deploying booking example from Seam 3.0

    Nikolay Elenkov Master

      I tried to deploy the booking example in JBoss 5.0.1.GA, but I get the following error:


      javax.servlet.ServletException: /home.xhtml @21,77 <h:link> Tag Library supports namespace: http://java.sun.com/jsf/html, but no tag was defined for name: link
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:323)
           org.jboss.webbeans.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:112)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      



      I've updated JSF using the jsf-upgrade-tool and WebBeans example work fine.
      Do I need to upgrade Facelets as well? If so, what version should I use?

        • 1. Re: Error deploying booking example from Seam 3.0
          Nikolay Elenkov Master

          Oh. <h:link> should probably be an s:link or a h:commandLink.
          h:commandLink doesn't work though:


          Search: This link is disabled as it is not nested within a JSF form. 
          



          And I still have to find out if s:link is supported...


          • 2. Re: Error deploying booking example from Seam 3.0
            Dan Allen Master

            Sorry, the software is bleeding on you ;) I am using an SVN snapshot of JSF 2 because the new bookmarkable components (h:link and h:button) are not currently in a JSF 2 release. The bookmarkable components are part of the Red Hat contribution to JSF 2 and thus we want to be able to highlight their usage. You can either disable the links in the example temporarily or grab the Mojarra trunk, build it, and deploy the JARs to your local repository.


            Here are the steps to build a snapshot of Mojarra and deploy to your local repository (you need to use a java.net account to check out):


            svn co https://mojarra.dev.java.net/svn/mojarra/trunk mojarra-trunk
            cd mojarra-trunk
            ant main
            mkdir -p ~/.m2/repository/javax/faces/jsf-api/2.0.0-PR2_1
            cp jsf-api/build/lib/jsf-api.jar ~/.m2/repository/javax/faces/jsf-api/2.0.0-PR2_1/jsf-api-2.0.0-PR2_1.jar
            mkdir -p ~/.m2/repository/javax/faces/jsf-impl/2.0.0-PR2_1
            cp jsf-api/build/lib/jsf-api.jar ~/.m2/repository/javax/faces/jsf-impl/2.0.0-PR2_1/jsf-impl-2.0.0-PR2_1.jar



            Sorry that kind of sucks. The deployment of Mojarra to Maven 2 is a lot on the rough side.


            I'm also finding that h:commandLink is not quite working correctly in Mojarra for some reason. I haven't dug into it yet.

            • 3. Re: Error deploying booking example from Seam 3.0
              Dan Allen Master

              We don't have s:link ported yet. Though theoretically if you drop the jboss-seam-ui.jar in the classpath, it just might run.

              • 4. Re: Error deploying booking example from Seam 3.0
                Dan Allen Master

                Oh, in your case, the problem is that an h:commandLink must always be inside of an h:form to work. The problem I am having is with h:commandLink in the SVN snapshot.

                • 5. Re: Error deploying booking example from Seam 3.0
                  Arbi Sookazian Master

                  i didn't know Seam 3 was available yet.  Where can we download (only SVN nightly??)

                  • 6. Re: Error deploying booking example from Seam 3.0
                    Dan Allen Master

                    It's not available as a download. You have to check out SVN. Even then, it is very rough. We are starting from one angle of creating examples that work against Web Beans and JSF 2 and then slowly trickling in some features from Seam 3 as they are ported. Shane is currently working on assembling the security module, but it looks like a construction zone right now, rightly so ;)

                    • 7. Re: Error deploying booking example from Seam 3.0
                      Nikolay Elenkov Master

                      Thanks. I got the JSF2 snapshot, updated JBoss to  Webbeans 1.0.0.PREVIEW1 and now I can search for hotels :)
                      Btw, you can use username guest and no password to check out JSF (for some reason didn't work with my
                      newly registered java.net account)


                      The last step should be (jsf-ri instead of jsf-api):


                      cp jsf-ri/build/lib/jsf-impl.jar ~/.m2/repository/javax/faces/jsf-impl/2.0.0-PR2_1/jsf-impl-2.0.0-PR2_1.jar



                      I also changed jsf-upgrade-tool/pom.xml to use 2.0.0-PR2_1 and ran it again to update JBoss.


                      As for exploded deployment, it would probably be better the build the seam-booking.ear dir in the
                      temporary directory and do a move afterwards. Otherwise one can get incomplete deployment errors.
                      Used to happen a lot in JBoss 4.2, might be addressed somehow in JBoss 5 though.






                      • 8. Re: Error deploying booking example from Seam 3.0
                        Dan Allen Master

                        Awesome! Good job on getting it working. I should have more functionality ready in the next couple of days...with even more cool JSF 2 goodies to play with.


                        As for copying to JBoss AS 5, yes, I am going to take a look at that to make sure I am copying in the right order. What I am hoping is that if I copy everything except what triggers the deployment first, then copy that magic piece last, it will all work. It is much cleaner than having to copy more than once. I have some nice updates to that antrun task that should smooth things out a bit more (I'm testing on JBoss AS 5).