反馈已提交

网络繁忙

You are viewing 5.1 help doc. More details are displayed in the latest help doc.

Export Excel Error

  • Recent Updates: April 25, 2022
  • 1. java.lang.NullPointerException

    1.1 Problem phenomenon

    After the dashboard component is exported to Excel, open Excel to report an error: errorCode: 500, errorMsg: java.lang.NullPointerException, as shown in the following figure:

    1 (1).png

    Check the FineBI log %FineBI%/logs/fanruan.log, the corresponding error is as follows:

    java.lang.NullPointerException
    at sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1264)
    at sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:219)
    at sun.awt.FontConfiguration.init(FontConfiguration.java:107)
    at sun.awt.X11FontManager.createFontConfiguration(X11FontManager.java:774)
    at sun.font.SunFontManager$2.run(SunFontManager.java:431)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.font.SunFontManager.<init>(SunFontManager.java:376)
    at sun.awt.FcFontManager.<init>(FcFontManager.java:35)
    at sun.awt.X11FontManager.<init>(X11FontManager.java:57)
    at sun.reflect.GeneratedConstructorAccessor654.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:83)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
    at java.awt.Font.getFont2D(Font.java:491)
    at java.awt.Font.canDisplayUpTo(Font.java:2060)
    at java.awt.font.TextLayout.singleFont(TextLayout.java:470)
    at java.awt.font.TextLayout.<init>(TextLayout.java:531)
    at com.fr.third.v2.org.apache.poi.ss.util.SheetUtil.getDefaultCharWidth(SheetUtil.java:254)

    1.2 Cause analysis

    This error is caused by the fact that the Linux system does not have relevant font resources, and a font manager needs to be installed for the system.

    1.3 Solution

    Execute the following command in Linux to install font management:

    yum install fontconfig

    If you use docker to make a base image, run the following command:

    RUN yum -y install fontconfig

    RUN fc-cache--forc

    2. java.lang.IllegalArgumentException: The workbook already contains a sheet of this name

    2.1 Problem phenomenon

    Export Excel and open Excel. And the following error is reported:

    2 (1).png

    2.2 Cause analysis

    The naming rules for sheets in Excel are as follows:

    1) The sheet name cannot be more than 31 (including English, Chinese characters, |, (), etc., but not including: , /,?, *, [], etc.). When the poi tool is used in the program to generate, if the input is greater than a string of 31 lengths, it will be automatically intercepted. Therefore, it will cause the two names to become the same, and an exception of the sheet with the same name will occur.

    2) The sheet name cannot be empty, and an error will be reported if it is empty.

    2.3 Solution

    Modify the component name and the corresponding length to make it conform to the excel naming rules.

    3. Could not initialize class sun.awt.X11GraphicsEnvironment

    3.1 Problem phenomenon

    Export to Excel under Linux environment fails, check the log or press F12 to enter the console, and an error message appears:

    Could not initialize class sun.awt.X11GraphicsEnvironment

    3.2 Cause analysis

    Under Linux, when the dashboard is exported to Excel, the Java image package will be used to process the images. The Java virtual machine needs local x-server support when processing images, if not, the error will appear.

    3.3 Solution

    3.3.1 FineBI directly installed

    Find the finebi.vmoption file under the path %FineBI5.1%\bin, add -Djava.awt.headless=true in the file, and save the file. As shown below:

    3 (1).png

    3.3.2 FineBI deployed to Tomcat

    Enter the %Tomcat%/bin directory, find and edit the configuration file catalina.sh, add the -Djava.awt.headless=true parameter, see: Export Excel settings for details.

    4.com.finebi.common.exception.execute.FineOutOfMaxRowException: out of row restriction: xxxxxxx

    4.1 Problem phenomenon

    Export Excel, open Excel and the following error was reported:

    4 (1).png

    4.2 Cause analysis

    The exported Excel data volume exceeds the data limit.

    4.3 Solution

    • Reduce the amount of exported data through filtering and other methods.

    • Contact the administrator to modify the parameter value of the Excel export data limit, as shown in the following figure:

    5 (1).png

    The configuration can be modified according to the current server performance and the recommended modification range. For details, see: FineBI server configuration recommendations.

    Attachment List


    Theme: Build Charts and Analyze data
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    售前咨询电话

    400-811-8890转1

    在线技术支持

    在线QQ:800049425

    热线电话:400-811-8890转2

    总裁办24H投诉

    热线电话:173-1278-1526

    文 档反 馈

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    10s后关闭