title: net.sf.saxon.s9api.SaxonApiException: I/O error reported by XML parser processing null: null
body: <p>I have java code to transform xml using xslt but when I am running it getting below exception-</p>
  <pre><code>cationContext@1698c449: startup date [Tue Jun 30 15:10:33 IST 2020]; root of context hierarchy
  2020-06-30 15:10:36.441  INFO 23000 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
  Error
    I/O error reported by XML parser processing null: null
  javax.xml.transform.TransformerConfigurationException: net.sf.saxon.s9api.SaxonApiException: I/O error reported by XML parser processing null: null
          at net.sf.saxon.jaxp.SaxonTransformerFactory.newTemplates(SaxonTransformerFactory.java:152)
          at com.manh.xml2json.XsltTester.xmlToJsonUsingXslSaxon(XsltTester.java:116)
          at com.manh.xml2json.XsltTester.run(XsltTester.java:55)
          at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:723)
          at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:713)
          at org.springframework.boot.SpringApplication.afterRefresh(SpringApplication.java:703)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:304)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
          at org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
          at com.manh.xml2json.XsltTester.main(XsltTester.java:31)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
          at java.lang.reflect.Method.invoke(Unknown Source)
          at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
          at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
          at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
          at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
  Caused by: net.sf.saxon.s9api.SaxonApiException: I/O error reported by XML parser processing null: null
     
  </code></pre>
  <p><strong>Here is my java code-</strong></p>
  <pre><code>    private void xmlToJsonUsingXslSaxon(String xmlFileName, String xslFileName, String outFileName){
          Transformer transformer;
          Templates templates;
          try {
              templates = new net.sf.saxon.BasicTransformerFactory().newTemplates(
                      new StreamSource(XsltTester.class.getClassLoader()
                              .getResourceAsStream(xslFileName)));
              transformer = templates.newTransformer();
              transformer.transform(new StreamSource(new File(xmlFileName)), new StreamResult(new File(outFileName)));
  
  
          } catch (Exception e) {
              e.printStackTrace();
          }
      }
  
      
  }
  </code></pre>
  <p><strong><strong>Note -</strong>  I am running this java program by executing jar with below command-</strong></p>
  <pre><code> java -jar ./libs/xslt-tester-1.0-SNAPSHOT.jar --mode=xsl --infile=input.xml --outfile=output.json --xsl=./xslt/myxslt.xsl
  </code></pre>