title: How to save a word docx file using Apache poi. Change to saxon9he instead of saxon9pe
body: <p>I use the latest <strong>Apache POI 3.13-beta1 version.</strong> And I get an error like:</p>
  
  <pre><code>Exception in thread "main" org.apache.poi.openxml4j.exceptions.OpenXML4JRuntimeException: Fail to save: an error occurs while saving the package : null
  at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:507)
  at org.apache.poi.openxml4j.opc.OPCPackage.save(OPCPackage.java:1441)
  at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:202)
  Caused by: java.lang.NullPointerException
      at com.saxonica.config.Verifier.loadLicense(Verifier.java:141)
      at com.saxonica.config.ProfessionalConfiguration.loadLicense(ProfessionalConfiguration.java:391)
      at com.saxonica.config.ProfessionalConfiguration.isLicensedFeature(ProfessionalConfiguration.java:367)
      at net.sf.saxon.IdentityTransformer.transform(IdentityTransformer.java:36)
      at org.apache.poi.openxml4j.opc.StreamHelper.saveXmlInStream(StreamHelper.java:80)
      at org.apache.poi.openxml4j.opc.internal.marshallers.ZipPartMarshaller.marshallRelationshipPart(ZipPartMarshaller.java:174)
      at org.apache.poi.openxml4j.opc.ZipPackage.saveImpl(ZipPackage.java:468)
  </code></pre>
  
  <p>My code is very simply here:</p>
  
  <pre><code>String filePath = "d:\\doc\\file1.docx"
  try {
      FileInputStream fis = new FileInputStream(filePath);
      XWPFDocument xdoc = new XWPFDocument(OPCPackage.open(fis));
  
      System.out.println("here I can read my file and work on it");
  
      String filePathOut = filePath.replace("file", "file_result");
      xdoc.write(new FileOutputStream(new File(filePathOut)));
  } catch (FileNotFoundException e) {
      e.printStackTrace();
  } catch (IOException e) {
      e.printStackTrace();
  } catch (InvalidFormatException e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p>I want to do a replacement and save my file back.</p>
  
  <p><strong>EDIT 1.</strong>
  It looks like Apache poi works with our saxon9pe lib that requires a licence.
  Can I set something to avoid this saxon9pe in poi and use saxon9he? </p>
  
  <p>Thanks.</p>