Description Resource Path Location Type
No grammar constraints (DTD or XML schema) detected for the document. TEST-net.kindleit.gae.example.server.MessageRepositoryTest.xml /projecttest-gae-example/target/surefire-reports line 1 XML Problem
No grammar constraints (DTD or XML schema) detected for the document. appengine-web.xml /projecttest-gae-example/src/main/webapp/WEB-INF line 1 XML Problem
No grammar constraints (DTD or XML schema) detected for the document. appengine-web.xml /projecttest-gae-example/target/projecttest-gae-example-1.0-SNAPSHOT/WEB-INF line 1 XML Problem
No grammar constraints (DTD or XML schema) detected for the document. datastore-indexes-auto.xml /projecttest-gae-example/WEB-INF/appengine-generated line 1 XML Problem
No grammar constraints (DTD or XML schema) detected for the document. jdoconfig.xml /projecttest-gae-example/src/main/resources/META-INF line 1 XML Problem
No grammar constraints (DTD or XML schema) detected for the document. jdoconfig.xml /projecttest-gae-example/target/projecttest-gae-example-1.0-SNAPSHOT/WEB-INF/classes/META-INF line 1 XML Problem
No grammar constraints (DTD or XML schema) detected for the document. webapp-cache.xml /projecttest-gae-example/target/war/work line 1 XML Problem
how to fix the above problem on eclipse? my project is maven based. Is it because I miss out some dtd files? how to include it?
example jdoconfig.xml
<?xml version="1.0" encoding="utf-8"?>
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig">
<persistence-manager-factory name="transactions-optional">
<property name="javax.jdo.PersistenceManagerFactoryClass"
value="org.datanucleus.store.appengine.jdo.DatastoreJDOPersistenceManagerFactory"/>
<property name="javax.jdo.option.ConnectionURL" value="appengine"/>
<property name="javax.jdo.option.NontransactionalRead" value="true"/>
<property name="javax.jdo.option.NontransactionalWrite" value="true"/>
<property name="javax.jdo.option.RetainValues" value="true"/>
<property name="datanucleus.appengine.autoCreateDatastoreTxns" value="true"/>
</persistence-manager-factory>
</jdoconfig>
DTD mainly checks the grammar and validity of a XML document. It checks that a XML document has a valid structure or not. 2. XML Schema Definition (XSD) : XSD stands for XML Schema Definition and it is a way to describe the structure of a XML document.
Eclipse XSD™ is a library that provides an API for manipulating the components of an XML Schema as described by the W3C XML Schema specifications, as well as an API for manipulating the DOM-accessible representation of XML.
Initial answer (Dec. 2009)
If you have WTP (with the XML part included):
Preferences->Validation->XML Validator-> unclick manual and/or build should prevent eclipse checking the DTD
Or:
From the Preference page, choose XML > XML Files. Under the section "Validating files" you can change the severity in the drop down from Warning to Ignore. Just note that this is for all XML files, not just
build.xml
. But you can just addbuild.xml
to the exclude filter if you would still like this warning for other XML files.
Update (Feb. 2012)
Someone made in the comments (now deleted) the valid point that you should Never ignore warnings.
But Fix them!
When ask how, he goes on (emphasis mine):
I'd fix Eclipse because this is clearly a sign of bad design.
For example I might report a bug to Eclipse Foundation bug tracker.
Eclipse needs to add "sane" defaults for Spring/Java EE project files that are "known" to have no need of XML grammars.
Either something is wrong with the file or Eclipse is broken somewhere.
Three problems I had:
- with
Log4j.xml
file, saying it cannot find the XML definition forlog4j.dtd
although the file is in the system path where the Validator looks- Ant
build.xml
file says I have no grammar constraints- for some reason I can't clean the project.
There are actually bugs discussing strategies/bugs around those warning:
Obviously, more fixes are required regarding the management of those warnings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With