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
Post a Comment