MyFaces Tobago
  1. MyFaces Tobago
  2. TOBAGO-516

Unable to deploy Tobago sample application to JSF RI 1.2_05 RC3

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.11
    • Fix Version/s: 1.0.15, 1.5.0
    • Component/s: Demo
    • Labels:
      None
    • Environment:
      Ubuntu Feisty Fawn
      JDK 1.6.0_03
      JSF-RI 1.2_05 RC3

      Description

      When attempting to deploy the latest Tobago snapshot demo, I see the following error upon deployment:

      [#|2007-10-15T11:24:42.109-0700|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=16;_ThreadName=Timer-5;_RequestID=d4c3328a-551f-42df-a738-9d82f6217276;|WebModule[/tobago]PWC1275: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
      com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! Unable to parse document 'jndi:/server/tobago/WEB-INF/faces-config.xml': cvc-pattern-valid: Value '404' is not facet-valid with respect to pattern '#{.*}' for type 'faces-config-el-expressionType'.

      Looking at the faces-config.xml in question, the following navigation rule is specified:

      <navigation-rule>
      <from-view-id>/best-practice/error.jsp</from-view-id>
      <navigation-case>
      <from-action>404</from-action>
      <to-view-id>/best-practice/not-existing-page.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
      <from-action>syntax</from-action>
      <to-view-id>/best-practice/error-in-syntax.jsp</to-view-id>
      </navigation-case>
      </navigation-rule>

      The description of from-action:

      The "from-action" element contains an action reference expression
      that must have been executed (by the default ActionListener for handling
      application level events) in order to select this navigation rule.

      That having been said, this will probably work fine on JSF-RI 1.2_04 P02.
      1.2_05 change the config parsing to use schemas for all validation.
      1.2_05 includes a private 1.1 version of the schema. Any 1.x based faces-config
      files will be converted to refer to the private schema internally and then validated
      using a cached schema instance. This was done as it is very difficult to provide
      both schema and dtd validation without relying on implementation specific
      properties.

        Activity

        Hide
        Ryan Lubke added a comment -

        If you're running in a non-javaee environment, you need to enable validation of the faces-config files.

        Add context init param 'com.sun.faces.validateXml' with a value of true and redeploy the app.

        Show
        Ryan Lubke added a comment - If you're running in a non-javaee environment, you need to enable validation of the faces-config files. Add context init param 'com.sun.faces.validateXml' with a value of true and redeploy the app.
        Hide
        Bernd Bohmann added a comment -

        What is the difference between ConstantMethodBinding and ExpressionMethodBinding?
        Maybe the 1.2 schema requires a valid expression. The 1.1 version is not schema based.
        But I will change the faces-config.xml from-action to from-outcome

        Show
        Bernd Bohmann added a comment - What is the difference between ConstantMethodBinding and ExpressionMethodBinding? Maybe the 1.2 schema requires a valid expression. The 1.1 version is not schema based. But I will change the faces-config.xml from-action to from-outcome
        Hide
        Martin Marinschek added a comment -

        I would suspect it is - what Ryan is referring to is you should use <from-outcome/>, and not <from-action/> in this case.

        <from-action> should only be used with a method-binding relating to the action that is being executed!

        regards,

        Martin

        Show
        Martin Marinschek added a comment - I would suspect it is - what Ryan is referring to is you should use <from-outcome/>, and not <from-action/> in this case. <from-action> should only be used with a method-binding relating to the action that is being executed! regards, Martin
        Hide
        Bernd Bohmann added a comment -

        Is this bug valid?

        I can't reproduce the error with jetty 6.17 and jsf-ri 1.2.0_05 and jsf-ri 1.2.0_07.

        Show
        Bernd Bohmann added a comment - Is this bug valid? I can't reproduce the error with jetty 6.17 and jsf-ri 1.2.0_05 and jsf-ri 1.2.0_07.

          People

          • Assignee:
            Bernd Bohmann
            Reporter:
            Ryan Lubke
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development