Page 1 of 1

struts and java.lang.NoSuchMethodError

PostPosted: Sat Jun 18, 2011 2:42 pm
by suncity65
HI all

When i try to implement the docx4j inside my hibernate based web application i get below error, can some one please help me.
the project works fine if its as Java Project in myeclipse.
Line 137 on CompareDocuments.java is >> newerPackage.setFontMapper(new IdentityPlusMapper());


Exception in thread "main" java.lang.NoSuchMethodError: org.apache.commons.io.filefilter.FileFilterUtils.fileFileFilter()Lorg/apache/commons/io/filefilter/IOFileFilter;
at org.docx4j.fonts.fop.fonts.autodetect.FontFileFinder.getFileFilter(FontFileFinder.java:85)
at org.docx4j.fonts.fop.fonts.autodetect.FontFileFinder.<init>(FontFileFinder.java:58)
at org.docx4j.fonts.PhysicalFonts.discoverPhysicalFonts(PhysicalFonts.java:106)
at org.docx4j.fonts.IdentityPlusMapper.<clinit>(IdentityPlusMapper.java:72)
at org.savinirs.mtqats.util.CompareDocuments.main(CompareDocuments.java:137)

Re: "main" java.lang.NoSuchMethodError

PostPosted: Sat Jun 18, 2011 6:45 pm
by jason
Add commons-io-1.3.1 (and any other missing dependencies) to your class path.

Please acknowledge when this works for you; I think i'll then delete this thread.

Re: "main" java.lang.NoSuchMethodError

PostPosted: Wed Jun 22, 2011 1:40 am
by suncity65
Thanks Jason, i got it working.. you are right.. struts has commons-io.1.1.jar which doesn't have the required class, so i deleted that and added 1.3 version of jar