Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-4637

Seam does not work with JSF 2.0 faces-config.xml

    Details

      Description

      I am attempting to use JSF 2.0 in my Seam application for, among other benefits, composite components. I am able to upgrade the jsf-api.jar and jsf-impl.jar, remove jsf-facelets.jar and my application functions fine, however I am still running in JSF 1.2 mode due to this faces-config.xml:

      <faces-config version="1.2"
      xmlns="http://java.sun.com/xml/ns/javaee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd">

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

      According to thread comments from a Mojarra developer and the Release Notes for Mojarra 2, all thats needed is to remove the view-handler and reference v2.0 in faces-config.
      http://forums.java.net/jive/message.jspa?messageID=373539
      https://javaserverfaces.dev.java.net/nonav/rlnotes/2.0.1/releasenotes.html

      As soon as I do this though, I get the following exception when my application is deployed:

      2010-04-16 11:24:18,249 INFO [javax.enterprise.resource.webcontainer.jsf.config] (Thread-2) Unsanitized stacktrace from failed start...
      javax.faces.view.facelets.FaceletException: Must have a Constructor that takes in a ComponentConfig
      at com.sun.faces.facelets.tag.AbstractTagLibrary$UserComponentHandlerFactory.<init>(AbstractTagLibrary.java:289)
      ...
      Caused by: java.lang.NoSuchMethodException: org.jboss.seam.ui.handler.CommandButtonParameterComponentHandler.<init>(javax.faces.view.facelets.ComponentConfig)
      at java.lang.Class.getConstructor0(Class.java:2706)

      According to Dan Allen, Seam 2 and JSF 2 work together beautifully:

      http://seamframework.org/Documentation/DoesSeamWorkWithJSF2

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manaRH Marek Novotny
                  Reporter:
                  purecharger Ryan Nideffer
                • Votes:
                  21 Vote for this issue
                  Watchers:
                  25 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: