Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing schema definitions in IntelliJ

Having updated to IntelliJ 14.0.3 Community Edition I am working on a new web project, but suddenly IntelliJ does not find the most basic schema definitions anymore. Here are examples: http://i.stack.imgur.com/FVYld.png and http://i.stack.imgur.com/SboLZ.png.

I have tried to 'Fetch External Resource', but with no success.

Using this approach "JSF xmlns URI not registered in IntelliJ IDEA" I imported web-facelettaglibrary_2_2.xsd, but the auto competition had errors and was useless.

I try to get this to work for weeks now and get 'URI is not registered' and 'Cannot resolve symbol' errors all over the place. How IntelliJ can be unaware of these URIs is completely beyond me.

Can someone please help me get my beloved auto competition up and running again?

Update:

I finally got the web-app schema working by adding web-app_3_1.xsd and every file it references and their references as well, namely:

  • javaee_7.xsd
  • javaee_web_services_client_1_4.xsd
  • jsp_2_3.xsd
  • web-app_3_1.xsd
  • web-common_3_1.xsd.

All from here: hxxp://www.oracle.com/webfolder/technetwork/jsc/xml/ns/javaee/index.html

like image 630
Johannes Avatar asked Sep 29 '22 20:09

Johannes


1 Answers

I have tried the same (with the firewall blocking all IntelliJ's external connections) and this worked for me:

web.xml

<web-app 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-app_3_1.xsd" version="3.1"></web-app>

pom.xml

    <dependency>
        <groupId>javax</groupId>
        <artifactId>javaee-api</artifactId>
        <version>7.0</version>
    </dependency>

From Java EE Schemas download the definition web-app_3_1.xsd. In IntelliJ manually add an external resource and select the file you just downloaded. You can also see it under Settings > Languages & Frameworks > Schemas and DTDs in the list of external schemas.

like image 65
kol Avatar answered Oct 03 '22 03:10

kol