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

支持Native-Image以及优化建议 #2853

Open
pipinet opened this issue Dec 6, 2022 · 10 comments · Fixed by #2888
Open

支持Native-Image以及优化建议 #2853

pipinet opened this issue Dec 6, 2022 · 10 comments · Fixed by #2888
Assignees
Labels
bug Something isn't working developing This feature will be added in future releases pending verification This problem needs to be confirmed

Comments

@pipinet
Copy link

pipinet commented Dec 6, 2022

在使用Spring Native和非Spring项目的Native的时候,在打Native包的时候会失败,大部分问题都集中在poi和ehcache的使用上,同时还发现了一些依赖方面的可调整的方面,,所以建议做如下修改来处理这些问题。
1、将easyexcel core对于spring的依赖去除,使用扩展的方式引入。
2、将easyexcel core对于ehcache的依赖去除,使用扩展的方式引入。
3、目前与poi的版本差距挺大的,建议将poi升级,若存在兼容性的问题可以使用多个版本的适配扩展包来实现。
4、然后,适配目前native过程中的问题。

不知道这些想法是否符合easyexcel的发展,这些建议是否符合easyexcel的初衷。

@pipinet pipinet added the bug Something isn't working label Dec 6, 2022
@linghengqian
Copy link
Contributor

@zhuangjiaju zhuangjiaju added the pending verification This problem needs to be confirmed label Jan 16, 2023
@zhuangjiaju zhuangjiaju added the developing This feature will be added in future releases label Feb 9, 2023
@Q11shiyi
Copy link

您好,请问目前是在尝试支持native-image吗?我也遇到了相同的问题 @linghengqian

@linghengqian
Copy link
Contributor

@Q11shiyi I don't see a problem after collecting GraalVM reachability metadata for Easyexcel. If you think there is a problem, you can open a new issue after providing a minimal reproducible unit test.

@bajie-git
Copy link

现在有支持graalvm的版本么

@CV-Devlau
Copy link

收集 Easyexcel 的 GraalVM 可访问性元数据后,我没有看到问题。如果您认为存在问题,可以在提供最小可重现的单元测试后打开一个新问题。

Hello, where can I obtain the GraalVM accessibility metadata for Easyexcel

@CV-Devlau
Copy link

收集 Easyexcel 的 GraalVM 可访问性元数据后,我没有看到问题。如果您认为存在问题,可以在提供最小可重现的单元测试后打开一个新问题。

您好,我在哪里可以获得 Easyexcel 的 GraalVM 可访问性元数据

@linghengqian

@linghengqian
Copy link
Contributor

  • @CV-Devlau You need to write a unit test suite for easyexcel and collect these jsons through the tracing agent integrated by graalvm native buildtools. I don't have time recently, and I may need to wait until graalvm ce for jdk29 is released.

@CV-Devlau
Copy link

  • @CV-Devlau You need to write a unit test suite for easyexcel and collect these jsons through the tracing agent integrated by graalvm native buildtools. I don't have time recently, and I may need to wait until graalvm ce for jdk29 is released.

@linghengqian I saw that you mentioned that you collected a portion of metadata and tested it without any issues. I would like to test this portion of metadata, which may be more complete than what I obtained from writing my own tests

@linghengqian
Copy link
Contributor

@linghengqian I saw that you mentioned that you collected a portion of metadata and tested it without any issues. I would like to test this portion of metadata, which may be more complete than what I obtained from writing my own tests

  • The unit tests for alibaba easyexcel actually exist in my private test suite about Add support for org.apache.poi:poi:5.2.3 oracle/graalvm-reachability-metadata#225 , and I haven't prepared a PR for this part yet because I was blocked by a series of pre-requisite PRs.

  • The reason I don't have time now is simply because I'm a student about to graduate and my energy doesn't support me to deal with related issues.

@workcheng
Copy link

最新版本的jdk把awt移除了,会报这个错误,除了jdk降级,还有什么方式解决?

2024-12-07T11:14:54.314+0800 DEBUG [http-nio-18898-exec-2] o.s.web.servlet.DispatcherServlet.logResult:1109 - Failed to complete request: com.alibaba.excel.exception.ExcelGenerateException: java.lang.Error: java.home property not set
2024-12-07T11:14:54.314+0800 ERROR [http-nio-18898-exec-2] o.a.c.c.C.[.[.[.[dispatcherServlet].log:175 - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: com.alibaba.excel.exception.ExcelGenerateException: java.lang.Error: java.home property not set] with root cause
java.lang.Error: java.home property not set
at [email protected]/sun.awt.FontConfiguration.findFontConfigFile(FontConfiguration.java:180)
at [email protected]/sun.awt.FontConfiguration.(FontConfiguration.java:97)
at [email protected]/sun.awt.windows.WFontConfiguration.(WFontConfiguration.java:41)
at [email protected]/sun.awt.Win32FontManager.createFontConfiguration(Win32FontManager.java:175)
at [email protected]/sun.font.SunFontManager$2.run(SunFontManager.java:352)
at [email protected]/sun.font.SunFontManager$2.run(SunFontManager.java:309)
at [email protected]/java.security.AccessController.executePrivileged(AccessController.java:129)
at [email protected]/java.security.AccessController.doPrivileged(AccessController.java:319)
at [email protected]/sun.font.SunFontManager.(SunFontManager.java:309)
at [email protected]/sun.awt.Win32FontManager.(Win32FontManager.java:83)
at [email protected]/sun.font.PlatformFontInfo.createFontManager(PlatformFontInfo.java:37)
at [email protected]/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:51)
at [email protected]/java.awt.Font.getFont2D(Font.java:526)
at [email protected]/java.awt.Font.canDisplayUpTo(Font.java:2278)
at [email protected]/java.awt.font.TextLayout.singleFont(TextLayout.java:469)
at [email protected]/java.awt.font.TextLayout.(TextLayout.java:530)
at org.apache.poi.ss.util.SheetUtil.getDefaultCharWidthAsFloat(SheetUtil.java:353)
at org.apache.poi.xssf.streaming.AutoSizeColumnTracker.(AutoSizeColumnTracker.java:117)
at org.apache.poi.xssf.streaming.SXSSFSheet.(SXSSFSheet.java:106)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:698)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:716)
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:108)
at com.alibaba.excel.util.WorkBookUtil.createSheet(WorkBookUtil.java:86)
at com.alibaba.excel.context.WriteContextImpl.createSheet(WriteContextImpl.java:223)
at com.alibaba.excel.context.WriteContextImpl.initSheet(WriteContextImpl.java:203)
at com.alibaba.excel.context.WriteContextImpl.currentSheet(WriteContextImpl.java:135)
at com.alibaba.excel.write.ExcelBuilderImpl.addContent(ExcelBuilderImpl.java:54)
at com.alibaba.excel.ExcelWriter.write(ExcelWriter.java:73)
at com.alibaba.excel.ExcelWriter.write(ExcelWriter.java:50)
at com.alibaba.excel.write.builder.ExcelWriterSheetBuilder.doWrite(ExcelWriterSheetBuilder.java:62)

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 pending verification This problem needs to be confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants