POI 报错: org.apache.commons.collections4.ListValuedMap

一,错误:org.apache.commons.collections4.ListValuedMap

Caused by: java.lang.ClassNotFoundException: org.apache.commons.collections4.ListValuedMap

代码参考:java实现excel项目导入导出源码(https://blog.csdn.net/laterstage/article/details/131713449?spm=1001.2014.3001.5502)

第一种:解决方法:将下面jar包换成统一版本

 <dependency>
     <groupId>org.apache.poi</groupId>
     <artifactId>poi</artifactId>
     <version>4.1.0</version>
 </dependency>
 <dependency>
     <groupId>org.apache.poi</groupId>
     <artifactId>poi-ooxml</artifactId>
     <version>4.1.0</version>
 </dependency>
 <dependency>
     <groupId>org.apache.poi</groupId>
     <artifactId>poi-ooxml-schemas</artifactId>
     <version>4.1.0</version>

 </dependency>

第二种:博主实现excle导入,导出的pom(如果上面,更改完毕还有问题,可以直接替换下面的pom依赖)

  <!-- 下面两个依赖是实现 导入excel的-->
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi</artifactId>
      <version>4.1.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi-ooxml</artifactId>
      <version>4.1.0</version>
    </dependency>

    <!-- 下面依赖是实现 导出excel的-->
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-collections4</artifactId>
      <version>4.1</version>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-compress</artifactId>
      <version>1.18</version>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-math3</artifactId>
      <version>3.6.1</version>
    </dependency>

    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-math3</artifactId>
      <version>3.6.1</version>
    </dependency>

    <dependency>
      <groupId>org.apache.poi</groupId>
      <artifactId>poi-ooxml-schemas</artifactId>
      <version>4.1.2</version>
    </dependency>

    <dependency>
      <groupId>org.apache.xmlbeans</groupId>
      <artifactId>xmlbeans</artifactId>
      <version>3.1.0</version>
    </dependency>

如果只是实现excel的导入与导出,可以直接使用下面的pom

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
基于SpringMVC+Hibernate4的考勤管理系统+.zip 项目环境 系统:Windows7 X64位系统 IDE:Intellij IDEA 14.0 后端技术选型 J D K 版 本:JDK 1.8 数 据 库:Mysql 5.7 WEB容器:Tomcat 7.0 视图框架:SpringMVC 4.3.6.RELEASE 核心框架:Spring Framework 4.3.6.RELEASE 持久层框架:Hibernate4.3.11.Final 数据库连接池:C3P0 工具类 Apache fileupload 文件上传组件 Apache commons-collections 封装好的各种集合类和集合工具类 Apache commons-io Apache基金会创建并维护的Java函数库 Apache commons-logging 通用的日志接口 dom4j 优秀的JavaXML API 主要用于解析XML文档 poi组件 主要用于读取以及写入Microsoft Office格式档案 JSR 303 为实体验证定义了一个元数据模型和API 前端技术选型 JS框架:jQuery 1.8 CSS框架:Twitter Bootstrap 项目所需jar包列表 antlr-2.7.7.jar classmate-1.0.0.jar com.springsource.net.sf.cglib-2.2.0.jar com.springsource.org.aopalliance-1.0.0.jar com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar commons-collections4-4.0.jar commons-fileupload-1.2.2.jar commons-io-2.0.1.jar commons-logging-1.1.3.jar dom4j-1.6.1.jar hibernate-commons-annotations-4.0.5.Final.jar hibernate-core-4.3.11.Final.jar hibernate-entitymanager-4.3.11.Final.jar hibernate-jpa-2.1-api-1.0.0.Final.jar hibernate-validator-5.1.3.Final.jar hibernate-validator-annotation-processor-5.1.3.Final.jar jandex-1.1.0.Final.jar javassist-3.18.1-GA.jar jboss-logging-3.1.3.GA.jar jboss-logging-annotations-1.2.0.Beta1.jar jboss-transaction-api_1.2_spec-1.0.0.Final.jar jstl-1.2.jar mysql-connector-java-5.1.7-bin.jar poi-3.15.jar poi-examples-3.15.jar poi-excelant-3.15.jar poi-ooxml-3.15.jar poi-ooxml-schemas-3.15.jar poi-scratchpad-3.15.jar spring-aop-4.0.0.RELEASE.jar 使用Spring 的AOP 特性时所需的类和源码级元数据支持 spring-aspects-4.0.0.RELEASE.jar 提供对AspectJ的支持,以便可以方便的将面向方面的功能集成进IDE中 spring-beans-4.0.0.RELEASE.jar 所有应用都要用到的,它包含访问配置文件、创建和管理bean spring-context-4.0.0.RELEASE.jar Spring 核心提供了大量扩展 spring-core-4.0.0.RELEASE.jar Spring 框架基本的核心工具类,是其它组件的基本核心 spring-expression-4.0.0.RELEASE.jar Spring表达式语言 spring-jdbc-4.0.0.RELEASE.jar 对Spring 对JDBC 数据访问进行封装的所有类 spring-orm-4.0.0.RELEASE.jar Spring对DAO特性集进行了扩展 spring-tx-4.0.0.RELEASE.jar 事务相关的类 spring-web-4.0.0.RELEASE.jar Web 应用开发时,用到Spring 框架时所需的核心类 spring-webmvc-4.0.0.RELEASE

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

不一样的老墨

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值