commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver.He...@t-online.de (Oliver Heger)
Subject [configuration]Re: Stranger error when I parse XML file
Date Wed, 26 Nov 2003 09:11:03 GMT
Hm, this is really a bit strange.

Could you perhaps provide a full stack trace with the exception that 
occurs? It may be related to the class path of your servlet container. 
Is dom4j included?

Oli

Mai,Nguyen Huu wrote:

>Hi folks
>I am a new with configuration
>Right now, I have problem when loading XML file, 
>Below this my code
>
>            String testProperties = new File("webapps/mvnforum/Web-inf/classes/" + OPTION_FILE_NAME).getAbsolutePath();
>            DOM4JConfiguration conf = new DOM4JConfiguration();
>            conf.setFileName(testProperties);
>            conf.load();
>
>If I run this code in console, it works well (I must change the path to XML file, of course)
>but if I run this code in Servlet Container like Resin or Tomcat, I will receive an error
>
>"XML file has no top-element.  All well-formed XML files have a single top-level element.
Nested exception: file:/C:/resin-2.1.9:1: XML file has no top-element.  All well-formed XML
files have a single top-level element."
>
>And I am sure I check the syntax of XML file carefully and the path to XML file is OK
>Any body here get the same error like me.
>Please help me.
>Thanks iin advance
>
>-----------------------------------------------
>Nguyen Huu Mai
>Software Developer
>Email: mai.nh@myVietnam.net
>web site: www.myvietnam.net
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message