mustangproject icon indicating copy to clipboard operation
mustangproject copied to clipboard

ZUGFeRDImporter broken: NoSuchMethodError

Open uwemock opened this issue 6 years ago • 6 comments

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile.getByteArray()[B at org.mustangproject.ZUGFeRD.ZUGFeRDImporter.extractLowLevel(ZUGFeRDImporter.java:107) at org.mustangproject.ZUGFeRD.ZUGFeRDImporter.extract(ZUGFeRDImporter.java:64)

This happens in 1.4.0 as well as in 1.5.1.

uwemock avatar Apr 30 '18 13:04 uwemock

In the jar version or also in the maven version? The interesting thing is that I recently sucessfully tested http://www.mustangproject.org/use.html#read I suspect this could be a duplicate of #53 , i.e. some pdfbox version conflict

jstaerk avatar Apr 30 '18 13:04 jstaerk

Yes, finally found out. ZUGFeRDImporter requires PDFBox version 1.8.x.

uwemock avatar Apr 30 '18 13:04 uwemock

Strange, within the build process of 1.5.0/1.5.1 i thought it was (only) 2.0.8 and now 2.0.9 is required in the POM. Can you provide me with a sample project where it does not work?

jstaerk avatar May 01 '18 09:05 jstaerk

@uwemock does this still persist?

jstaerk avatar Mar 16 '19 07:03 jstaerk

I can't tell. Maven search doesn't find mustangproject any more. My pom uses 1.2.0.

uwemock avatar Mar 16 '19 14:03 uwemock

I had this issue with 1.7.2 again. In order to get around it, I removed org.apache.pdfbox:preflight from my dependencies and replaced it by commons-io.

uwemock avatar Jul 30 '19 06:07 uwemock