[jdom-interest] UnknownHostException with SAXBuilder
Daniel, Gillian
gillian.daniel at petrotechnics.com
Wed Feb 4 05:12:22 PST 2004
Hi there,
This is my first post to the JDOM mailing list, as up till now I have
experienced no problems using JDOM. However I have been using weblogic
5/8.1 up until now.
I am currently part of a team writing an application which reads in
configuration files which are in xml files. For development purposes we
are using Apache Tomcat 5.0.16, with Java Standard Edition 1.4.2.02 and
Java Enterprise Edition 1.4
When I call SAXBuilder.build on any of the configuration files, I get
this error
Exception: java.net.UnknownHostException: D
Now my file is on my D: drive, in a config folder, and the path to this
config folder is in a properties file. The file path is being read in
correctly, as I have added debug in to prove this. I can create a File
from this path and the configuration file name, but when I pass this
File into the SAXBuilder.build(myFile) get the UnknowHostException. I
know it falls over here, as I have debug following this line and this is
never output.
Here is my code:
File configFile = new File(thePath+buildFile);
System.out.println("BuildParsingServiceImpl.getRoot(): configFile " +
configFile.toString());
Document document = builder.build(configFile);
System.out.println("BuildParsingServiceImpl.getRoot(): Document Created:
");
The result of adding thePath + buildFile is
D:\dev\projects\SproV2\web\sentinelpro\WEB-INF\config\node.xml
I honestly have no idea what is wrong, I have tried making the File a
URL, I have tried adding file: in front of thePath, but still nothing.
Can somebody please indicate where I am going wrong?
Any help would be greatly appreciated, thank-you for taking the time to
read this,
Gillian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jdom.org/pipermail/jdom-interest/attachments/20040204/a3f26fe4/attachment.htm
More information about the jdom-interest
mailing list