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

查看:49
本文介绍了java.lang.NoSuchMethodError:org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont.addNewFamily()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将POI升级到版本,并添加了来自Apache站点的JAR包。但是,出现以下错误:

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

但是,已验证JAR在项目中可用,并且也可通过代码访问。

推荐答案

根据@axel中有效的评论,将其作为答案发布,以便更好地联系。

版本5.0.0的Apache POI无法再使用ooxml-schemas-1.4.jar

需要poi-ooxml-lite...jarpoi-ooxml-full...jar。因此请确保在使用apache poi 5.0.0时类路径中没有ooxml-schemas-1.4.jar

这篇关于java.lang.NoSuchMethodError:org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont.addNewFamily()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆