Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Document root element is missing

 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can any expert give an answer?
 
Srinivasa Kadiyala
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Tim Holloway

Do you have any answer to my issue?
 
Saloon Keeper
Posts: 24875
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does your build.xml file have a <project> element at its root?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes build.xml has the <project> start and end tag.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Still the same problem.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 24875
174
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
And if '-v' doesn't show anything helpful, try '-d'.
 
reply
    Bookmark Topic Watch Topic
  • New Topic