一、问题描述
SEVERE: Servlet [InitServlet] in web application [] threw load() exception
java.lang.UnsatisfiedLinkError:/payment/tomcats/tomcat-payment-gateway/lib/libjnotify.so:/lib64/libc.so.6:version`GLIBC_2.12’not found (required by /payment/tomcats/tomcat-payment-gateway/lib/libjnotify.so)
二、解决办法
###方法一:重新编译jnotify生成libjnotify.so
1、使用[strings /lib64/libc.so.6 | grep GLIBC] 查看支持系统中的GLIBC版本
[email protected]:~/tomcats/tomcat-payment-gateway/logs>
strings /lib64/libc.so.6 | grep GLIBC
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_PRIVATE
发现系统的glibc比较老旧,最新的为GLIBC_2.11。
2、为了安全和稳定起见,自己编译jnotify的代码生成libjnotify.