kh-fataoui / xdocreport

Automatically exported from code.google.com/p/xdocreport
0 stars 0 forks source link

NoSuchMethodError when using POI:3.10-FINAL #429

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Using xdocreport 1.0.4
2.Force using POI:3.10-FINAL in dependency (this version is integrated already 
from 1.0.5)

We got:
java.lang.NoSuchMethodError: 
org.apache.poi.xwpf.usermodel.XWPFHyperlinkRun.<init>(Lorg/openxmlformats/schema
s/wordprocessingml/x2006/main/CTHyperlink;Lorg/openxmlformats/schemas/wordproces
singml/x2006/main/CTR;Lorg/apache/poi/xwpf/usermodel/XWPFParagraph;)V
    at org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.visitRun(XWPFDocumentVisitor.java:666)
    at org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.visitRuns(XWPFDocumentVisitor.java:615)
    at org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.visitParagraphBody(XWPFDocumentVisitor.java:436)
    at org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.visitParagraph(XWPFDocumentVisitor.java:327)
    at org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.visitBodyElements(XWPFDocumentVisitor.java:242)
    at org.apache.poi.xwpf.converter.core.XWPFDocumentVisitor.start(XWPFDocumentVisitor.java:194)
    at org.apache.poi.xwpf.converter.xhtml.XHTMLConverter.convert(XHTMLConverter.java:73)
    at org.apache.poi.xwpf.converter.xhtml.XHTMLConverter.doConvert(XHTMLConverter.java:63)
    at org.apache.poi.xwpf.converter.xhtml.XHTMLConverter.doConvert(XHTMLConverter.java:38)
    at org.apache.poi.xwpf.converter.core.AbstractXWPFConverter.convert(AbstractXWPFConverter.java:45)

Original issue reported on code.google.com by thaichat04 on 7 Aug 2014 at 2:27

GoogleCodeExporter commented 9 years ago
Ok I will see this problem when I will have time.

Original comment by angelo.z...@gmail.com on 7 Aug 2014 at 3:05

GoogleCodeExporter commented 9 years ago
Your error is very strange because 1.0.5 is based on POI:3.10-FINAL and our 
JUnit works perfectly? Do you have tested XDocReport 1.0.5 with our sample?

Original comment by angelo.z...@gmail.com on 7 Aug 2014 at 6:13

GoogleCodeExporter commented 9 years ago
I have the same problem. Problem is that xdocreport uses libraries
org.apache.poi.xwpf.converter.core
org.apache.poi.xwpf.converter.xhtml
of version 1.0.4

and these libraries are optimalized for poi 3.09 only!
version 3.09 has constructor XWPFHyperlinkRun(CTHyperlink hyperlink, CTR run, 
XWPFParagraph p), 
but version 3.10 has constructor XWPFHyperlinkRun(CTHyperlink hyperlink, CTR 
run, IRunBody p)

libraries mention up calles constructor from version 3.09 but in 3.10 this 
constructor does not exists.

can not solve this problem too.

Original comment by marek.sz...@gmail.com on 27 Jan 2015 at 8:59

GoogleCodeExporter commented 9 years ago
When fixing this issue, may be upgrade to latest Apache Poi 3.11: 
http://poi.apache.org/changes.html

Original comment by thaichat04 on 27 Jan 2015 at 9:06

GoogleCodeExporter commented 9 years ago
It should be fixed in 1.0.5 => 
https://github.com/opensagres/xdocreport/blob/master/thirdparties-extension/org.
apache.poi.xwpf.converter.core/pom.xml#L13

Please try with 1.0.5.

Note we have switched to github. You can find release at 
https://github.com/opensagres/xdocreport/releases

Next times please create issues at 
https://github.com/opensagres/xdocreport/issues

Original comment by angelo.z...@gmail.com on 27 Jan 2015 at 9:10