2 Replies Last post: May 21, 2013 12:05 PM by Andrey Chuykov  
Andrey Chuykov Newbie 2 posts since
Jan 7, 2013
Currently Being Moderated

May 16, 2013 1:23 PM

IDEA Cannot resolve library

IDEA v.12.1.3.

I’ve got a maven dependency with some Faces tag library descriptor.

It contains something like:

<?xml version="1.0" encoding="UTF-8"?>

<facelet-taglib version="2.0" 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 http://java.sun.com/xml/ns/javaee/web-facelettaglibrary_2_0.xsd">





When the corresponding namespace (http://abc.com/core) is defined in my faces xhtml file, IDEA says: URI is not registered.





But it doesn’t complain about http://abc.com/b namespace which is defined in the same library in another descriptor file.


The only difference between these 2 descriptor files is <composite-library-name>, which is not in the second one.


When I open this "problem" descriptor file in my project, IDEA colors "abc/core" in red and says: Cannot resolve library. But if I create such project with these tag library descriptor files in IDEA, everything can be resolved and even I can navigate to this abc/core directory.


The question is, why this namespace which contains <composite-library-name> tag is considered to be not registered URI?

Mark Vedder Apprentice 1,076 posts since
Dec 10, 2003
Currently Being Moderated
May 17, 2013 8:35 PM in response to: Andrey Chuykov
Re: IDEA Cannot resolve library

That simply means IDEA does not yet know about the schema or DTD and is unable to automatically resolve its location. It's an easy fix. With your cursor on the error, open the quick fix popup (ALT+Enter). Select "Fetch External Resource". IDEA will attempt to download the needed schema or DTD. If is is successful, the red highlighting will go away and you will have syntax checking and code completion for the namespace. If IDEA is not able to fetch it, you will need to manually configure it. Open the quick fix popup again and select "Manually Setup External Resource". If the schema is in a project dependency, just select it on the "schemas " tab. If not, select the "Explorer" tab, then locate and select the schema from the file system.


You can also manual configure schemes in the settings: File > Settings > [Project Settings] schemas and DTDs

More Like This

  • Retrieving data ...