Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Document root element is missing

 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I am running my build.xml file through MyEclipse 5.0, I am getting the following messge:
BUILD FAILED
C:\xyz\abc\build.xml:1: Document root element is missing.

Apprecaite some help.

FYI... Build is successful from command prompt.
Thanks in advance.
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can any expert give an answer?
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim Holloway

Do you have any answer to my issue?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18169
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does your build.xml file have a <project> element at its root?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Puthriah,
Please be patient. Remember that people helping are not here all time, or may be living in a different time zone than yours. And most of all, at the ranch Patience is a Virtue. Thank you
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Expanding on Tim's question, it sounds like your build.xml file is not a valid xml file. It has to have a single root tag (which in the case of an Ant build file has to be a project tag).
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes build.xml has the <project> start and end tag.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What happens if you use a build script that is empty besides the project tag?
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still the same problem.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Puthriah Sarma:
Still the same problem.


Can you post the *exact* content of the build.xml in this case?
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ilja Preuss

This text box is not accepting the HTML tags to paste here. I tried code as well as quote and it did not allow me. SO I am sending an e-mail to you with the build.xml file. Pl review and suggest. Regret for any inconvenience.

Thanks
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mhh, I was actually talking about the minimal build script, not the whole big one.

So I was thinking about something like



Was that the content you tried it with - and still got the same error?
[ July 12, 2007: Message edited by: Ilja Preuss ]
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried with and with out project tag. it is stilling giving me the smae error.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18169
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are 2 things that seem to give this message. One of them is a fundamental XML problem, which is what Ilja has been pursuing. The other one is uglier and one reason I've kept out of this - aside from waiting to see if maybe it was just a fundamental XML problem - is because I don't remember exactly how it worked.

I recall vaguely having a problem like this with either a sub-script or an AntCall or something that's essentially recursive. I also seem to recall that the defective file wasn't even the Ant script, it was some other XML file entirely.

Unfortunately, I can't remember anything useful.

However, since this is something that works from the command line but not in Eclipse, I recommend opening up Eclipse's Ant dialog and setting the '-v' command-line switch, then examining what Ant writes to the console. Maybe that will at least narrow things down.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And if '-v' doesn't show anything helpful, try '-d'.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic