Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

读取Datagrip导出的Excel文件抛空指针异常 #1738

Closed
hh-cat opened this issue Dec 29, 2020 · 2 comments
Closed

读取Datagrip导出的Excel文件抛空指针异常 #1738

hh-cat opened this issue Dec 29, 2020 · 2 comments
Assignees
Labels
bug Something isn't working developing This feature will be added in future releases development completed Development completed, waiting for release

Comments

@hh-cat
Copy link

hh-cat commented Dec 29, 2020

触发场景描述
开发中使用Datagrip从数据库中导出Excel无法使用easyexcel读取,用WPS打开对应Excel随便动一下然后保存又可以正常读取了。

触发Bug的代码
使用语雀中“不创建对象的读”示例代码读取

提示的异常或者没有达到的效果
image

堆栈

Exception in thread "main" com.alibaba.excel.exception.ExcelAnalysisException: java.lang.NullPointerException
	at com.alibaba.excel.analysis.v07.XlsxSaxAnalyser.parseXmlSource(XlsxSaxAnalyser.java:183)
	at com.alibaba.excel.analysis.v07.XlsxSaxAnalyser.execute(XlsxSaxAnalyser.java:201)
	at com.alibaba.excel.analysis.ExcelAnalyserImpl.analysis(ExcelAnalyserImpl.java:115)
	at com.alibaba.excel.ExcelReader.read(ExcelReader.java:182)
	at com.alibaba.excel.ExcelReader.read(ExcelReader.java:172)
	at com.alibaba.excel.read.builder.ExcelReaderSheetBuilder.doRead(ExcelReaderSheetBuilder.java:65)
	at ExcelDemo.main(ExcelDemo.java:19)
Caused by: java.lang.NullPointerException
	at com.alibaba.excel.analysis.v07.handlers.CellTagHandler.startElement(CellTagHandler.java:50)
	at com.alibaba.excel.analysis.v07.handlers.sax.XlsxRowHandler.startElement(XlsxRowHandler.java:67)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:510)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:1359)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:842)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:771)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:142)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1214)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:644)
	at com.alibaba.excel.analysis.v07.XlsxSaxAnalyser.parseXmlSource(XlsxSaxAnalyser.java:178)
	... 6 more
@hh-cat hh-cat added the bug Something isn't working label Dec 29, 2020
@zhuangjiaju
Copy link
Collaborator

会在3+版本修复

@zhuangjiaju zhuangjiaju added the developing This feature will be added in future releases label Apr 9, 2021
@zhuangjiaju zhuangjiaju added the development completed Development completed, waiting for release label Sep 17, 2021
@zhuangjiaju
Copy link
Collaborator

已经在3.0.0-beta1 版本修复,beta版本会在一个月内升级成正式版。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working developing This feature will be added in future releases development completed Development completed, waiting for release
Projects
None yet
Development

No branches or pull requests

2 participants