My JSP program is set to run on Websphere under HP-UX.
I have some .jar files and a .so file which contains classes that my program needs to run.
By placing my .jar files into `\MyProgram\WEB-INF\lib\` folder, I was able to get some to work.
However, I see an `UnsatisfiedLinkError` which is caused by my lib.so file not being recognised.
One of the ways I found was:
1. In Administrative Console, go to Environment -> Shared Libraries -> New
2. Enter the .jar file locations into Classpath, enter the .so file location into Native Library Path
3. In Administrative Console, go to Applications -> Application Types -> Enterprise Applications
4. Under MyProgram -> Shared library references -> Shared Library Mapping, assign the library to the program by moving it from Available to Selected.
I have two questions:
1. Can I just get the .jar files and the .so file to work from my program's `\lib\` folder instead?
2. If I can't, is it possible to list the classpath and native library path from my application folder? Something like uploading my application.war with a websphere variable directory `%MYPROGRAM%\WEB-INF\lib\lib.so` rather than placing the file in the physical server with an absolute path `C:\IBM\WebSphere\AppServer\bin\lib.so`?
[EDIT-01] Further details below:
> Error received: "Error 500: java.lang.UnsatisfiedLinkError: com.chrysalisits.crypto.LunaAPI.Initialize()V"
I am trying to get Websphere to interface with LunaSA HSM to retrieve public/private keys. They have provided me with: *libLunaAPI.sl, libLunaAPI.so, LunaJCASP.jar, LunaJCESP.jar*. From IBM's Websphere V8 -> References -> Class Loading Exceptions, it indicates that I need the *.so file for HP-UX so I did that [accordingly]. The path set are absolute paths which I have specified in the Websphere. This relates to my second question.
The first question is me actually wondering whether I can put these files into myProgram.war and run off from there instead of using WinSCP to access the server and putting files there for absolute paths references. Perhaps specify that the above mentioned files are located in my program, under \WEB-INF\lib\ instead. This is because only this program of mine will be accessing the LunaSA HSM.
** PS. I tried both methods but it still fails. sigh.
: http://i49.tinypic.com/292u445.jpg From the WebSphere documentation (at least through version 7; I haven't looked beyond that), it does appear that Native Libraries can only be loaded from the system PATH or from a Shared Library. That is, not from an individual Web Application's deployed path. I don't think I understand your question 2.
以上就是Loading *.so files into Websphere的详细内容，更多请关注web前端其它相关文章！