Failed to find java on CentOS7

I install the libreoffice-headless on CentOS7, but when I run libreoffice --headless --convert-to pdf, I got this message

javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx
Error: source file could not be loaded

However, I do have java install

echo $JAVA_HOME
/workplace/software/jdk-11.0.2

below are details of installation. I have no idea how can I fix this and convert docx to pdf sucessfully.

$ sudo yum install libreoffice-headless
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.nju.edu.cn
 * centos-sclo-rh: mirrors.nju.edu.cn
 * centos-sclo-sclo: mirrors.nju.edu.cn
 * epel: mirror.nyist.edu.cn
 * extras: mirrors.nju.edu.cn
 * updates: mirrors.nju.edu.cn
http://yum.mariadb.org/10.2.40/centos7-amd64/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article 

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

Resolving Dependencies
--> Running transaction check
---> Package libreoffice-core.x86_64 1:5.3.6.1-25.el7_9 will be installed
--> Processing Dependency: libreoffice-x11(x86-64) = 1:5.3.6.1-25.el7_9 for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libreoffice-ure(x86-64) = 1:5.3.6.1-25.el7_9 for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libreoffice-opensymbol-fonts = 1:5.3.6.1-25.el7_9 for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libreoffice-langpack-en = 1:5.3.6.1-25.el7_9 for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libreoffice-gtk3(x86-64) = 1:5.3.6.1-25.el7_9 for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libreoffice-gtk2(x86-64) = 1:5.3.6.1-25.el7_9 for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libreoffice-data = 1:5.3.6.1-25.el7_9 for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_salhelpergcc3.so.3(UDK_3_0_0)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_salhelpergcc3.so.3(UDK_3.1)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_salhelpergcc3.so.3(LIBO_UDK_3.6)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(UDK_3_0_0)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(UDK_3.8)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(UDK_3.7)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(UDK_3.6)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(UDK_3.5)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(UDK_3.3)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(UDK_3.2)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(UDK_3.11)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(UDK_3.1)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(PRIVATE_1.1)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(LIBO_UDK_5.3)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(LIBO_UDK_5.2)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(LIBO_UDK_5.1)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(LIBO_UDK_5.0)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(LIBO_UDK_4.3)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(LIBO_UDK_4.2)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(LIBO_UDK_4.1)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(LIBO_UDK_4.0)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(LIBO_UDK_3.6)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3(LIBO_UDK_3.5)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(UDK_3_0_0)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(UDK_3.8)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(UDK_3.7)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(UDK_3.6)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(UDK_3.3)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(UDK_3.2)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(UDK_3.1)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(LIBO_UDK_5.3)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppuhelpergcc3.so.3(LIBO_UDK_3.9)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppu.so.3(UDK_3_0_0)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppu.so.3(UDK_3.3)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppu.so.3(UDK_3.1)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppu.so.3(LIBO_UDK_4.4)(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: liberation-serif-fonts for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: liberation-sans-fonts for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: google-crosextra-carlito-fonts for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: google-crosextra-caladea-fonts for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: dejavu-serif-fonts for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: dejavu-sans-mono-fonts for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libxmlreaderlo.so()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_salhelpergcc3.so.3()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_sal.so.3()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppuhelpergcc3.so.3()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libuno_cppu.so.3()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: librevenge-stream-0.0.so.0()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: librevenge-0.0.so.0()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: librdf.so.0()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libraptor2.so.0()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: liborcus-parser-0.12.so.0()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: liborcus-0.12.so.0()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libodfgen-0.1.so.1()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libneon.so.27()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libmythes-1.2.so.0()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libjvmfwklo.so()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libjvmaccesslo.so()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libi18nlangtag.so()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libhyphen.so.0()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libhunspell-1.3.so.0()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libgstvideo-1.0.so.0()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libgstpbutils-1.0.so.0()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libexttextcat-2.0.so.0()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libcmis-0.5.so.5()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libclucene-shared.so.1()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libclucene-core.so.1()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: libclucene-contribs-lib.so.1()(64bit) for package: 1:libreoffice-core-5.3.6.1-25.el7_9.x86_64
--> Running transaction check
---> Package clucene-contribs-lib.x86_64 0:2.3.3.4-11.el7 will be installed
---> Package clucene-core.x86_64 0:2.3.3.4-11.el7 will be installed
---> Package dejavu-sans-mono-fonts.noarch 0:2.33-6.el7 will be installed
---> Package dejavu-serif-fonts.noarch 0:2.33-6.el7 will be installed
---> Package google-crosextra-caladea-fonts.noarch 0:1.002-0.4.20130214.el7 will be installed
---> Package google-crosextra-carlito-fonts.noarch 0:1.103-0.2.20130920.el7 will be installed
---> Package gstreamer1-plugins-base.x86_64 0:1.10.4-2.el7 will be installed
--> Processing Dependency: libtheoraenc.so.1(libtheoraenc_1.0)(64bit) for package: gstreamer1-plugins-base-1.10.4-2.el7.x86_64
--> Processing Dependency: libtheoradec.so.1(libtheoradec_1.0)(64bit) for package: gstreamer1-plugins-base-1.10.4-2.el7.x86_64
--> Processing Dependency: iso-codes for package: gstreamer1-plugins-base-1.10.4-2.el7.x86_64
--> Processing Dependency: libvisual-0.4.so.0()(64bit) for package: gstreamer1-plugins-base-1.10.4-2.el7.x86_64
--> Processing Dependency: libtheoraenc.so.1()(64bit) for package: gstreamer1-plugins-base-1.10.4-2.el7.x86_64
--> Processing Dependency: libtheoradec.so.1()(64bit) for package: gstreamer1-plugins-base-1.10.4-2.el7.x86_64
--> Processing Dependency: liborc-0.4.so.0()(64bit) for package: gstreamer1-plugins-base-1.10.4-2.el7.x86_64
--> Processing Dependency: libopus.so.0()(64bit) for package: gstreamer1-plugins-base-1.10.4-2.el7.x86_64
--> Processing Dependency: libcdda_paranoia.so.0()(64bit) for package: gstreamer1-plugins-base-1.10.4-2.el7.x86_64
--> Processing Dependency: libcdda_interface.so.0()(64bit) for package: gstreamer1-plugins-base-1.10.4-2.el7.x86_64
--> Processing Dependency: libXv.so.1()(64bit) for package: gstreamer1-plugins-base-1.10.4-2.el7.x86_64
---> Package hunspell.x86_64 0:1.3.2-16.el7 will be installed
--> Processing Dependency: hunspell-en-US for package: hunspell-1.3.2-16.el7.x86_64
---> Package hyphen.x86_64 0:2.8.6-5.el7 will be installed
---> Package libcmis.x86_64 0:0.5.1-2.el7 will be installed
---> Package liberation-sans-fonts.noarch 1:1.07.2-16.el7 will be installed
---> Package liberation-serif-fonts.noarch 1:1.07.2-16.el7 will be installed
---> Package libexttextcat.x86_64 0:3.4.1-3.el7 will be installed
---> Package libodfgen.x86_64 0:0.1.4-1.el7 will be installed
---> Package liborcus.x86_64 0:0.12.1-2.el7 will be installed
---> Package libreoffice-data.noarch 1:5.3.6.1-25.el7_9 will be installed
---> Package libreoffice-gtk2.x86_64 1:5.3.6.1-25.el7_9 will be installed
---> Package libreoffice-gtk3.x86_64 1:5.3.6.1-25.el7_9 will be installed
--> Processing Dependency: gstreamer1(element-gtksink)()(64bit) for package: 1:libreoffice-gtk3-5.3.6.1-25.el7_9.x86_64
---> Package libreoffice-langpack-en.x86_64 1:5.3.6.1-25.el7_9 will be installed
--> Processing Dependency: mythes-en for package: 1:libreoffice-langpack-en-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: hyphen-en for package: 1:libreoffice-langpack-en-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: autocorr-en for package: 1:libreoffice-langpack-en-5.3.6.1-25.el7_9.x86_64
---> Package libreoffice-opensymbol-fonts.noarch 1:5.3.6.1-25.el7_9 will be installed
---> Package libreoffice-ure.x86_64 1:5.3.6.1-25.el7_9 will be installed
--> Processing Dependency: libreoffice-ure-common = 1:5.3.6.1-25.el7_9 for package: 1:libreoffice-ure-5.3.6.1-25.el7_9.x86_64
--> Processing Dependency: liblangtag.so.1()(64bit) for package: 1:libreoffice-ure-5.3.6.1-25.el7_9.x86_64
---> Package libreoffice-x11.x86_64 1:5.3.6.1-25.el7_9 will be installed
---> Package librevenge.x86_64 0:0.0.2-2.el7 will be installed
---> Package mythes.x86_64 0:1.2.3-7.el7 will be installed
---> Package neon.x86_64 0:0.30.0-4.el7 will be installed
--> Processing Dependency: libpakchois.so.0()(64bit) for package: neon-0.30.0-4.el7.x86_64
---> Package raptor2.x86_64 0:2.0.9-3.el7 will be installed
--> Processing Dependency: libyajl.so.2()(64bit) for package: raptor2-2.0.9-3.el7.x86_64
---> Package redland.x86_64 0:1.0.16-6.el7 will be installed
--> Processing Dependency: librasqal.so.3()(64bit) for package: redland-1.0.16-6.el7.x86_64
--> Running transaction check
---> Package autocorr-en.noarch 1:5.3.6.1-25.el7_9 will be installed
---> Package cdparanoia-libs.x86_64 0:10.2-17.el7 will be installed
---> Package gstreamer1-plugins-bad-free-gtk.x86_64 0:1.10.4-4.el7_9 will be installed
--> Processing Dependency: gstreamer1-plugins-bad-free = 1.10.4-4.el7_9 for package: gstreamer1-plugins-bad-free-gtk-1.10.4-4.el7_9.x86_64
--> Processing Dependency: libgstgl-1.0.so.0()(64bit) for package: gstreamer1-plugins-bad-free-gtk-1.10.4-4.el7_9.x86_64
---> Package hunspell-en-US.noarch 0:0.20121024-6.el7 will be installed
---> Package hyphen-en.noarch 0:2.8.6-5.el7 will be installed
---> Package iso-codes.noarch 0:3.46-2.el7 will be installed
---> Package libXv.x86_64 0:1.0.11-1.el7 will be installed
---> Package liblangtag.x86_64 0:0.6.2-1.1.el7 will be installed
---> Package libreoffice-ure-common.noarch 1:5.3.6.1-25.el7_9 will be installed
---> Package libtheora.x86_64 1:1.1.1-8.el7 will be installed
---> Package libvisual.x86_64 0:0.4.0-16.el7 will be installed
---> Package mythes-en.noarch 0:3.0-13.el7 will be installed
---> Package opus.x86_64 0:1.0.2-6.el7 will be installed
---> Package orc.x86_64 0:0.4.26-1.el7 will be installed
---> Package pakchois.x86_64 0:0.4-10.el7 will be installed
---> Package rasqal.x86_64 0:0.9.30-4.el7 will be installed
---> Package yajl.x86_64 0:2.0.4-4.el7 will be installed
--> Running transaction check
---> Package gstreamer1-plugins-bad-free.x86_64 0:1.10.4-4.el7_9 will be installed
--> Processing Dependency: libsrtp.so.0()(64bit) for package: gstreamer1-plugins-bad-free-1.10.4-4.el7_9.x86_64
--> Processing Dependency: libmpcdec.so.5()(64bit) for package: gstreamer1-plugins-bad-free-1.10.4-4.el7_9.x86_64
--> Processing Dependency: libdvdread.so.4()(64bit) for package: gstreamer1-plugins-bad-free-1.10.4-4.el7_9.x86_64
--> Processing Dependency: libdvdnav.so.4()(64bit) for package: gstreamer1-plugins-bad-free-1.10.4-4.el7_9.x86_64
--> Processing Dependency: libSoundTouch.so.1()(64bit) for package: gstreamer1-plugins-bad-free-1.10.4-4.el7_9.x86_64
--> Processing Dependency: libGLESv2.so.2()(64bit) for package: gstreamer1-plugins-bad-free-1.10.4-4.el7_9.x86_64
--> Running transaction check
---> Package libdvdnav.x86_64 0:5.0.3-1.el7 will be installed
---> Package libdvdread.x86_64 0:5.0.3-3.el7 will be installed
---> Package libglvnd-gles.x86_64 1:1.0.1-0.8.git5baa1e5.el7 will be installed
--> Processing Dependency: libglvnd(x86-64) = 1:1.0.1-0.8.git5baa1e5.el7 for package: 1:libglvnd-gles-1.0.1-0.8.git5baa1e5.el7.x86_64
--> Processing Dependency: libGLdispatch.so.0()(64bit) for package: 1:libglvnd-gles-1.0.1-0.8.git5baa1e5.el7.x86_64
---> Package libmpcdec.x86_64 0:1.2.6-12.el7 will be installed
---> Package libsrtp.x86_64 0:1.4.4-11.20101004cvs.el7 will be installed
---> Package soundtouch.x86_64 0:1.4.0-9.el7 will be installed
--> Running transaction check
---> Package libglvnd.x86_64 1:1.0.1-0.8.git5baa1e5.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

========================================================================================================
 Package                              Arch        Version                            Repository    Size
========================================================================================================
Installing:
 libreoffice-core                     x86_64      1:5.3.6.1-25.el7_9                 updates       73 M
Installing for dependencies:
 autocorr-en                          noarch      1:5.3.6.1-25.el7_9                 updates      180 k
 cdparanoia-libs                      x86_64      10.2-17.el7                        base          56 k
 clucene-contribs-lib                 x86_64      2.3.3.4-11.el7                     base          89 k
 clucene-core                         x86_64      2.3.3.4-11.el7                     base         528 k
 dejavu-sans-mono-fonts               noarch      2.33-6.el7                         base         433 k
 dejavu-serif-fonts                   noarch      2.33-6.el7                         base         776 k
 google-crosextra-caladea-fonts       noarch      1.002-0.4.20130214.el7             base          92 k
 google-crosextra-carlito-fonts       noarch      1.103-0.2.20130920.el7             base         813 k
 gstreamer1-plugins-bad-free          x86_64      1.10.4-4.el7_9                     updates      1.7 M
 gstreamer1-plugins-bad-free-gtk      x86_64      1.10.4-4.el7_9                     updates       26 k
 gstreamer1-plugins-base              x86_64      1.10.4-2.el7                       base         1.4 M
 hunspell                             x86_64      1.3.2-16.el7                       base         223 k
 hunspell-en-US                       noarch      0.20121024-6.el7                   base         190 k
 hyphen                               x86_64      2.8.6-5.el7                        base          26 k
 hyphen-en                            noarch      2.8.6-5.el7                        base          48 k
 iso-codes                            noarch      3.46-2.el7                         base         2.7 M
 libXv                                x86_64      1.0.11-1.el7                       base          18 k
 libcmis                              x86_64      0.5.1-2.el7                        base         513 k
 libdvdnav                            x86_64      5.0.3-1.el7                        base          48 k
 libdvdread                           x86_64      5.0.3-3.el7                        base          66 k
 liberation-sans-fonts                noarch      1:1.07.2-16.el7                    base         279 k
 liberation-serif-fonts               noarch      1:1.07.2-16.el7                    base         298 k
 libexttextcat                        x86_64      3.4.1-3.el7                        base         197 k
 libglvnd                             x86_64      1:1.0.1-0.8.git5baa1e5.el7         base          89 k
 libglvnd-gles                        x86_64      1:1.0.1-0.8.git5baa1e5.el7         base          34 k
 liblangtag                           x86_64      0.6.2-1.1.el7                      base         259 k
 libmpcdec                            x86_64      1.2.6-12.el7                       base          28 k
 libodfgen                            x86_64      0.1.4-1.el7                        base         223 k
 liborcus                             x86_64      0.12.1-2.el7                       base         380 k
 libreoffice-data                     noarch      1:5.3.6.1-25.el7_9                 updates      3.3 M
 libreoffice-gtk2                     x86_64      1:5.3.6.1-25.el7_9                 updates      279 k
 libreoffice-gtk3                     x86_64      1:5.3.6.1-25.el7_9                 updates      299 k
 libreoffice-langpack-en              x86_64      1:5.3.6.1-25.el7_9                 updates       50 k
 libreoffice-opensymbol-fonts         noarch      1:5.3.6.1-25.el7_9                 updates      226 k
 libreoffice-ure                      x86_64      1:5.3.6.1-25.el7_9                 updates      2.2 M
 libreoffice-ure-common               noarch      1:5.3.6.1-25.el7_9                 updates      487 k
 libreoffice-x11                      x86_64      1:5.3.6.1-25.el7_9                 updates      279 k
 librevenge                           x86_64      0.0.2-2.el7                        base         225 k
 libsrtp                              x86_64      1.4.4-11.20101004cvs.el7           base         275 k
 libtheora                            x86_64      1:1.1.1-8.el7                      base         136 k
 libvisual                            x86_64      0.4.0-16.el7                       base         138 k
 mythes                               x86_64      1.2.3-7.el7                        base          13 k
 mythes-en                            noarch      3.0-13.el7                         base         3.9 M
 neon                                 x86_64      0.30.0-4.el7                       base         166 k
 opus                                 x86_64      1.0.2-6.el7                        base         630 k
 orc                                  x86_64      0.4.26-1.el7                       base         166 k
 pakchois                             x86_64      0.4-10.el7                         base          14 k
 raptor2                              x86_64      2.0.9-3.el7                        base         206 k
 rasqal                               x86_64      0.9.30-4.el7                       base         262 k
 redland                              x86_64      1.0.16-6.el7                       base         164 k
 soundtouch                           x86_64      1.4.0-9.el7                        base          53 k
 yajl                                 x86_64      2.0.4-4.el7                        base          39 k

Transaction Summary
========================================================================================================
Installed:
  libreoffice-core.x86_64 1:5.3.6.1-25.el7_9                                                            

Dependency Installed:
  autocorr-en.noarch 1:5.3.6.1-25.el7_9                                                                 
  cdparanoia-libs.x86_64 0:10.2-17.el7                                                                  
  clucene-contribs-lib.x86_64 0:2.3.3.4-11.el7                                                          
  clucene-core.x86_64 0:2.3.3.4-11.el7                                                                  
  dejavu-sans-mono-fonts.noarch 0:2.33-6.el7                                                            
  dejavu-serif-fonts.noarch 0:2.33-6.el7                                                                
  google-crosextra-caladea-fonts.noarch 0:1.002-0.4.20130214.el7                                        
  google-crosextra-carlito-fonts.noarch 0:1.103-0.2.20130920.el7                                        
  gstreamer1-plugins-bad-free.x86_64 0:1.10.4-4.el7_9                                                   
  gstreamer1-plugins-bad-free-gtk.x86_64 0:1.10.4-4.el7_9                                               
  gstreamer1-plugins-base.x86_64 0:1.10.4-2.el7                                                         
  hunspell.x86_64 0:1.3.2-16.el7                                                                        
  hunspell-en-US.noarch 0:0.20121024-6.el7                                                              
  hyphen.x86_64 0:2.8.6-5.el7                                                                           
  hyphen-en.noarch 0:2.8.6-5.el7                                                                        
  iso-codes.noarch 0:3.46-2.el7                                                                         
  libXv.x86_64 0:1.0.11-1.el7                                                                           
  libcmis.x86_64 0:0.5.1-2.el7                                                                          
  libdvdnav.x86_64 0:5.0.3-1.el7                                                                        
  libdvdread.x86_64 0:5.0.3-3.el7                                                                       
  liberation-sans-fonts.noarch 1:1.07.2-16.el7                                                          
  liberation-serif-fonts.noarch 1:1.07.2-16.el7                                                         
  libexttextcat.x86_64 0:3.4.1-3.el7                                                                    
  libglvnd.x86_64 1:1.0.1-0.8.git5baa1e5.el7                                                            
  libglvnd-gles.x86_64 1:1.0.1-0.8.git5baa1e5.el7                                                       
  liblangtag.x86_64 0:0.6.2-1.1.el7                                                                     
  libmpcdec.x86_64 0:1.2.6-12.el7                                                                       
  libodfgen.x86_64 0:0.1.4-1.el7                                                                        
  liborcus.x86_64 0:0.12.1-2.el7                                                                        
  libreoffice-data.noarch 1:5.3.6.1-25.el7_9                                                            
  libreoffice-gtk2.x86_64 1:5.3.6.1-25.el7_9                                                            
  libreoffice-gtk3.x86_64 1:5.3.6.1-25.el7_9                                                            
  libreoffice-langpack-en.x86_64 1:5.3.6.1-25.el7_9                                                     
  libreoffice-opensymbol-fonts.noarch 1:5.3.6.1-25.el7_9                                                
  libreoffice-ure.x86_64 1:5.3.6.1-25.el7_9                                                             
  libreoffice-ure-common.noarch 1:5.3.6.1-25.el7_9                                                      
  libreoffice-x11.x86_64 1:5.3.6.1-25.el7_9                                                             
  librevenge.x86_64 0:0.0.2-2.el7                                                                       
  libsrtp.x86_64 0:1.4.4-11.20101004cvs.el7                                                             
  libtheora.x86_64 1:1.1.1-8.el7                                                                        
  libvisual.x86_64 0:0.4.0-16.el7                                                                       
  mythes.x86_64 0:1.2.3-7.el7                                                                           
  mythes-en.noarch 0:3.0-13.el7                                                                         
  neon.x86_64 0:0.30.0-4.el7                                                                            
  opus.x86_64 0:1.0.2-6.el7                                                                             
  orc.x86_64 0:0.4.26-1.el7                                                                             
  pakchois.x86_64 0:0.4-10.el7                                                                          
  raptor2.x86_64 0:2.0.9-3.el7                                                                          
  rasqal.x86_64 0:0.9.30-4.el7                                                                          
  redland.x86_64 0:1.0.16-6.el7                                                                         
  soundtouch.x86_64 0:1.4.0-9.el7                                                                       
  yajl.x86_64 0:2.0.4-4.el7                                                                             

Complete!

The java problem is most likely a red herring. This warning is often shown, but is usually not harmful. Your Error: source file could not be loaded is almost definitely related to another problem.

Thank you for your reply. But I am not every clear about why the file fail loading. Do you have some ideas? My file is just a normal docx file and can be opened in MSoffice.

Just try not a headless mode, but from the GUI. There are lots of reasons a failure can happen… Maybe post the file here…

I see, thank you. Because I use the centOS server so there is no GUI available.

I installed libreoffice-base just now, and I run the convert to pdf command again. I got new error:

javaldx: Could not find a Java Runtime Environment!
Warning: failed to read path from javaldx
unknown content type: image/png
unknown content type: image/jpeg
unknown content type: image/.jpg
unknown content type: image/tiff
unknown content type: application/vnd.openxmlformats-officedocument.customXmlProperties+xml
unknown content type: application/vnd.openxmlformats-officedocument.customXmlProperties+xml
unknown content type: application/vnd.openxmlformats-officedocument.custom-properties+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml
unknown content type: application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml
Error: source file could not be loaded

maybe the file could not loaded due to the unknown content?

It is up to distro maintainers to divide LibreOffice into gazillion of packages, and offer to users an opportunity to guess which specific set of the components will suffice for a given task. I bet that your installation is incomplete, even after libreoffice-base addition. But I have no idea what you might need - my take would be to just install everything.

I’ve tried yum install libreoffice

I guess that is everything. and that works! Thank you for you time telling me all this!! ;)