Problem for application reading xlsx file in centos error: libgcc_s.so.1: wrong ELF class: ELFCLASS64

1

I have a big problem and I can not solve it I tried to look for some tips on the internet but it did not work. So here I am and would like to know if anyone can help me.

I have a web application that is hosted in a VM CENTS. One of the functions of this application reads an excel file that is in some directory within the centos (example: /tmp/folder/file.xlsx ).

Good when I try to run the application, it gives the error below. Would anyone know how to solve this problem?

Thank you!

Message: /opt/jdk1.7.0_79/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: wrong ELF class: ELFCLASS64
StackTrace: java.lang.UnsatisfiedLinkError:/opt/jdk1.7.0_79/jre/lib/i386/libfontmanager.so: libgcc_s.so.1: wrong ELF class: ELFCLASS64
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1872)
at java.lang.Runtime.loadLibrary0(Runtime.java:849)
at java.lang.System.loadLibrary(System.java:1088)
at sun.font.FontManagerNativeLibrary$1.run(FontManagerNativeLibrary.java:61)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerNativeLibrary.(FontManagerNativeLibrary.java:32)
at sun.font.SunFontManager$1.run(SunFontManager.java:339)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.SunFontManager.(SunFontManager.java:335)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at sun.font.FontManagerFactory$1.run(FontManagerFactory.java:82)
at java.security.AccessController.doPrivileged(Native Method)
at sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
at java.awt.Font.getFont2D(Font.java:490)
at java.awt.Font.canDisplayUpTo(Font.java:2059)
    
asked by anonymous 15.11.2016 / 02:00

1 answer

0

The problem

Install a 64-bit JVM. Your JVM is 32-bit, but your library and your VM are 64-bit, so it's better to have the JVM also 64-bit because it's not worth having a headache with those differences.

To uninstall old Java

To uninstall Java, according to this question , the command to be used would be sudo yum remove jdk , and According to this other answer , it would be sudo yum remove java . If you can not or do not want to use yum for this then you can try sudo rpm -e jdk .

To install new Java

To install a new Java, according to this other answer , you would use sudo yum install java-1.7.0-openjdk or sudo yum install java-1.8.0-openjdk .

The other previous answer indicates using (changing the version number) rpm -Uvh jdk-7u79-linux-x64.rpm or rpm -Uvh jdk-7u80-linux-x64.rpm . If you prefer Java 8, I think the command would be rpm -Uvh jdk-8u102-linux-x64.rpm .

    
15.11.2016 / 02:56