博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Unable to load the Wrapper's native library because none of the following files及解决方法
阅读量:5915 次
发布时间:2019-06-19

本文共 4055 字,大约阅读时间需要 13 分钟。

在有几个应用中,在启动的时候发现下列警告:

The version of the script (3.5.29) doesn't match the version of this Wrapper (3.5.27). This might cause some problems

--> Wrapper Started as Daemon
Java Service Wrapper Community Edition 64-bit 3.5.27
Copyright (C) 1999-2015 Tanuki Software, Ltd. All Rights Reserved.
http://wrapper.tanukisoftware.com

Launching a JVM...

WrapperManager: Initializing...
WrapperManager:
WrapperManager: WARNING - Unable to load the Wrapper's native library because none of the
WrapperManager: following files:
WrapperManager: libwrapper-linux-x86-64.so
WrapperManager: libwrapper.so
WrapperManager: could be located on the following java.library.path:
WrapperManager: /data/src/osm-route/bin/../lib
WrapperManager: Please see the documentation for the wrapper.java.library.path
WrapperManager: configuration property.
WrapperManager: System signals will not be handled correctly.
WrapperManager:
17-02-04 11:26:13.164 INFO WrapperSimpleAppMain org.springframework.context.support.AbstractApplicationContext.prepareRefresh(AbstractApplicationContext.java:578): Refreshing org.springframework.context.suppor
t.ClassPathXmlApplicationContext@6ca9bb2b: startup date [Sat Feb 04 11:26:13 CST 2017]; root of context hierarchy

 但是,程序是可以正常起来的(如果不能起来,则多半不是因为缺少上面两个so之一的原因)。

于是,笔者再看了下几个其他应用的lib,如下:

[root@iZ23nn1p4mjZ lib]# ll

total 344
-rw-r--r-- 1 root root 44664 Jan 16 13:35 libwrapper.so
-rw-r--r-- 1 root root 67882 Jan 16 13:35 wrapperdemo.jar
-rw-r--r-- 1 root root 124041 Jan 16 13:35 wrapper.jar
-rw-r--r-- 1 root root 106706 Jan 16 13:35 wrappertest.jar
[root@iZ23nn1p4mjZ lib]# cd ../../osm-all/lib
[root@iZ23nn1p4mjZ lib]# ll
total 344
-rw-r--r-- 1 root root 44664 Jan 16 13:35 libwrapper.so
-rw-r--r-- 1 root root 67882 Jan 16 13:35 wrapperdemo.jar
-rw-r--r-- 1 root root 124041 Jan 16 13:35 wrapper.jar
-rw-r--r-- 1 root root 106706 Jan 16 13:35 wrappertest.jar
[root@iZ23nn1p4mjZ lib]# cd ../../osm-route/lib
[root@iZ23nn1p4mjZ lib]# ll
total 632
-rw-r--r-- 1 root root 67882 Jan 16 13:35 wrapperdemo.jar
-rw-r--r-- 1 root root 337176 Jan 16 13:35 wrapper.dll
-rw-r--r-- 1 root root 124041 Jan 16 13:35 wrapper.jar
-rw-r--r-- 1 root root 106706 Jan 16 13:35 wrappertest.jar
[root@iZ23nn1p4mjZ lib]# cd ../../osm-trade/lib
[root@iZ23nn1p4mjZ lib]# ll
total 344
-rw-r--r-- 1 root root 44664 Jan 16 13:35 libwrapper.so
-rw-r--r-- 1 root root 67882 Jan 16 13:35 wrapperdemo.jar
-rw-r--r-- 1 root root 124041 Jan 16 13:35 wrapper.jar
-rw-r--r-- 1 root root 106706 Jan 16 13:35 wrappertest.jar

其中一个确实没有libwrapper.so,再看下这个so的作用,如下:

The Java component of Java Service Wrapper requires that a native library be loaded to be able to handle system signals and perform other functions which are not possible using the Java API. This property allows the name of the library to be modified to suit the needs of a particular application. In general, most users should not need to use this property.

The Java language specifies some rules about how Java Native Libraries (JNI) can be named. The Wrapper's library is no exception and must follow these naming conventions.

To explain this, we will use the default base name "wrapper" as an example.

Example:
wrapper.native_library=wrapper
  • On Windows systems, the library file name will be "wrapper.dll".
  • On Mac OSX systems, the library file name will be "libwrapper.jnilib".
  • And on all other Linux/UNIX platforms, the library file name will be "libwrapper.so".

If this property is given any other value, that base-name will be used to construct the actual name of the native library file using the above rules.

Library Path:

Regardless of the name specified, the native library must be located within a directory specified using the property.

Platform specific native libraries:

The Wrapper also provides a facility to make it easy to create binary distributions that run on any platform, even if the application makes use of native libraries. In detail, see the .

所以,其实libwrapper其实是处理平台相关的一些信号的,比如kill -N的个中含义。并不影响其本身,当然最好是应该有的。万一不见了的话,可以从官网http://wrapper.tanukisoftware.com/doc/english/download.jsp下载对应版本放进去就可以了。

 

转载地址:http://itgpx.baihongyu.com/

你可能感兴趣的文章
Activiti 流程启动及节点流转源码分析
查看>>
Android多点触控手势基础
查看>>
js事件绑定
查看>>
MySQL manager or server PID file could not be found! 的方法
查看>>
webstorm 快捷键
查看>>
一种基于主板BIOS的身份认证方案及实现
查看>>
一台机器同时部署运行多个Tomcat
查看>>
Yii 前后台分离 demo
查看>>
CYQ.Data 轻量数据访问层(二) 构造数据单元(上)
查看>>
【java设计模式】之 工厂(Factory)模式
查看>>
常用MySQL命令整理
查看>>
DELL 服务器如何升级固件和收集日志信息的
查看>>
mysql主从demo配置
查看>>
【笔记】Hadoop安装部署
查看>>
C技巧:结构体参数转成不定参数
查看>>
解读Secondary NameNode的功能
查看>>
关于“构造函数”中的几个小问题,也许面试会问到哦~
查看>>
UVa 10010 Where's Waldorf?
查看>>
【经验总结】毁三观的 script.onerror
查看>>
Oracle system identifier(SID) "xxx" alread exits. Specify another SID
查看>>