• Register
0 votes

Problem :

Currently I am trying to learn the Apache Maven. I have tried to write below code in Eclipse but it is giving below error to me:

Error Message:

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

My Code :
<project xmlns="http://maven.apache.org/POM/4.0.0"



8 4 2
2,300 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

I have faced this error earlier and I fixed it using below procedure

In your eclipse IDE to avoid the below message

 "No grammar constraints (dtd or xml schema) detected for the document."

I added the xsd schema file to a xml catalog under below path

"Go to Window \ preferences \ xml \ xml catalog \ User specified entries".

Then you need to click on "Add" button on your right.

<?xml version="1.0" encoding="UTF-8"?>
<HolidayRequest xmlns="http://mycompany.com/hr/schemas">

From above xml I had generated and then saved the xsd under below location: /home/my_user/xsd/my_xsd.xsd

As Location: /home/my_user/xsd/my_xsd.xsd

As key type: Namespace name

As key: http://mycompany.com/hr/schemas

After doing above steps you can close and then reopen the xml file and do some changes to violate the schema, you should be notified

5 2 1
4,980 points

Related questions

0 votes
1 answer 193 views
Problem : I want to run the Eclipse JSF project on the Apache Tomcat on some other computer. I created the WAR file. But, when I try to deploy the WAR and open my Facelet page in Firefox, I usually face only the below error message: &ldquo;This XML file does not appear ... first time when I am trying to run the JSF app without my Eclipse. How is this issue popping up and how can I fix the issue?
asked Jan 3, 2020 alecxe 7.5k points
0 votes
1 answer 174 views
Problem : My blog feed showing me following error today: This page contains the following errors: error on line 2 at column 6: XML declaration allowed only at the start of the document Below is a rendering of the page up to the first error
asked Dec 6, 2019 alecxe 7.5k points
1 vote
1 answer 83 views
Problem: I am very new to Web.xml coding. Currently I am facing serious problem because of my web.xml file. If I try to run my Apache tomcat 8 server then every time it shows me below error: Server tomcat v8.0 server at localhost failed to start. in eclipse. If I ... . This error made my life like the hell. So I am looking for the help from web.xml expert who can help me in fixing my problem.
asked May 18, 2020 Martin K 6.6k points
0 votes
1 answer 9 views
I am beginner in SOAP request and response. We are running a project where our client has provided us their WSDL file. Specially they need an attribute which accepts multiple values.
asked Sep 28, 2020 Daniel Anderson 4k points
0 votes
1 answer 19 views
Problem: I have an XML file songs.xml as partially shown below: <?xml version="1.0" encoding="utf-8"?> <Event status="happened"> <Song title="Erase and rewind"> <Artist name="The Cardigans" ID="340900"> </Artist> <Info StartTime="22:22:13" JazlerID="8310" PlayListerID="" /> </Song> </Event> I need to parse such file and get all the fields like: Song Title: Artist: Start Time: ID:
asked Jan 10 Mashhoodch 5.7k points
0 votes
1 answer 9 views
I am trying to display xml data in html page applying JavaScript but some cases i am finding difficulty.
asked Sep 25, 2020 Daniel Anderson 4k points
0 votes
1 answer 7 views
Can anyone help me in some interview questions all related to XML thanks!!
asked Dec 10, 2020 Lucky Guy 930 points
0 votes
1 answer 501 views
Problem : I was hoping that someone may know how to resolve the below HTML5 validation error. When I try to validate my page it gives me a below error : Error Line 90, Column 63: An body start tag seen but an element of the same type was already open. <body class=" ... only find the one <body> (the one referenced by above error) and one </body>. Can anyone please tell me how to fix above error?
asked Jan 25, 2020 jwilliam 3.9k points
0 votes
2 answers 297 views
Problem : Facing following strange error the value of the for attribute of the label element must be the id of a non-hidden form control.
asked Nov 12, 2019 peterlaw 6.9k points
0 votes
1 answer 30 views
Problem: I am facing below error in my eclipse helios: "Exception occurred executing command line. Cannot run program "C:\Program Files (x86)\Java\jre6\bin\javaw.exe" (in directory "C:\Users\motiver\helios_workspace\TimeTracker"): CreateProcess error=206, The filename or ... database for the testing purposes. Everything worked fine on my Tomcat 7 but now it stopped working as I moved to JBoss 6.
asked Aug 5, 2020 Raphael Pacheco 4.9k points