Search code examples
oracle-databasetomcatunsatisfiedlinkerror

java.lang.UnsatisfiedLinkError: ... libocijdbc12.so: libclntsh.so.12.1: cannot enable executable stack as shared object requires: Permission denied


After updating Tomcat on the server

Updated     tomcat-7.0.69-11.el7_3.noarch                              @rhel-7-server-rpms
Update             7.0.76-3.el7_4.noarch                               @rhel-7-server-rpms
Updated     tomcat-admin-webapps-7.0.69-11.el7_3.noarch                @rhel-7-server-rpms
Update                           7.0.76-3.el7_4.noarch                 @rhel-7-server-rpms
Updated     tomcat-el-2.2-api-7.0.69-11.el7_3.noarch                   @rhel-7-server-rpms
Update                        7.0.76-3.el7_4.noarch                    @rhel-7-server-rpms
Updated     tomcat-jsp-2.2-api-7.0.69-11.el7_3.noarch                  @rhel-7-server-rpms
Update                         7.0.76-3.el7_4.noarch                   @rhel-7-server-rpms
Updated     tomcat-lib-7.0.69-11.el7_3.noarch                          @rhel-7-server-rpms
Update                 7.0.76-3.el7_4.noarch                           @rhel-7-server-rpms
Updated     tomcat-servlet-3.0-api-7.0.69-11.el7_3.noarch              @rhel-7-server-rpms
Update                             7.0.76-3.el7_4.noarch               @rhel-7-server-rpms

I get the error: java.lang.UnsatisfiedLinkError: /usr/lib/oracle/12.1/client64/lib/libocijdbc12.so: libclntsh.so.12.1: cannot enable executable stack as shared object requires: Permission denied

The files in /usr/lib/oracle/12.1/client64/lib/ are readable (no execution permissions needed).

The server was working without any issues before this update (LD_LIBRARY_PATH, TNS_ADMIN, ORACLE_HOME are set).

A stand alone java application is working fine using the same Oracle client so the problem should be in Tomcat but I have no idea what to check.

Does anyone has some hints about what to look for?

[edit:] Disabling Selinux everything is fine. What settings do I have to set in Selinux to fix this?

Thanks in advance.


Solution

  • Seems like my problem was the Oracle Instant client 12.1. Reinstalling the 12.1 did not solved the problem but uninstalling the 12.1 client and installing the Instant client 12.2 did solved my problem without changing anything in SELinux.

    Hope this will help others.

    Regards!