本地运行正常,部署到服务器异常。
本地win10,jdk 1.8,服务器是docker上的,open jdk 1.8
java.lang.NullPointerException: null
at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264) ~[?:1.8.0_151]
at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219) ~[?:1.8.0_151]
at sun.awt.FontConfiguration.init(FontConfiguration.java:107) ~[?:1.8.0_151]
at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774) ~[?:1.8.0_151]
at sun.font.SunFontManager$2.run(SunFontManager.java:431) ~[?:1.8.0_151]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_151]
at sun.font.SunFontManager.(SunFontManager.java:376) ~[?:1.8.0_151]
at sun.awt.FcFontManager.(FcFontManager.java:35) ~[?:1.8.0_151]
at sun.awt.X11FontManager.(X11FontManager.java:57) ~[?:1.8.0_151]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_151]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_151]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_151]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_151]
at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_151]
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83) ~[?:1.8.0_151]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_151]
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74) ~[?:1.8.0_151]
at java.awt.Font.getFont2D(Font.java:491) ~[?:1.8.0_151]
at java.awt.Font.canDisplayUpTo(Font.java:2060) ~[?:1.8.0_151]
at java.awt.font.TextLayout.singleFont(TextLayout.java:470) ~[?:1.8.0_151]
at java.awt.font.TextLayout.(TextLayout.java:531) ~[?:1.8.0_151]
at org.apache.poi.ss.util.SheetUtil.getDefaultCharWidth(SheetUtil.java:274) ~[poi-3.16.jar!/:3.16]
at org.apache.poi.xssf.streaming.AutoSizeColumnTracker.(AutoSizeColumnTracker.java:117) ~[poi-ooxml-3.16.jar!/:3.16]
at org.apache.poi.xssf.streaming.SXSSFSheet.(SXSSFSheet.java:79) ~[poi-ooxml-3.16.jar!/:3.16]
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:652) ~[poi-ooxml-3.16.jar!/:3.16]
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:673) ~[poi-ooxml-3.16.jar!/:3.16]
at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:89) ~[poi-ooxml-3.16.jar!/:3.16]
at com.alibaba.excel.util.WorkBookUtil.createSheet(WorkBookUtil.java:51) ~[easyexcel-1.1.2-beta4.jar!/:?]
at com.alibaba.excel.context.WriteContext.currentSheet(WriteContext.java:112) ~[easyexcel-1.1.2-beta4.jar!/:?]
at com.alibaba.excel.write.ExcelBuilderImpl.addContent(ExcelBuilderImpl.java:69) ~[easyexcel-1.1.2-beta4.jar!/:?]
at com.alibaba.excel.ExcelWriter.write1(ExcelWriter.java:106) ~[easyexcel-1.1.2-beta4.jar!/:?]