java - POI 3.8 incompatible with dbunit 2.4.9 -


we using poi 3.8 in in our application. our project using dbunit load data sets .xls files, , apparently dbunit incompatible poi 3.8. following exception,

java.lang.nosuchmethoderror: org.apache.poi.hssf.usermodel.hssfdateutil.iscelldateformatted(lorg/apache/poi/hssf/usermodel/hssfcell;)z  

it seems dbunit requires poi 3.2. cannot downgrade poi version. there way fix problem. in post read downloading dbunit sources , recompile against poi 3.8. how can recompiling done?

there discussion @ dbunit-bugtracker @ http://sourceforge.net/p/dbunit/bugs/332/, unfortunately no update there yet, seems dbunit not support yet.

i able recompile dbunit against newer apache poi version following steps:

  1. check out dbunit code http://dbunit.svn.sourceforge.net/svnroot/dbunit/tags/dbunit-2.4.9 via svn co http://dbunit.svn.sourceforge.net/svnroot/dbunit/tags/dbunit-2.4.9
  2. adjust pom.xml set poi-dependency 3.9, -final dropped in newer versions
  3. run mvn package
  4. if fails during compiling because of oracle-jar missing, follow steps @ https://stackoverflow.com/a/18042525/411846
  5. if tests fail during building, can try skip them mvn -dskiptests=true package

the resulting binary located under target/dbunit-2.4.9.jar


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -