maven poi
来源:互联网 发布:淘宝大码女装胖mm秋装 编辑:程序博客网 时间:2024/06/15 20:45
之前的项目中,poi版本过低,不支持excel2007的导入导出,遂升级至3.10.1,项目启动的时候却报
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [config/applicationContext.xml]; nested exception is java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
<dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.10.1</version> <exclusions> <exclusion> <groupId>xml-apis</groupId> <artifactId>xml-apis</artifactId> </exclusion> </exclusions> </dependency>
poi 3.12版本修复了这个bug,却引出了另外一个bug,项目能正常启动,但是在执行导出操作的时候抛出
java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.openxml4j.opc.internal.marshallers.ZipPackagePropertiesMarshaller
实际上是 xxx can not cast to javax.xml.streaming.EventFactory造成的。
原因是3.10.1以后,stax-api与jdk1.6.18jar冲突。
<groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>3.12</version> <exclusions> <exclusion> <groupId>stax</groupId> <artifactId>stax-api</artifactId> </exclusion> </exclusions> </dependency>
<pre name="code" class="html">要保证项目编译的时候要编译版本要高于6U18。
<span style="font-family: Arial, Helvetica, sans-serif;"><build> </span>
<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins> </build>
0 0
- maven poi
- maven导入poi配置
- maven中的poi的artifactId
- maven+springmvc+POI导入Excel
- maven 下载poi API 的 POM
- POI+Maven实现数据导出到Excel
- maven项目中利用poi导出Excel
- POI+Struts2+maven excel 导出数据
- POI添加到Maven中的一个细节
- java maven poi 读取excel表格
- poi
- POI
- POI
- POI
- POI
- poi
- poi
- POI
- git常用命令
- ccf 字符串匹配
- Codeforces Round #318 [RussianCodeCup Thanks-Round] (Div. 1)(573A,573B)
- Android:异步加载网络资源
- 【iOS】UIButton 图标在上文字在下
- maven poi
- 获取网络图片
- DataGridView全选的时候第一行没有选中,光标移动到其他行才会显示选中
- JDK 源码 -- SET
- Android Handler机制
- springMVC(10) springMVC参数传递(封装对象接收参数)
- MS(一)
- getRealPath()和getResource()区别
- MFC基础,MFC自绘控件学习总结.