Bug 60237

Summary: AbstractMethodError when calling XSSFFormulaEvaluator.evaluateAllFormulaCells(XSSFWorkbook wb)
Product: POI Reporter: André Götze <a.goetze>
Component: XSSFAssignee: POI Developers List <dev>
Severity: normal    
Priority: P2    
Version: 3.15-FINAL   
Target Milestone: ---   
Hardware: PC   
OS: All   

Description André Götze 2016-10-11 13:04:52 UTC
The evaluation of all formula cells in a XSSFWorkbook fails due to an AbstractMethodError. It was working fine in previous versions.

java.lang.AbstractMethodError: org.apache.poi.xssf.usermodel.XSSFCell.getCellTypeEnum()Lorg/apache/poi/ss/usermodel/CellType;
	at org.apache.poi.ss.formula.BaseFormulaEvaluator.evaluateAllFormulaCells(BaseFormulaEvaluator.java:267)
	at org.apache.poi.ss.formula.BaseFormulaEvaluator.evaluateAllFormulaCells(BaseFormulaEvaluator.java:259)
	at org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator.evaluateAllFormulaCells(HSSFFormulaEvaluator.java:176)
	at org.apache.poi.xssf.usermodel.XSSFFormulaEvaluator.evaluateAllFormulaCells(XSSFFormulaEvaluator.java:91)

The culprit seems to be this statement: "c.getCellTypeEnum()".

My workaround is to call "workbook.setForceFormulaRecalculation(true);" instead, which is working fine for Microsoft Office but fails for Libre Office and makes opening the worksheet a little bit slower.
Comment 1 Dominik Stadler 2016-10-11 13:16:25 UTC
An AbstractMethodError usually indicates a mixup of different jar-versions between poi-ooxml and poi, please check which jars you actually include. If you still think this is a problem in poi itself, please try to provide a unit-test which allows to reproduce it.
Comment 2 André Götze 2016-10-11 13:43:07 UTC
You are right, I had two different versions in my pom file: poi 3.15 and poi-ooxml 3.14. Sorry and thank you for pointing me in the right direction.
Comment 3 Dominik Stadler 2016-10-11 14:28:08 UTC
No problem, closing this then.
Comment 4 Javen O'Neal 2016-10-11 16:20:15 UTC