java - cvc-complex-type.2.4.a invalid content was found starting with element factory in faces-config.xml -


i have error in eclipse project, imported netbeans project, set maven , project facet dynamic web project ( cdi1.1, java 1.8, js 1.0, jsf 2.2, jax-rs 2.0, jboss maven integration 1.0 , jpa 2.1)

<?xml version='1.0' encoding='utf-8'?> <faces-config version="2.2"               xmlns="http://xmlns.jcp.org/xml/ns/javaee"               xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"               xsi:schemalocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">      <application>         <locale-config>             <default-locale>en</default-locale>             <supported-locale>fr</supported-locale>         </locale-config>         <resource-bundle>             <base-name>messages</base-name>             <var>messages</var>         </resource-bundle>            <factory>             <exception-handler-factory>org.omnifaces.exceptionhandler.fullajaxexceptionhandlerfactory</exception-handler-factory>          </factory>      </application> </faces-config> 

the answer in question, no node factory allowed under node application according xsd file http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd such xml file invalid.

the list of supported elements under application is:

  • action-listener
  • default-render-kit-id
  • message-bundle
  • navigation-handler
  • view-handler
  • state-manager
  • el-resolver
  • property-resolver
  • variable-resolver
  • resource-handler
  • resource-library-contracts
  • system-event-listener
  • locale-config
  • resource-bundle
  • application-extension
  • default-validators

according xsd file, node factory seems expected @ same level application directly under faces-config next:

<faces-config ...     <application>     ...     </application>      <factory>         <exception-handler-factory>org.omnifaces.exceptionhandler.fullajaxexceptionhandlerfactory</exception-handler-factory>      </factory> </faces-config> 

Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -