Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>(Sorry, this comment got out of hand!)</p> <p>What's your JRE? Also, can you paste your imports for this class? Fundamentally both IDEs run the bytecode on the same JVM so this sounds like a build-path issue to me (missing jar/alternate source). You should see an exception hit (though I'd subclass Throwable, not Exception in my catch). </p> <p><a href="http://docs.oracle.com/javase/7/docs/api/javax/xml/parsers/DocumentBuilder.html#parse(java.io.InputStream)" rel="nofollow">http://docs.oracle.com/javase/7/docs/api/javax/xml/parsers/DocumentBuilder.html#parse(java.io.InputStream)</a>. Check your input source for a null source. IllegalArgumentException should be printed on a null, followed (in</p> <p><strong>Looking at your code:</strong></p> <pre><code> try { HttpClient httpClient = new DefaultHttpClient(); HttpContext localContext = new BasicHttpContext(); HttpPost httpPost = new HttpPost(url); HttpResponse response = httpClient.execute(httpPost, localContext); InputStream in = response.getEntity().getContent(); DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); //**&lt;--What class is this?** Document doc = builder.parse(in); //if we step through to here, this line executes then goes directly to "x" below return doc; } catch (Exception e) { //&lt;-- Does not catch Error e.printStackTrace(); } return null; //x </code></pre> <p><strong>Try doing this:</strong></p> <pre><code>try { //Your code to read the document } catch (Throwable t) { t.printStackTrace(); //Check your output //Set your breakpoint HERE throw new RuntimeException(t.getMessage(), t); //Check the ExceptionHandler for the application. } </code></pre> <p>I'm suggesting your factory isn't the factory you think it is <strong>OR</strong> that you're getting an Error class and something outside your code is swallowing that exception. There's a good chance your build path is set up differently.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload