You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Marco Lechner - FOSSGIS e.V." <ma...@fossgis.de> on 2018/02/11 07:39:36 UTC
upgrade from 3.16 to 3.17 fails with cannot access
org.apache.poi.wp.usermodel.Paragraph
Hi,
when I try to upgrade to 3.17 from 3.16, I get the following error:
cannot access org.apache.poi.wp.usermodel.Paragraph
[ERROR] class file for org.apache.poi.wp.usermodel.Paragraph not found
To extract the Paragraphs of a TableCell it works in 3.16 with
import org.apache.poi.xwpf.usermodel.XWPFParagraph;
import org.apache.poi.xwpf.usermodel.XWPFTable;
import org.apache.poi.xwpf.usermodel.XWPFTableRow;
import org.apache.poi.xwpf.usermodel.XWPFTableCell;
...
XWPFTableCell xwpfTableCell = ...;
for (XWPFParagraph xwpfParagraph : xwpfTableCell.getParagraphs()){
String xwpfText = xwpfParagraph.getText();
...
Well, org.apache.poi.wp.usermodel.Paragraph does not exist in 3.17,
but in its source code org.apache.poi.xwpf.usermodel.XWPFParagraph.java tries to import
import org.apache.poi.wp.usermodel.Paragraph;
that can not be resolved as well as
import org.apache.poi.util.Internal;
Shouldn't that be
import org.apache.poi.xwpf.usermodel.Paragraph;
Is this a bug in 3.17? Or am I missing another dependency new in 3.17?
I have poi, poi-ooxml in my pom.xml wich results in
poi-3.17
poi-ooxml-3.17
poi-ooxml-schemas-3.17
Looks a little bit like https://bz.apache.org/bugzilla/show_bug.cgi?id=57957 but this is years old and 3.16 worked without problems.
Marco
Re: upgrade from 3.16 to 3.17 fails with cannot access
org.apache.poi.wp.usermodel.Paragraph
Posted by Nick Burch <ap...@gagravarr.org>.
On Sun, 11 Feb 2018, Marco Lechner - FOSSGIS e.V. wrote:
> when I try to upgrade to 3.17 from 3.16, I get the following error:
>
> cannot access org.apache.poi.wp.usermodel.Paragraph
> [ERROR] class file for org.apache.poi.wp.usermodel.Paragraph not found
This class is contained within the main Apache POI jar. You need both the
OOXML jar and the main jar, eg poi-3.17.jar and poi-ooxml-3.17.jar, along
with their dependencies
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org