Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Bug with Excel Export, Java 11 and Linux without fonts (RedHat)

    Hi isomorfic,


    We do have a problem with Java 11. JDK11 is no longer providing fonts (https://www.oracle.com/technetwork/j...ml#JDK-8191522).
    And our OS (linux RedHat) is without fonts and we cannot install them, because of limited access on client site Servers.

    Web application runs on:
    Java 11.0.3 - OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.3+7)
    Tomcat 8.5.38,
    Red Hat Enterprise Linux Server 7.7 (no access to other files then Web Application)
    SmartGWT 12 PRO - v12.0p_2020-02-26/Pro Deployment 2020-02-26

    Problem is with Excel Export, excel file is created, but empty and we get this error:

    2020/03/26 20:33:08.373 | java.lang.ClassCastException: class sun.font.CompositeFont cannot be cast to class sun.font.PhysicalFont (sun.font.CompositeFont and sun.font.PhysicalFont are in module java.desktop of loader 'bootstrap')
    2020/03/26 20:33:08.373 | at java.desktop/sun.font.SunFontManager.getDefaultPhysicalFont(SunFontManager.java:1086)
    2020/03/26 20:33:08.373 | at java.desktop/sun.font.SunFontManager.initialiseDeferredFont(SunFontManager.java:965)
    2020/03/26 20:33:08.373 | at java.desktop/sun.font.SunFontManager.findOtherDeferredFont(SunFontManager.java:903)
    2020/03/26 20:33:08.373 | at java.desktop/sun.font.SunFontManager.findDeferredFont(SunFontManager.java:919)
    2020/03/26 20:33:08.373 | at java.desktop/sun.font.SunFontManager.findFont2D(SunFontManager.java:2120)
    2020/03/26 20:33:08.373 | at java.desktop/java.awt.Font.getFont2D(Font.java:506)
    2020/03/26 20:33:08.373 | at java.desktop/java.awt.Font.canDisplayUpTo(Font.java:2246)
    2020/03/26 20:33:08.373 | at java.desktop/java.awt.font.TextLayout.singleFont(TextLayout.java:469)
    2020/03/26 20:33:08.373 | at java.desktop/java.awt.font.TextLayout.<init>(TextLayout.java:530)
    2020/03/26 20:33:08.373 | at org.apache.poi.ss.util.SheetUtil.getDefaultCharWidth(SheetUtil.java:275)
    2020/03/26 20:33:08.374 | at org.apache.poi.xssf.streaming.AutoSizeColumnTracker.<init>(AutoSizeColumnTracker.java:117)
    2020/03/26 20:33:08.374 | at org.apache.poi.xssf.streaming.SXSSFSheet.<init>(SXSSFSheet.java:82)
    2020/03/26 20:33:08.374 | at org.apache.poi.xssf.streaming.SXSSFWorkbook.createAndRegisterSXSSFSheet(SXSSFWorkbook.java:658)
    2020/03/26 20:33:08.374 | at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:650)
    2020/03/26 20:33:08.374 | at org.apache.poi.xssf.streaming.SXSSFWorkbook.createSheet(SXSSFWorkbook.java:90)
    2020/03/26 20:33:08.374 | at com.isomorphic.rpc.ExcelDataExport.getExportObject(ExcelDataExport.java:404)
    2020/03/26 20:33:08.374 | at com.isomorphic.rpc.DataExport.exportResultSet(DataExport.java:647)
    2020/03/26 20:33:08.374 | at com.isomorphic.rpc.DataExport.exportResultSet(DataExport.java:452)
    2020/03/26 20:33:08.374 | at com.isomorphic.rpc.RPCManager.completeResponse(RPCManager.java:1290)
    2020/03/26 20:33:08.374 | at com.isomorphic.rpc.RPCManager.send(RPCManager.java:723)
    2020/03/26 20:33:08.374 | at com.isomorphic.servlet.IDACall.processRPCTransaction(IDACall.java:183)
    2020/03/26 20:33:08.374 | at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:148)
    2020/03/26 20:33:08.374 | at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119)
    2020/03/26 20:33:08.374 | at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79)
    2020/03/26 20:33:08.374 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:661)
    2020/03/26 20:33:08.374 | at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:176)
    2020/03/26 20:33:08.374 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    2020/03/26 20:33:08.374 | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    2020/03/26 20:33:08.374 | at com.niku.union.web.filter.ResponseHeaders.doFilter(ResponseHeaders.java:73)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    2020/03/26 20:33:08.374 | at com.niku.union.web.filter.ResponseSecurityHeaders.doFilter(ResponseSecurityHeaders.java:158)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    2020/03/26 20:33:08.374 | at com.niku.union.web.filter.ClarityContentFilter.doFilter(ClarityContentFilter.java:153)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    2020/03/26 20:33:08.374 | at com.niku.union.web.filter.XSSFilter.doFilter(XSSFilter.java:88)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    2020/03/26 20:33:08.374 | at com.niku.union.web.filter.TenantSetupFilter.doFilter(TenantSetupFilter.java:55)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    2020/03/26 20:33:08.374 | at com.niku.union.web.filter.CharsetFilter.doFilter(CharsetFilter.java:45)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    2020/03/26 20:33:08.374 | at org.apache.catalina.filters.AddDefaultCharsetFilter.doFilter(AddDefaultCharsetFilter.java:89)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
    2020/03/26 20:33:08.374 | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:493)
    2020/03/26 20:33:08.374 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
    2020/03/26 20:33:08.374 | at com.niku.union.web.valves.ErrorPageRedirectValve.invoke(ErrorPageRedirectValve.java:63)
    2020/03/26 20:33:08.374 | at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:650)
    2020/03/26 20:33:08.375 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
    2020/03/26 20:33:08.375 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
    2020/03/26 20:33:08.375 | at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:800)
    2020/03/26 20:33:08.375 | at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    2020/03/26 20:33:08.375 | at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
    2020/03/26 20:33:08.375 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
    2020/03/26 20:33:08.375 | at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
    2020/03/26 20:33:08.375 | at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    2020/03/26 20:33:08.375 | at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    2020/03/26 20:33:08.375 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    2020/03/26 20:33:08.375 | at java.base/java.lang.Thread.run(Thread.java:834)
    2020/03/26 20:33:08.375 | WARNING: An illegal reflective access operation has occurred
    2020/03/26 20:33:08.375 | WARNING: Illegal reflective access by org.apache.poi.util.DocumentHelper (file:/opt/CA/tclarity/clarity/lib/poi-ooxml.jar) to method com.sun.org.apache.xerces.internal.util.SecurityManager.setEntityExpansionLimit(int)
    2020/03/26 20:33:08.375 | WARNING: Please consider reporting this to the maintainers of org.apache.poi.util.DocumentHelper
    2020/03/26 20:33:08.375 | WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    2020/03/26 20:33:08.375 | WARNING: All illegal access operations will be denied in a future release

    Our main Web application (in which is integrated SmartGWT module via iframe) relays on the same POI 3.17 libs (for excel export), and it is implemented to do not depend on JDK fonts (or OS fonts).

    Please fix this.

    #2
    Sorry, what are you asking us to fix here? Fix the fact that POI no longer runs on OpenJDK11 + Redhat?

    Or are you saying you printed output uses fonts that OpenJDK11 + Redhat don't support? If so, our product already offers the ability to use a print-specific stylesheet (see docs) so you can remove any font references that aren't installed on your OS.

    Comment

    Working...
    X