Application problem read xlsx file in centos error: libgcc_s.so. 1: Wrong ELF class: ELFCLASS64

Asked

Viewed 48 times

1

I have a big problem and I can not solve tried to look for some tips on the internet but it did not work. That’s why I’m here and I was wondering if any of you could help me.

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

Well when I try to run the application, it gives the error below. Someone would know me 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)
  • Your VM is 32-bit?

  • Not my VM is 64bit

  • Would you know if your JVM (not your VM) is also 64-bit? Run a java -version on the console should show this.

  • the java -D32 command works and the java -d64 command does not work...so I see that it is the 32bits

  • java -d64: Error: This Java instance does not support a 64-bit JVM.

  • i have both Libraries installed in my Centos 32bits and 64bits, but even so it doesn’t work

  • @Andrévitor this site works different from a forum, do not need to put SOLVED in the title, just accept one of the answers or post your own (if the solution found is different), by clicking on V the left of the answer.

  • Thank you diegofm...

Show 3 more comments

1 answer

0


The problem

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

To uninstall old Java

To uninstall Java, according to that question, the command to be used would be sudo yum remove jdk, and in accordance with that other answer, would be sudo yum remove java. If you can’t or don’t 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 that other answer, you would use sudo yum install java-1.7.0-openjdk or else 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 else 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.

  • Could you tell me the command to remove the JVM 32 bits and the command to install the jvm 64bits?? I am not finding on the internet...thanks

  • @Andrévitor Reply edited.

  • Hello Victor, it really worked!!!!!! I installed the jdk 64 bits and it worked now my application runs that and a beauty...thank you so much for the ajida!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.