Forum OpenACS Q&A: nsjava with Aolserver 4.08
Our research group has gotten nsjava working well with Aolserver 3.4 and OpenACS 4.6. However, we wanted to upgrade to Aolserver 4.08 and couldn't seem to get nsjava running there. The error log reports :
/home/aolserver408/bin/libnsjava.so: undefined symbol: NsTclDbCmd
[14/Jun/2005:12:27:45][16562.1024][-main-] Fatal: modload: failed to load module '/home/aolserver408/bin/libnsjava.so'
Does anyone know what this error is and how to fix it? Is nsjava even compatible with Aolserver 4.x??
Thanks for the help!
Also, what are you using nsjava for? I'm curious...
We're consuming webservices as a client and are using Java. We use nsjava to instantiate classes and invoke methods for utilizing the webservices in TCL/Openacs.
make,make install but have problems. I installed the java SDK for the
./configure --prefix=/usr/local/aolserver40r10-chroot --with-aolserver-src=/opt/source/installer/package_dir/aolserver-4.0.10 --with-jdk=/usr/lib/SunJava2-1.4.2Was not able to find
libjava.so... libraries. Looking at the
configurescript I found out, that it is grepping for
find $JDK_DIR -name libjava.so" which returns nothing. I changed that to use the directory
/usr/java/j2re1.4.2_04/lib/i386where all the libraries are and configure worked. Same I did for all the other java libraries in
Using c-compiler: gcc JDK Version: 1.2 Install libnsjava.so: /usr/local/aolserver40r10-chroot/bin Aolserver Version: 3_0_PLUS Aolserver include: /opt/source/installer/package_dir/aolserver-4.0.10/include Aolserver nsd include: /opt/source/installer/package_dir/aolserver-4.0.10/nsd jdk include: /usr/lib/SunJava2-1.4.2/include jdk platform include: /usr/lib/SunJava2-1.4.2/include/linux libjava.so dir: /usr/java/j2re1.4.2_04/lib/i386 libhpi.so dir: /usr/java/j2re1.4.2_04/lib/i386/native_threads hpi lib: libhpi.so libjvm.so dir: /usr/java/j2re1.4.2_04/lib/i386/client jvm lib: libjvm.so java classpath: /usr/lib/SunJava2-1.4.2/lib/tools.jar RPATH: /usr/java/j2re1.4.2_04/lib/i386:/usr/java/j2re1.4.2_04/lib/i386/native_threads:/usr/java/j2re1.4.2_04/lib/i386/client CFLAGS: '-DUSING_JDK1_2' LDFLAGS: '-L/usr/java/j2re1.4.2_04/lib/i386 -ljava -L/usr/java/j2re1.4.2_04/lib/i386/native_threads -lhpi -L/usr/java/j2re1.4.2_04/lib/i386/client -ljvm 'But calling make fails:
building "java" make: Entering directory `/opt/source/installer/package_dir/aolserver-4.0.10/nsjava-1.0.5/java' /usr/lib/SunJava2-1.4.2/bin/javac -g -classpath /usr/lib/SunJava2-1.4.2/lib/tools.jar:/opt/source/installer/package_dir/aolserver-4.0.10/nsjava-1.0.5/java ../java/nsjava/internal/Interp.java Error: could not find libjava.so Error: could not find Java 2 Runtime Environment. make: *** [Interp.class] Error 2 make: Leaving directory `/opt/source/installer/package_dir/aolserver-4.0.10/nsjava-1.0.5/java' make: *** [all] Error 1Any idea?
We never ended up solving this issue. Instead, we had a workaround in which we run an instance of aolserver 3.x that handles all the nsjava stuff. All the aolserver 4.x instances will forward requests to the 3.x nsjava gateway.