Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The XMLReader goes through a series of steps to identify which drive to use. Quoting the docs</p> <ul> <li>If the system property org.xml.sax.driver has a value, that is used as an XMLReader class name. </li> <li>The JAR "Services API" is used to look for a class name in the META-INF/services/org.xml.sax.driver file in jarfiles available to the runtime. </li> <li>SAX parser distributions are strongly encouraged to provide a default XMLReader class name that will take effect only when previous options (on this list) are not successful. </li> <li>Finally, if ParserFactory.makeParser() can return a system default SAX1 parser, that parser is wrapped in a ParserAdapter. (This is a migration aid for SAX1 environments, where the org.xml.sax.parser system property will often be usable.)</li> </ul> <p>Looking at the code for the <a href="https://github.com/amazonwebservices/aws-sdk-for-java/blob/master/src/main/java/com/amazonaws/services/s3/model/transform/XmlResponsesSaxParser.java" rel="noreferrer">AWS SDK</a> ...</p> <pre><code>public XmlResponsesSaxParser() throws AmazonClientException { // Ensure we can load the XML Reader. try { xr = XMLReaderFactory.createXMLReader(); } catch (SAXException e) { // oops, lets try doing this (needed in 1.4) System.setProperty("org.xml.sax.driver", "org.apache.crimson.parser.XMLReaderImpl"); try { // Try once more... xr = XMLReaderFactory.createXMLReader(); } catch (SAXException e2) { throw new AmazonClientException("Couldn't initialize a sax driver for the XMLReader"); } } } </code></pre> <p>There are a couple of things I don't like about that code.</p> <ol> <li>The root cause of SaxException e is eaten up.</li> <li>The root cause of SaxException e2 is also eaten up. The least the code should do is print a warning mentioning the root cause.</li> <li>Using System.setProperty() inside level framework code can cause some hard to debug issues. </li> </ol> <p>These points make it harder to debug the issue. The best educated guess I can make is that the crimson parser is accessible in one class loading path but absent in the other. A conclusive way to find the problem would be to set a breakpoint on the code that tries to instantiate the reader and find what the underlying root cause is.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

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