0

I am in the process of updating the JSF implementation of our project from JSF 1.1 to JSF 2.2. I mainly use Migrating from JSF 1.2 to JSF 2.0 as a guide.

When updating the root element of the faces-config.xml according to JSF 2.2 faces-config: Unknown Schema version: 2.2 to

<faces-config 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"
    version="2.2">

my IDE - IntelliJ - marks the default XML namespace xmlns="http://xmlns.jcp.org/xml/ns/javaee" red and when hovering over it gives me the error message:

URI is not registered

enter image description here

http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd also gets marked as erroneous, showing the following error message when hovering over it:

Cannot resolve symbol 'http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd'

enter image description here

I use MyFaces 2.2.12 as JSF implementation and IntelliJ IDEA Community 2017.1 as IDE. (I am aware that the CE of IntelliJ does not feature the same level of JSF support as the Ultimate Edition, but this is not really a JSF problem, but rather a XML problem, isn't it?)

Can anyone tell me what I need to change to make IntelliJ recognize the xmlns-URI?

Edit:

I tried to "Manually setup external resource" like described in JSF xmlns URI not registered in IntelliJ IDEA, but if I do this for web-facesconfig_2_2.xsd, every element in faces-config.xml gets marked with an error. When I hover over the marked elements I get the following error message:

enter image description here

Community
  • 1
  • 1
scholt
  • 147
  • 2
  • 16
  • MyFaces 2.2.what? 2.2.0? 2.2.666? – Kukeltje Apr 18 '17 at 14:00
  • It's MyFaces 2.2.12 (edited in question) – scholt Apr 18 '17 at 14:52
  • I get a similar namespace URI error for the `tomahawk` and `htmLib` tag libraries: http://stackoverflow.com/questions/43477393/how-to-use-taglibrary-htmlib-from-jsftutorials-net-with-jsf2-2 Could this be related? – scholt Apr 19 '17 at 14:22

0 Answers0