bladeX 部署到测试服务器上,做Excel数据导出时,不能正常导出数据?

Java 未结 3 1766
294604621
294604621 剑圣 2021-04-15 22:30

一、该问题的重现步骤是什么?

  1. 做数据导出到Excel表格时,导出的文件不能正常打开?

2. 

3.


二、你期待的结果是什么?实际看到的又是什么?

        能像本地一样,导出数据并且能正常打开Excel表格

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

        版本后台是bladeX 2.6

四、请提供详细的错误堆栈信息,这很重要。


        

查看的docker日志文件,报错如下:


  1. com.alibaba.excel.exception.ExcelGenerateException: java.lang.NoClassDefFoundError: sun.awt.X11FontManager (initialization failure)

  2. at com.alibaba.excel.write.ExcelBuilderImpl.addContent(ExcelBuilderImpl.java:64)

  3. at com.alibaba.excel.ExcelWriter.write(ExcelWriter.java:161)

  4. at com.alibaba.excel.ExcelWriter.write(ExcelWriter.java:146)

  5. at com.alibaba.excel.write.builder.ExcelWriterSheetBuilder.doWrite(ExcelWriterSheetBuilder.java:61)

  6. at org.springblade.core.excel.util.ExcelUtil.export(ExcelUtil.java:137)

  7. at org.springblade.modules.elevatorbase.controller.ElevatorBaseinfoController.exportRegion(ElevatorBaseinfoController.java:246)

  8. at org.springblade.modules.elevatorbase.controller.ElevatorBaseinfoController$$FastClassBySpringCGLIB$$cc998b00.invoke(<generated>)

  9. at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)

  10. at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:752)

  11. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)

  12. at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)

  13. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)

  14. at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)

  15. at org.springblade.modules.elevatorbase.controller.ElevatorBaseinfoController$$EnhancerBySpringCGLIB$$aab172c2.exportRegion(<generated>)

  16. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  17. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

  18. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  19. at java.lang.reflect.Method.invoke(Unknown Source)

  20. at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)

  21. at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)

  22. at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)

  23. at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)

  24. at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)

  25. at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)

  26. at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)

  27. at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)

  28. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)

  29. at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)

  30. at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)

  31. at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)

  32. at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)

  33. at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)

  34. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)

  35. at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)

  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 com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)

  39. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  40. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  41. at org.springblade.core.tool.request.BladeRequestFilter.doFilter(BladeRequestFilter.java:49)

  42. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  43. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  44. at org.springblade.core.log.filter.LogTraceFilter.doFilter(LogTraceFilter.java:39)

  45. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  46. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  47. at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88)

  48. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  49. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  50. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  51. at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)

  52. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  53. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  54. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  55. at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)

  56. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  57. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  58. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  59. at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:94)

  60. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  61. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  62. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  63. at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114)

  64. at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104)

  65. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  66. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  67. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  68. at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)

  69. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  70. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  71. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  72. at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)

  73. at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)

  74. at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)

  75. at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)

  76. at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)

  77. at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)

  78. at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)

  79. at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

  80. at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)

  81. at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)

  82. at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)

  83. at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)

  84. at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)

  85. at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

  86. at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

  87. at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)

  88. at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)

  89. at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)

  90. at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)

  91. at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)

  92. at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

  93. at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)

  94. at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)

  95. at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)

  96. at io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)

  97. at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)

  98. at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

  99. at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

  100. at java.lang.Thread.run(Unknown Source)

  101. Caused by: java.lang.NoClassDefFoundError: sun.awt.X11FontManager (initialization failure)

  102. at java.lang.J9VMInternals.initializationAlreadyFailed(Unknown Source)

  103. at java.lang.Class.forNameImpl(Native Method)

  104. at java.lang.Class.forName(Unknown Source)

  105. at sun.font.FontManagerFactory$1.run(Unknown Source)

  106. at java.security.AccessController.doPrivileged(Unknown Source)

  107. at sun.font.FontManagerFactory.getInstance(Unknown Source)

  108. at java.awt.Font.getFont2D(Unknown Source)

  109. at java.awt.Font.canDisplayUpTo(Unknown Source)

  110. at java.awt.font.TextLayout.singleFont(Unknown Source)

  111. at java.awt.font.TextLayout.<init>(Unknown Source)

  112. at org.apache.poi.ss.util.SheetUtil.getDefaultCharWidth(SheetUtil.java:275)

  113. at org.apache.poi.xssf.streaming.AutoSizeColumnTracker.<init>(AutoSizeColumnTracker.java:117)

  114. at org.apache.poi.xssf.streaming.SXSSFSheet.<init>(SXSSFSheet.java:82)

  115. at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:658)

  116. at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:679)

  117. at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:90)

  118. at com.alibaba.excel.util.WorkBookUtil.createSheet(WorkBookUtil.java:66)

  119. at com.alibaba.excel.context.WriteContextImpl.createSheet(WriteContextImpl.java:205)

  120. at com.alibaba.excel.context.WriteContextImpl.initSheet(WriteContextImpl.java:185)

  121. at com.alibaba.excel.context.WriteContextImpl.currentSheet(WriteContextImpl.java:122)

  122. at com.alibaba.excel.write.ExcelBuilderImpl.addContent(ExcelBuilderImpl.java:53)

  123. ... 98 common frames omitted

  124. Caused by: java.lang.UnsatisfiedLinkError: fontmanager (libfreetype.so.6: cannot open shared object file: No such file or directory)

  125. at java.lang.ClassLoader.loadLibraryWithPath(Unknown Source)

  126. at java.lang.ClassLoader.loadLibraryWithClassLoader(Unknown Source)

  127. at java.lang.System.loadLibrary(Unknown Source)

  128. at sun.font.FontManagerNativeLibrary$1.run(Unknown Source)

  129. at java.security.AccessController.doPrivileged(Unknown Source)

  130. at sun.font.FontManagerNativeLibrary.<clinit>(Unknown Source)

  131. at sun.font.SunFontManager$1.run(Unknown Source)

  132. at java.security.AccessController.doPrivileged(Unknown Source)

  133. at sun.font.SunFontManager.<clinit>(Unknown Source)

  134. ... 118 common frames omitted


  135. 2021-04-15 15:53:14.438  WARN 1 --- [ XNIO-1 task-72] .m.m.a.ExceptionHandlerExceptionResolver : Failure in @ExceptionHandler public org.springblade.core.tool.api.R org.springblade.core.log.error.BladeRestExceptionTranslator.handleError(java.lang.Throwable)


  136. org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation

  137. at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverters(AbstractMessageConverterMethodProcessor.java:308)

  138. at org.springframework.web.servlet.mvc.method.annotation.RequestResponseBodyMethodProcessor.handleReturnValue(RequestResponseBodyMethodProcessor.java:181)

  139. at org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.handleReturnValue(HandlerMethodReturnValueHandlerComposite.java:82)

  140. at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:123)

  141. at org.springframework.web.servlet.mvc.method.annotation.ExceptionHandlerExceptionResolver.doResolveHandlerMethodException(ExceptionHandlerExceptionResolver.java:409)

  142. at org.springframework.web.servlet.handler.AbstractHandlerMethodExceptionResolver.doResolveException(AbstractHandlerMethodExceptionResolver.java:61)

  143. at org.springframework.web.servlet.handler.AbstractHandlerExceptionResolver.resolveException(AbstractHandlerExceptionResolver.java:141)

  144. at org.springframework.web.servlet.handler.HandlerExceptionResolverComposite.resolveException(HandlerExceptionResolverComposite.java:80)

  145. at org.springframework.web.servlet.DispatcherServlet.processHandlerException(DispatcherServlet.java:1299)

  146. at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1111)

  147. at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1057)

  148. at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)

  149. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)

  150. at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)

  151. at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)

  152. at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)

  153. at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)

  154. at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)

  155. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)

  156. at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)

  157. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  158. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  159. at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)

  160. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  161. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  162. at org.springblade.core.tool.request.BladeRequestFilter.doFilter(BladeRequestFilter.java:49)

  163. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  164. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  165. at org.springblade.core.log.filter.LogTraceFilter.doFilter(LogTraceFilter.java:39)

  166. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  167. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  168. at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88)

  169. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  170. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  171. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  172. at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)

  173. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  174. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  175. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  176. at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)

  177. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  178. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  179. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  180. at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:94)

  181. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  182. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  183. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  184. at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114)

  185. at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104)

  186. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  187. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  188. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  189. at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)

  190. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  191. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  192. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  193. at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)

  194. at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)

  195. at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)

  196. at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)

  197. at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)

  198. at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)

  199. at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)

  200. at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

  201. at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)

  202. at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)

  203. at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)

  204. at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)

  205. at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)

  206. at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

  207. at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

  208. at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)

  209. at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)

  210. at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)

  211. at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)

  212. at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)

  213. at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

  214. at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)

  215. at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)

  216. at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)

  217. at io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)

  218. at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)

  219. at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

  220. at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

  221. at java.lang.Thread.run(Unknown Source)


  222. 2021-04-15 15:53:14.442 ERROR 1 --- [ XNIO-1 task-72] io.undertow.request                      : UT005023: Exception handling request to /elevatorbaseinfo/export-elevatorInfo


  223. org.springframework.web.util.NestedServletException: Request processing failed; nested exception is com.alibaba.excel.exception.ExcelGenerateException: java.lang.NoClassDefFoundError: sun.awt.X11FontManager (initialization failure)

  224. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)

  225. at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)

  226. at javax.servlet.http.HttpServlet.service(HttpServlet.java:645)

  227. at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)

  228. at javax.servlet.http.HttpServlet.service(HttpServlet.java:750)

  229. at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)

  230. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129)

  231. at com.github.xiaoymin.knife4j.spring.filter.ProductionSecurityFilter.doFilter(ProductionSecurityFilter.java:53)

  232. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  233. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  234. at com.github.xiaoymin.knife4j.spring.filter.SecurityBasicAuthFilter.doFilter(SecurityBasicAuthFilter.java:90)

  235. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  236. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  237. at org.springblade.core.tool.request.BladeRequestFilter.doFilter(BladeRequestFilter.java:49)

  238. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  239. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  240. at org.springblade.core.log.filter.LogTraceFilter.doFilter(LogTraceFilter.java:39)

  241. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  242. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  243. at org.springframework.boot.actuate.web.trace.servlet.HttpTraceFilter.doFilterInternal(HttpTraceFilter.java:88)

  244. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  245. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  246. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  247. at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)

  248. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  249. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  250. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  251. at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)

  252. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  253. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  254. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  255. at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:94)

  256. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  257. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  258. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  259. at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.filterAndRecordMetrics(WebMvcMetricsFilter.java:114)

  260. at org.springframework.boot.actuate.metrics.web.servlet.WebMvcMetricsFilter.doFilterInternal(WebMvcMetricsFilter.java:104)

  261. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  262. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  263. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  264. at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)

  265. at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:119)

  266. at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61)

  267. at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131)

  268. at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84)

  269. at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)

  270. at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68)

  271. at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)

  272. at io.undertow.servlet.handlers.RedirectDirHandler.handleRequest(RedirectDirHandler.java:68)

  273. at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:132)

  274. at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)

  275. at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

  276. at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)

  277. at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)

  278. at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)

  279. at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)

  280. at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)

  281. at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

  282. at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)

  283. at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:269)

  284. at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:78)

  285. at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:133)

  286. at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:130)

  287. at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)

  288. at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)

  289. at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)

  290. at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:78)

  291. at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:99)

  292. at io.undertow.server.Connectors.executeRootHandler(Connectors.java:376)

  293. at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)

  294. at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

  295. at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

  296. at java.lang.Thread.run(Unknown Source)

  297. Caused by: com.alibaba.excel.exception.ExcelGenerateException: java.lang.NoClassDefFoundError: sun.awt.X11FontManager (initialization failure)

  298. at com.alibaba.excel.write.ExcelBuilderImpl.addContent(ExcelBuilderImpl.java:64)

  299. at com.alibaba.excel.ExcelWriter.write(ExcelWriter.java:161)

  300. at com.alibaba.excel.ExcelWriter.write(ExcelWriter.java:146)

  301. at com.alibaba.excel.write.builder.ExcelWriterSheetBuilder.doWrite(ExcelWriterSheetBuilder.java:61)

  302. at org.springblade.core.excel.util.ExcelUtil.export(ExcelUtil.java:137)

  303. at org.springblade.modules.elevatorbase.controller.ElevatorBaseinfoController.exportRegion(ElevatorBaseinfoController.java:246)

  304. at org.springblade.modules.elevatorbase.controller.ElevatorBaseinfoController$$FastClassBySpringCGLIB$$cc998b00.invoke(<generated>)

  305. at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)

  306. at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:752)

  307. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)

  308. at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)

  309. at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)

  310. at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)

  311. at org.springblade.modules.elevatorbase.controller.ElevatorBaseinfoController$$EnhancerBySpringCGLIB$$aab172c2.exportRegion(<generated>)

  312. at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  313. at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

  314. at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

  315. at java.lang.reflect.Method.invoke(Unknown Source)

  316. at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:190)

  317. at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:138)

  318. at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:105)

  319. at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:892)

  320. at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)

  321. at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)

  322. at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1040)

  323. at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:943)

  324. at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)

  325. ... 72 common frames omitted

  326. Caused by: java.lang.NoClassDefFoundError: sun.awt.X11FontManager (initialization failure)

  327. at java.lang.J9VMInternals.initializationAlreadyFailed(Unknown Source)

  328. at java.lang.Class.forNameImpl(Native Method)

3条回答
  • 你检查下服务器上是否缺少文件所需要的字体。

    0 讨论(0)
  • 2021-04-16 14:25

    是的 已经解决了 ,缺少字体

    解决方法:

        在打镜像的时候,加入以下代码到 dockerfile(你要做导出的业务功能jar包),供其他小伙伴参考

        

    echo e http:mirrorsustceducnalpinev3mainetcapkrepositories
    
    LANG en_USUTF-8
    apk add update ttf-dejavu fontconfig rm rf varcacheapk

       附一张图吧,复制上去有些不显示

    daochu.png


        注:经过测试,直接通过yum  安装 下面字体没有用,需要按照上面的操作,当然可能还有其他的,操作方式,仅供小伙伴参考

    ttf-dejavu fontconfig


    0 讨论(0)
  • 2021-05-21 11:46

    补充一下,除了楼上基于原生镜像安装字体的方案外,BladeX 官方最近提供了已经包含字体的镜像版本,Dockerfile改成如下配置就行了,启动后自带字体

    FROM bladex/alpine-java:openjdk8-openj9_cn_slim


    0 讨论(0)
提交回复