在与Apache POI Java运行时错误 [英] Runtime error in java with apache POI

查看:1120
本文介绍了在与Apache POI Java运行时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到的错误:

  java.lang.NoSuchMethodError:org.apache.xmlbeans.XmlOptions.setSaveAggressiveNamespaces()Lorg /阿帕奇/的XMLBeans / XmlOptions;
在org.apache.poi.POIXMLDocumentPart< clinit>(POIXMLDocumentPart.java:56)

这是该行56:

 公共静态工作簿WB =新XSSFWorkbook();

我不得不重新链接到我的图书馆,但我所做的就是将所有的文件,并重新构建路径的地方,我移动文件,并删除旧的。


解决方案

  java.lang.NoSuchMethodError:org.apache.xmlbeans.XmlOptions.setSaveAggressiveNamespaces()Lorg /阿帕奇/的xmlbeans / XmlOptions ;

该声明说,你有罐子的不匹配(不兼容)。请确保您已支持罐子的版本。

I get the error:

java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setSaveAggressiveNamespaces()Lorg/apache/xmlbeans/XmlOptions;
at org.apache.poi.POIXMLDocumentPart.<clinit>(POIXMLDocumentPart.java:56)

from the line 56:

public static Workbook wb = new XSSFWorkbook();

I just had to re-link my library, but all i did was move all the files and reset the build path to where i moved the files to, and removed the old one.

解决方案

java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setSaveAggressiveNamespaces()Lorg/apache/xmlbeans/XmlOptions;

This statement says that you have mismatch(incompatible) of jars. Make sure you have supported version of jars.

这篇关于在与Apache POI Java运行时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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