Bug 60237 - AbstractMethodError when calling XSSFFormulaEvaluator.evaluateAllFormulaCells(XSSFWorkbook wb)
Summary: AbstractMethodError when calling XSSFFormulaEvaluator.evaluateAllFormulaCells...
Status: RESOLVED INVALID
Alias: None
Product: POI
Classification: Unclassified
Component: XSSF (show other bugs)
Version: 3.15-FINAL
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-11 13:04 UTC by André Götze
Modified: 2016-10-11 16:20 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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
https://poi.apache.org/faq.html#faq-N10006