Question

I am trying to troubleshoot an XML validation problem I am having with Eclipse.

When I try to validate the xml against a specified schema, I instantly get a

No grammar constraints (DTD or XML Schema) referenced in the document.

error. The XML schema I am trying to validate it against is located on a remote webserver. Some folk in my office are able to validate against it, whilst others are not. We are using the same xml.

I have noticed that when validation successfully occurs, Eclipse takes a few minutes, presumably because it's searching for the schema online. Alas, when it fails to validate on my machine, the failure is instant; it's as if Eclipse isn't even trying to search online.

I'm currently using Eclipse IDE JD (4.3 I think), Kepler release, but validation has been both successful and unsuccessful on Juno (3.8), again with the same xml. The machines that have successfully been able to validate were successful regardless of Eclipse version. Similarly, the machines that were not successful were so regardless of Eclipse version.

I'm completely lost.

Was it helpful?

Solution

I recently had this occur and was able to make the warning go away. It may be due to a corrupted network connection cache in Eclipse, since the solution was to clear the cache. To do so, go to Window... Properties... General... Network Connections... Cache, and click on the "Remove All" button. It may require a restart of Eclipse too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top