I'm trying to write a PDF, more specifically write as a HMTL page, using iTextPdf and XMLWorkerHelper, using verions 5.5.9 of both.
But when I try to write to the PDF I get an exception, NoSuchMethodError, no clue as to what is causing this.
java.lang.NoSuchMethodError: com.itextpdf.text.Paragraph.setRole(Lcom/itextpdf/text/pdf/PdfName;)V
at com.itextpdf.tool.xml.html.Header.end(Header.java:97)
at com.itextpdf.tool.xml.html.AbstractTagProcessor.endElement(AbstractTagProcessor.java:229)
at com.itextpdf.tool.xml.pipeline.html.HtmlPipeline.close(HtmlPipeline.java:208)
at com.itextpdf.tool.xml.XMLWorker.endElement(XMLWorker.java:142)
at com.itextpdf.tool.xml.parser.XMLParser.endElement(XMLParser.java:397)
at com.itextpdf.tool.xml.parser.state.ClosingTagState.process(ClosingTagState.java:71)
at com.itextpdf.tool.xml.parser.XMLParser.parseWithReader(XMLParser.java:237)
at com.itextpdf.tool.xml.parser.XMLParser.parse(XMLParser.java:215)
at com.itextpdf.tool.xml.parser.XMLParser.parse(XMLParser.java:176)
at com.itextpdf.tool.xml.XMLWorkerHelper.parseXHtml(XMLWorkerHelper.java:239)
at com.itextpdf.tool.xml.XMLWorkerHelper.parseXHtml(XMLWorkerHelper.java:211)
at com.itextpdf.tool.xml.XMLWorkerHelper.parseXHtml(XMLWorkerHelper.java:184)
Hoping someone can shed some light in this matter, thanks a bunch.
This almost always means that you compiled against one version of a library (in this case, iText) but you are deploying with a different version.
Check the versions in both environments and verify that they are both, in fact, 5.5.9