You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by Jan W <ja...@gmail.com> on 2009/10/16 14:10:54 UTC

POI 3.5 incompatible with dbunit?

We need to be able to read Excel 2007 OOXML (.xlsx) files in our application,
and in order to do so, I upgraded from POI 3.0 to 3.5. However after the
upgrade, I am getting this exception:

java.lang.NoSuchMethodError:
org.apache.poi.hssf.usermodel.HSSFDateUtil.isCellDateFormatted(Lorg/apache/poi/hssf/usermodel/HSSFCell;)Z
	at org.dbunit.dataset.excel.XlsTable.getValue(XlsTable.java:153)
	at
org.dbunit.operation.AbstractBatchOperation.isEmpty(AbstractBatchOperation.java:77)
	at
org.dbunit.operation.AbstractBatchOperation.execute(AbstractBatchOperation.java:135)
	at
com.carlson.cwt.test.db.HsqlDbSqlFileLoader.importXlsDataSet(HsqlDbSqlFileLoader.java:166)

Our project is using dbunit to load data sets from .xls files, and
apparently dbunit is incompatible with POI 3.5. This is confirmed here:
http://www.dbunit.org/dependencies.html which says dbunit requires POI 3.2.
Looking at POI source code, the function HSSFDateUtil.isCellDateFormatted()
is available in POI 3.2 but NOT in POI 3.5.

Which means I'm stuck! Suggestions anyone?

--Jan
-- 
View this message in context: http://www.nabble.com/POI-3.5-incompatible-with-dbunit--tp25924373p25924373.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: POI 3.5 incompatible with dbunit?

Posted by Jan W <ja...@gmail.com>.
Recompiling did the job. Thanks for the quick reply!


Nick Burch wrote:
> 
> If you grab the dbunit sources and recompile it against poi 3.5, I think 
> you ought to be fine
> 

-- 
View this message in context: http://www.nabble.com/POI-3.5-incompatible-with-dbunit--tp25924373p25965292.html
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: POI 3.5 incompatible with dbunit?

Posted by Nick Burch <ni...@torchbox.com>.
On Fri, 16 Oct 2009, Jan W wrote:
> Our project is using dbunit to load data sets from .xls files, and 
> apparently dbunit is incompatible with POI 3.5. This is confirmed here: 
> http://www.dbunit.org/dependencies.html which says dbunit requires POI 
> 3.2. Looking at POI source code, the function 
> HSSFDateUtil.isCellDateFormatted() is available in POI 3.2 but NOT in 
> POI 3.5.

POI 3.2 to 3.5 isn't completely binary compatible, should be source 
compatible in all common cases there. Where possible it is binary 
compatible, but some bits around interfaces and static methods haven't 
allowed it

If you grab the dbunit sources and recompile it against poi 3.5, I think 
you ought to be fine

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org