5

Upgraded poi to version and added the jar bundle from apache site. However getting below error :

 java.lang.NoSuchMethodError: org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont.addNewFamily()

However verified that the JAR is available in the project and accessible via code too.

enter image description here

enter image description here

Bhavik Patel
  • 1,044
  • 1
  • 15
  • 33
  • 6
    Version `5.0.0` of `apache poi` cannot use `ooxml-schemas-1.4.jar` anymore. It needs `poi-ooxml-lite...jar` or `poi-ooxml-full...jar`. So make sure there is not `ooxml-schemas-1.4.jar` in class path when `apache poi 5.0.0` is used. – Axel Richter Apr 28 '21 at 11:57

1 Answers1

3

As per comments from @axel which worked, posting it as an answer for better reach.

Version 5.0.0 of apache poi cannot use ooxml-schemas-1.4.jar anymore.

It needs poi-ooxml-lite...jar or poi-ooxml-full...jar. So make sure there is not ooxml-schemas-1.4.jar in class path when apache poi 5.0.0 is used

Bhavik Patel
  • 1,044
  • 1
  • 15
  • 33