Skip to main content



      Home
Home » Language IDEs » Eclipse Web Tools Platform Project (WTP) » Java EE: web.xml Validation Error(How do I get rid of this error? Problems with web.xml validation in Eclipse for Java EE.)
Java EE: web.xml Validation Error [message #1840501] Fri, 16 April 2021 11:51 Go to next message
Eclipse UserFriend
Hello,

How do I get rid of this error?

I'm having an issue where Eclipse fails to validate the standard web.xml document for Java EE. It's weird, because just modifying the file and saving fixes the error. However restarting Eclipse brings back the issue.

EDIT: The web.xml document is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="4.0"
	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_4_0.xsd">
<!-- ... -->
</web-app>


On the <web-app ...> tag, I get the error : "There is '1' error in 'javaee_7.xsd'" There's also a warning on the URLs listed on xsi:schemaLocation:

"schema_reference.4: Failed to read schema document 'platform:/plugin/org.eclipse.xsd/cache/www.w3.org/
 2001/xml.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element 
 of the document is not <xsd:schema>."


Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)
Version: 2021-03 (4.19.0)
Build id: 20210312-0638
OS: Windows 10, v.10.0, x86_64 / win32
Java version: 15.0.2

Configuration Log attached. How do I get rid of this error? Any help is appreciated!

[Updated on: Sat, 17 April 2021 10:00] by Moderator

Re: Java EE: web.xml Validation Error [message #1840515 is a reply to message #1840501] Sat, 17 April 2021 00:57 Go to previous messageGo to next message
Eclipse UserFriend
Which error are you referring to?
Re: Java EE: web.xml Validation Error [message #1840520 is a reply to message #1840515] Sat, 17 April 2021 09:58 Go to previous messageGo to next message
Eclipse UserFriend
Sorry, I had to make the first post without any links, as the forum software doesn't allow new users to post links in their first post. I'm editing the OP with the details now.

EDIT: The web.xml document is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="4.0"
	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_4_0.xsd">
<!-- ... -->
</web-app>


On the <web-app ...> tag, I get the error : "There is '1' error in 'javaee_7.xsd'" There's also a warning on the URLs listed on xsi:schemaLocation:

"schema_reference.4: Failed to read schema document 'platform:/plugin/org.eclipse.xsd/cache/www.w3.org/
 2001/xml.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element 
 of the document is not <xsd:schema>."

[Updated on: Sat, 17 April 2021 10:00] by Moderator

Re: Java EE: web.xml Validation Error [message #1840523 is a reply to message #1840520] Sat, 17 April 2021 12:10 Go to previous messageGo to next message
Eclipse UserFriend
When you restart Eclipse and see the error anew, is it shown in the editor and the Problems View, and does
it disappear from the Problems view if you close the editor without saving?
Re: Java EE: web.xml Validation Error [message #1840530 is a reply to message #1840523] Sat, 17 April 2021 18:22 Go to previous messageGo to next message
Eclipse UserFriend
Nitin Dahyabhai wrote on Sat, 17 April 2021 16:10
When you restart Eclipse and see the error anew, is it shown in the editor and the Problems View, and does
it disappear from the Problems view if you close the editor without saving?

The error is shown in both the editor and the Problems view.
Yes, it does disappear from the Problems view if I close the editor without saving.
Re: Java EE: web.xml Validation Error [message #1840531 is a reply to message #1840530] Sat, 17 April 2021 19:18 Go to previous messageGo to next message
Eclipse UserFriend
That's indicative of it being related to the Wild Web Developer and Lemminx projects. You probably need to file
an issue at https://github.com/eclipse/lemminx and see what they say.
Re: Java EE: web.xml Validation Error [message #1847310 is a reply to message #1840531] Fri, 22 October 2021 06:43 Go to previous message
Eclipse UserFriend
I tried uninstall Wild Web Developer, the error keep ocurring. If you edit the faces-config.xml the error fades away. When restart the IDE, the error return.

To reproduce:
- install eclipse 2021-09 for javaee. Create web application, include jsf faces.

Previous Topic:Do I need Eclipse Web Developer Tools
Next Topic:War not correctly assembled from Maven project structure?
Goto Forum:
  


Current Time: Wed Aug 20 18:26:31 EDT 2025

Powered by FUDForum. Page generated in 0.05000 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top