使用hutoolexcel导入时报错如下

org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Cell.getCellType()Lorg/apache/poi/ss/usermodel/CellType;at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1055)at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:909)at javax.servlet.http.HttpServlet.service(HttpServlet.java:517)at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)at javax.servlet.http.HttpServlet.service(HttpServlet.java:584)at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)at org.springblade.core.log.filter.LogTraceFilter.doFilter(LogTraceFilter.java:39)at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)at org.springblade.core.boot.request.BladeRequestFilter.doFilter(BladeRequestFilter.java:50)at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:109)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:111)at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)at io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Cell.getCellType()Lorg/apache/poi/ss/usermodel/CellType;at cn.hutool.poi.excel.cell.CellUtil.getCellValue(CellUtil.java:108)at cn.hutool.poi.excel.cell.CellUtil.getCellValue(CellUtil.java:76)at cn.hutool.poi.excel.RowUtil.readRow(RowUtil.java:76)at cn.hutool.poi.excel.RowUtil.readRow(RowUtil.java:50)at cn.hutool.poi.excel.reader.AbstractSheetReader.readRow(AbstractSheetReader.java:138)at cn.hutool.poi.excel.reader.ListSheetReader.read(ListSheetReader.java:41)at cn.hutool.poi.excel.reader.ListSheetReader.read(ListSheetReader.java:16)at cn.hutool.poi.excel.ExcelReader.read(ExcelReader.java:399)at cn.hutool.poi.excel.ExcelReader.read(ExcelReader.java:277)at cn.hutool.poi.excel.ExcelReader.read(ExcelReader.java:260)at cn.hutool.poi.excel.ExcelReader.read(ExcelReader.java:249)at cn.hutool.poi.excel.ExcelReader.read(ExcelReader.java:238)at org.springblade.quality.controller.CostLaneController.importUser(CostLaneController.java:155)at org.springblade.quality.controller.CostLaneController$$FastClassBySpringCGLIB$$21bfe8cb.invoke(<generated>)at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:88)at org.springblade.core.log.aspect.RequestLogAspect.aroundApi(RequestLogAspect.java:112)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:644)at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:633)at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:70)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:175)at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:95)at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)at org.springblade.quality.controller.CostLaneController$$EnhancerBySpringCGLIB$$c6ee9e12.importUser(<generated>)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:878)at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:792)at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)... 59 common frames omitted

网上搜的结果都是直接说poi的版本换4.0以上 试了都没用,结果废了半天功夫之后发现hutool概述里面有描述hutool工具包版本和poi版本的对应关系,如下

我用的hutool是5.6.6,更换poi版本5.0之后

cn.hutool.core.exceptions.DependencyException: You need to add dependency of 'poi-ooxml' to your project, and version >= 4.1.2

部分用户使用POI模块时会提示:

You need to add dependency of ‘poi-ooxml’ to your project, and version >= 4.1.2

一般以下几个原因:

1、没有引入POI相关jar或引入版本太低
2、引入了多个版本的POI,导致包冲突了
3、没有引入关联依赖,这个具体要看下堆栈中的Cause By

<dependency><groupId>org.apache.poi</groupId><artifactId>poi-ooxml</artifactId><version>5.0.0</version></dependency><dependency><groupId>org.apache.poi</groupId><artifactId>poi</artifactId><version>5.0.0</version></dependency><dependency><groupId>org.apache.poi</groupId><artifactId>poi-ooxml-full</artifactId>  <!--注意--><version>5.0.0</version></dependency>

问题解决!!!

`


嗨嗨嗨!!!

hutool excel导入报错org.apache.poi.ss.usermodel.Cell.getCellType()Lorg/apache/poi/ss/usermodel/CellType;相关推荐

  1. Java org.apache.poi.ss.usermodel.Cell.getCellType()Lorg/apache/poi/ss/usermodel/CellType问题解决

    问题描述: org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception ...

  2. org.apache.poi.ss.usermodel.Cell.getCellType()Lorg/apache/poi/ss/usermodel/CellType(百分比解决你问题)

    SpringBoot导入或者导出报错 1.首先在pom.xml中引入 <!--hutool--> <dependency><groupId>cn.hutool< ...

  3. 解决Excel导入报错:外部表不是预期的格式

    最近在做一个Excel数据导入到数据库的功能,读取Excel文件时,打开连接出错. 错误为:外部表不是预期的格式 解决方法:检查了一下,导出的Excel是标准文件不是html,没错,Excel文件正常 ...

  4. java解析excel报错,poi解析excel文件报错

    getFileMagic() only operates on streams which support mark(int) 使用 bis 解决 BufferedInputStream bis = ...

  5. linux系统读取excel文件是否存在,小弟我用poi读excel,在window下没有有关问题,但把程序放到linux上时,读取客户端的excel文件报错,不...

    我用poi读excel,在window下没有问题,但把程序放到linux上时,读取客户端的excel文件报错,不知道如何解决 我用poi读excel,在window下没有问题,但把程序放到linux上 ...

  6. EASYPOI导入报错The part /xl/drawings/drawing1.xml failed to be saved

    EASYPOI导入报错The part /xl/drawings/drawing1.xml failed to be saved Caused by: org.apache.poi.openxml4j ...

  7. easyExcel导入报错excelType

    使用easyExcel导入报错: Convert excel format exception.You can try specifying the 'excelType' yourself 项目中采 ...

  8. 数据导入报错:Got a packet bigger than‘max_allowed_packet’bytes的问题

    2019独角兽企业重金招聘Python工程师标准>>> 数据导入报错:Got a packet bigger than'max_allowed_packet'bytes的问题 2个解 ...

  9. mysql source导入报错ERROR 1366的解决方法

    mysql source导入报错ERROR 1366的解决方法 参考文章: (1)mysql source导入报错ERROR 1366的解决方法 (2)https://www.cnblogs.com/ ...

最新文章

  1. 十分钟了解分布式计算:GraphX
  2. ML之FE:Kaggle比赛之根据城市自行车共享系统数据进行FE+预测在某个时间段自行车被租出去的个数
  3. json数组显示格式
  4. PC 远程控制 android手机的方法之一VNC
  5. 安卓 spinner下拉框 做模糊查询_想做短视频不知道用什么工具?11个免费制作工具收藏起来...
  6. MySQL最基础的操作
  7. 滴滴上线特快和特惠:极端天气绝不动态加价
  8. python实例解析_python中super的用法实例解析
  9. (二)预处理时间序列数据用于AI预测和异常检测
  10. attrib批量显示文件夹_DOS下批量修改文件及文件夹属性(attrib命令详解)
  11. SSDB 一个高性能的支持丰富数据结构的 NoSQL 数据库, 用于替代 Redis.
  12. 双标准线等角圆锥投影转换_青学堂--花花的地理课堂之地图投影知多少
  13. Moss、SharePoint数据库迁移问题
  14. CentOS7.2下python安装pip-8.0.2管理
  15. Spug发布前端项目实战全过程
  16. 国家代号(CountryCode) - 常用国家地区代码和国际电话代码
  17. C语言打字练习小游戏
  18. 什么A股,B股,H股?什么是红筹股,蓝筹股
  19. 模糊查询和sql语句的拼接
  20. 图片瀑布流差异化设计尝试

热门文章

  1. DASCTF部分复现
  2. python 实现 享元模式
  3. vue 动态设置 echarts 画布大小 更新图表数据
  4. 联想存储8GB缓存00MJ101大量现货做工精细
  5. 使用fiddler 分析视频网站
  6. python与人工智能有关系吗_Python与人工智能到底有什么关系呢?Python学习
  7. Python实战之数字、日期和时间的高级处理
  8. 夏普计算机怎么弹音乐,夏普歌手版电视 为你提升歌唱技巧的利器
  9. 弘辽科技:拼多多专属推广怎么设置时间。
  10. ASP.NET MVC预览4-使用Ajax和Ajax.Form