2

I am getting the following error when trying to publish to my server. I have downloaded apache myfaces 2.0. I have also added these as a library in eclipse and added the project facet for JSF 2.0.

Caused by: org.apache.xmlbeans.XmlException: Invalid deployment descriptor: errors: jar:file:/C:/DOCUME~1/shawt/LOCALS~1/Temp/geronimo-deployer7810915779003395233.tmpdir/Scout.war!/WEB-INF/faces-config.xml:2:1: error: cvc-enumeration-valid: string value '2.0' is not a valid enumeration value for faces-config-versionType in namespace http://java.sun.com/xml/ns/javaee

Here is my faces-config:

<?xml version="1.0"?>
<faces-config 
    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/web-facesconfig_2_0.xsd"
    version="2.0"> 

    <navigation-rule>
        <from-view-id>menu.jsp</from-view-id>
        <navigation-case>
            <from-action>#{pageController.processPage1}</from-action>
            <from-outcome>success</from-outcome>
            <to-view-id>test.jsp</to-view-id>
        </navigation-case>
    </navigation-rule>

</faces-config>

Here is my web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns="http://java.sun.com/xml/ns/javaee" 
    xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
    id="WebApp_ID" version="2.5">

  <display-name>Scout</display-name>
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.jsp</url-pattern>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>

</web-app>
BalusC
  • 992,635
  • 352
  • 3,478
  • 3,452
shawsy
  • 427
  • 1
  • 6
  • 22
  • 3
    It's the Geronimo app server who jerked about this. Geronimo already ships with bundled JSF and yours appear to be of an older version which only ships with JSF 1.x. Server-bundled JSF API get precedence in classloading over the JSF libs in your webapp's `/WEB-INF/lib`. You basically need to configure/tell Geronimo not to load its bundled JSF libs. However I have no utter idea how to do it for that server as I've never used it. Related: http://stackoverflow.com/questions/5815623/jsf-2-issues-in-application-servers – BalusC Dec 01 '11 at 16:13
  • I think having a so-called "deployment plan" file (which is specific to Geronimo) should help: http://apache-geronimo.328035.n3.nabble.com/Geronimo-2-2-1-with-JSF-2-tp3111765p3119930.html – BalusC Dec 01 '11 at 16:45

0 Answers0