Hello all...newbie here,
I am using the NetBeans IDE 7.0.1 to create a Java Web Application. I have a method that gets an XML document from a Url string argument and parses it into a DOM document. This all works perfectly in my NetBeans IDE environment. But when I deploy the application to my GoDaddy host, it does not function and I am in desparate help from someone kind enough to provide me only with direction on where to look. It has something to do with the DocumentBuilder parse method but I don't know how to interpret the failure.

What is returned from validateResponse() is "Parse Failure..."

If parse threw an exception, would I expect to get "Parse Failure...responseDOM is null." returned?

I don't have the knowledge to explain what I think happened. It is unclear to me how execution went from db.parse to the last finally instead of to the first finally.

When I capture the requestUrl and copy and paste it into my browser, I get a nicely formatted XML document in return so I don't believe there is any garbage in so to speak.

What is more confusing is that this all works perfectly in my development environment using NetBeans. When I deploy it to GoDaddy, the above failure is generated instead. There is obviously a difference between servers but I'm not knowledgeable enough to know where to look or what to do about it. Can anyone suggest a more appropriate forum or website? I appreciate any assistance that can be provided to this C++ programmer struggling with his first Java application.

~Greybeard
Java Code:
    private String validateResponse(String requestUrl) throws RuntimeException {
        String resReturn = "Parse Failure.";
        
        try {
            try {
                    // Get the DOM Document
                DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                resReturn += ".";
                DocumentBuilder db = dbf.newDocumentBuilder();
                resReturn += ".";
                try {
                    try {
                        responseDOM = db.parse(requestUrl);
                    } catch (Exception e) {
                        throw new RuntimeException(e);
                    }
                } finally {
                    if(responseDOM == null) {
                        return resReturn + "responseDOM is null.";
                    } else {
                        resReturn = "The text content of the parsed DOM document is<br />" + responseDOM.getDocumentElement().getTextContent();
                    }
                }
                
            } catch (Exception e) {
                resReturn += "Exception in validateResponse" + e.getMessage();
            }
        } finally {
            return resReturn;
        }
    }