java.lang.IllegalStateException: Expecting one Styles document part, but found 0

GitHub | GoogleCodeExporter | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    POI ERROR: Expecting one Styles document part, but found 0

    GitHub | 1 year ago | GoogleCodeExporter
    java.lang.IllegalStateException: Expecting one Styles document part, but found 0

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Expecting one Styles document part, but found 0

      at org.apache.poi.xwpf.usermodel.XWPFDocument.getStyle()
    2. Apache POI
      XWPFDocument.getStyle
      1. org.apache.poi.xwpf.usermodel.XWPFDocument.getStyle(XWPFDocument.java:441)
      1 frame
    3. org.apache.poi
      AbstractXWPFConverter.convert
      1. org.apache.poi.xwpf.converter.core.styles.XWPFStylesDocument.<init>(XWPFStylesDocument.java:192)
      2. org.apache.poi.xwpf.converter.core.styles.XWPFStylesDocument.<init>(XWPFStylesDocument.java:186)
      3. org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.createStylesDocument(XWPFDocumentVisitor.java:161)
      4. org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.<init>(XWPFDocumentVisitor.java:154)
      5. org.apache.poi.xwpf.converter.pdf.internal.PdfMapper.<init>(PdfMapper.java:149)
      6. org.apache.poi.xwpf.converter.pdf.PdfConverter.doConvert(PdfConverter.java:54)
      7. org.apache.poi.xwpf.converter.pdf.PdfConverter.doConvert(PdfConverter.java:37)
      8. org.apache.poi.xwpf.converter.core.AbstractXWPFConverter.convert(AbstractXWPFConverter.java:45)
      8 frames
    4. poi38
      ooxmlToPDF.main
      1. poi38.ooxmlToPDF.createPDF(ooxmlToPDF.java:53)
      2. poi38.ooxmlToPDF.main(ooxmlToPDF.java:18)
      2 frames