具体异常信息如下所示:

    1. cn.afterturn.easypoi.exception.excel.ExcelExportException: Excel导出错误
    2. at cn.afterturn.easypoi.excel.export.ExcelBatchExportService.createSheet(ExcelBatchExportService.java:94)
    3. at cn.afterturn.easypoi.excel.export.ExcelBatchExportService.init(ExcelBatchExportService.java:50)
    4. at cn.afterturn.easypoi.excel.export.ExcelBatchExportService.init(ExcelBatchExportService.java:40)
    5. at cn.afterturn.easypoi.excel.export.ExcelBatchExportService.getExcelBatchExportService(ExcelBatchExportService.java:152)
    6. at cn.afterturn.easypoi.excel.ExcelExportUtil.exportBigExcel(ExcelExportUtil.java:58)
    7. at com.rl.attribute.server.web.manage.controller.DataCenterStatisticController.exportSpreadBatchDetail(DataCenterStatisticController.java:401)
    8. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    9. at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    10. at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    11. at java.lang.reflect.Method.invoke(Method.java:498)
    12. at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)
    13. at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)
    14. at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:106)
    15. at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:888)
    16. at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:793)
    17. at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
    18. at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)
    19. at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)
    20. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
    21. at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
    22. at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)
    23. at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
    24. at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)
    25. at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
    26. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)
    27. at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:94)
    28. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    29. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    30. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    31. at com.rl.base.server.filter.CrossOriginFilter.doFilter(CrossOriginFilter.java:53)
    32. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    33. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    34. at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
    35. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    36. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    37. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    38. at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
    39. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    40. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    41. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    42. at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:108)
    43. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    44. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    45. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    46. at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
    47. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)
    48. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    49. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    50. at io.opentracing.contrib.web.servlet.filter.TracingFilter.doFilter(TracingFilter.java:189)
    51. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)
    52. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)
    53. at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)
    54. at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
    55. at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)
    56. at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
    57. at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)
    58. at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)
    59. at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
    60. at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    61. at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
    62. at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
    63. at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
    64. at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
    65. at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
    66. at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    67. at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
    68. at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)
    69. at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)
    70. at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)
    71. at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)
    72. at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
    73. at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
    74. at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
    75. at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)
    76. at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)
    77. at io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)
    78. at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
    79. at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    80. at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    81. at java.lang.Thread.run(Thread.java:748)
    82. Caused by: java.lang.NullPointerException
    83. at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
    84. at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
    85. at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
    86. at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
    87. at sun.font.SunFontManager$2.run(SunFontManager.java:431)
    88. at java.security.AccessController.doPrivileged(Native Method)
    89. at sun.font.SunFontManager.<init>(SunFontManager.java:376)
    90. at sun.awt.FcFontManager.<init>(FcFontManager.java:35)
    91. at sun.awt.X11FontManager.<init>(X11FontManager.java:57)
    92. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    93. at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    94. at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    95. at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    96. at java.lang.Class.newInstance(Class.java:442)
    97. at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
    98. at java.security.AccessController.doPrivileged(Native Method)
    99. at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
    100. at java.awt.Font.getFont2D(Font.java:491)
    101. at java.awt.Font.canDisplayUpTo(Font.java:2060)
    102. at java.awt.font.TextLayout.singleFont(TextLayout.java:470)
    103. at java.awt.font.TextLayout.<init>(TextLayout.java:531)
    104. at org.apache.poi.ss.util.SheetUtil.getDefaultCharWidth(SheetUtil.java:273)
    105. at org.apache.poi.xssf.streaming.AutoSizeColumnTracker.<init>(AutoSizeColumnTracker.java:117)
    106. at org.apache.poi.xssf.streaming.SXSSFSheet.<init>(SXSSFSheet.java:82)
    107. at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:661)
    108. at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:653)
    109. at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:92)
    110. at cn.afterturn.easypoi.excel.export.ExcelBatchExportService.createSheet(ExcelBatchExportService.java:91)
    111. ... 79 more

    原因是少了什么字体库。可以修改环境来解决,比如JDK、环境等等,大家可以参考下面的这些文章: