Forum OpenACS Q&A: Re: nsjava error : Unable to load libnsjava.so.

Collapse
Posted by jeff wang on
-where is libnsjava.so in the filesystem?

it's located in /home/aol34/bin/

-what does your aolserver .tcl init script say about it?

The aolserver .tcl init script loads perfectly fine and does not complain.  The weird thing is that when I start up aolserver as nsadmin then everything works fine.  But when I do a "sudo" and start the server as another user, then it loads fine but will spit out that error about "unable to load libnsjava.so" whenever I try to make new java objects. I initially thought it had something to do with the permissions on the nsjava.jar or libnsjava.so file but I gave full permissions (chmod 777) to those files and it's still broken.

Below are the pertinent portions of my .tcl init script:

----------------------------------------
# enable the java module
ns_param EnableJava on
# same as java command line verbose mode.  setting it to "on" will show the
# loading of libraries in the log file.
ns_param VerboseJvm off
# Some 1.1 jvm's segfault when destroyed.  This option can be used to bypass
# destroying the jvm at shutdown.
ns_param DestroyJvm no
ns_param  DisableJITCompiler  "off"
ns_param  LogLevel            "Notice"
# Prepend the following to the default classpath. This is just an example, your
# classpath will probably be different.
ns_param ClassPath "${cpath}${pns_jars}/home/aol34/bin/nsjava.jar:${ws_lib}:${wrapper_lib}"

ns_param  nsjava          ${bindir}/libnsjava.so
------------------

Thanks,
Jeff