I have a problem - when I try to parse an XML file using DocumentBuilder.parse(file) whilst NOT connected to the internet I get the following exception
java.net.UnknownHostException: java.sun.com
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2870)
at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1167)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:185)
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:197)
at com.assethouse.tools.doclets.ejb.EJBDeploymentDescriptorDoclet.replaceNode(Unknown Source)
I guess the DocumentBuilder is trying to look up the DTD - I can solve this by referencing the DTD from the file system but this means users have to download the DTD - not very elligant. Is there a way to stop the DocumentBuilder form trying to look up the DTD or do the validation part. So I can avoid this exception id the user doesn't have an internet connection
Cheers.
Matt
_________________________________________________________________
Find a cheaper internet access deal - choose one to suit you. http://www.msn.co.uk/internetaccess
--------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]