I got the error: "java.net.ConnectException: Connection refused: connect"
What I was trying to do was validate an blahContext.xml file with a parser, but the problem comes when the parser tries to go out and validate the doctype dtd link.
The following code produces the error mentioned at the top. The failure happens when the parser goes out to validate the dtd link.
It works if you uncomment the commented lines where I overload the resolver to not do anything on link resolving. Bonus: it validates the other XML entities in the document.
Used these includes: