Hello,
I had a similar problem, did a try a chmod 755 ?
David Marshall wrote:
I'm not doing a System.loadLibrary. The library is needed by a
third-party jar that I am using. SInce it works from within Eclipse I
know that their jar and the shared object (.so file) work correctly
together
I understand that if the .so library fails to load, it will also be
UnsatisfiedLinkError. I do not know (haven't tested), whether the
error text will be the same.
If some required system libraries cannot be found, the library does
not load. Those system libraries are loaded from LD_LIBRARY_PATH.
Solved!
I found the source of the problem after following your links below.
Not only do you need to place the jar file in the tomcat/shared/lib
folder, you need to place the .so there and then adjust the
java.library.path
on JAVA_OPTS to point there. My .so was originally living in a
Using Tomcat 5.5 on Linux.
I've set my environment variable with export
JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
After restarting tomcat and hitting my servlet (which depends on the .so
file in the folder above) I get an UnsatisfiedLinkError no X found in
I believe there is a
-Djava.awt.headless=true
or something like that, so that it doesn't try to load your X windows
environment
Filip
David Marshall wrote:
Using Tomcat 5.5 on Linux.
I've set my environment variable with export
JAVA_OPTS='-Djava.library.path=/path/to/my/sharedobjectfolder'
Filip :
Thanks. I didn't literally mean X. The library it won't load is
called Netica. I just changed it to X to be more general. I hope I'm
not just creating confusion for everyone.
thanks
dm
Filip Hanik - Dev Lists wrote:
I believe there is a
-Djava.awt.headless=true
or something
yeah, changing the error message wont help anyone, especially yourself :)
make sure that your -D parameter actually took in effect, and that you
didn't put it in the wrong place. easiest way to check, have a JSP print
out the system property for you
Filip
David Marshall wrote:
Filip :
and that your library is valid, and that you are calling
System.loadLibrary with the correct name
Filip
David Marshall wrote:
Filip :
Thanks. I didn't literally mean X. The library it won't load is
called Netica. I just changed it to X to be more general. I hope
I'm not just
I'm not doing a System.loadLibrary. The library is needed by a
third-party jar that I am using. SInce it works from within Eclipse I
know that their jar and the shared object (.so file) work correctly
together and that the shared object is indeed in the correct location on
library path.
Is your third-party jar placed into the shared libraries folder as it should be?
See
http://wiki.apache.org/tomcat/HowTo#head-a4b7185ee95d0cf14a48f92c08d1eb66b561139d
http://forum.java.sun.com/thread.jspa?threadID=780109
See also
http://java.sun.com/docs/books/jni/html/design.html
chapters
Yes. its in TOMCAT_HOME/shared/lib
Konstantin Kolinko wrote:
Is your third-party jar placed into the shared libraries folder as it should be?
See
http://wiki.apache.org/tomcat/HowTo#head-a4b7185ee95d0cf14a48f92c08d1eb66b561139d
http://forum.java.sun.com/thread.jspa?threadID=780109
See also
I have tried editing the tomcat scripts (catalina.sh) to set JAVA_OPTS
in there and it didn't solve the problem.
Currently I set the JAVA_OPTS in my user .bashrc and .bash_profile. So
when I run the startup script the user is me ( I have to run the script with
sudo). I'm verifying that
The results of printing System.getProperty(java.library.path) in the
jsp does show the correct path to my shared object
Looking forward to your results with JSP.
2007/10/17, David Marshall [EMAIL PROTECTED]:
I'm not doing a System.loadLibrary. The library is needed by a
third-party
Does the native library consist of a single .so file, or there are several ones?
See the second NOTE MEG here:
http://wrapper.tanukisoftware.org/doc/english/prop-java-library-path-n.html
It is about requirements for LD_LIBRARY_PATH if there are several libraries.
Does your printenv mention the
14 matches
Mail list logo