[Zoo-discuss] Building kernel with Java support

Fenoy Gerald gerald.fenoy at geolabs.fr
Wed Apr 27 07:36:36 PDT 2016


Hi,
thanks for such a complete feedback.

There is one thing to modify on your local setup. You should add the path where the libjvm.so file is located to the path where ld is searching into. To achieve that, you can add a zoo-project.conf file in the following directory: /etc/ld.so.conf.d/ . Then run ldconfig and ldd again on your zoo_loader.cgi file and it should return the proper location.

I hope this helps you to solve the issue.

Best regards, 

> Le 27 avr. 2016 à 16:01, rakesh prithiviraj <rakeshuk at outlook.com> a écrit :
> 
> Hi,
> 
> I am trying to build zoo-kernel with Java support on 64 bit Ubuntu machine.
> 
> /configure --with-js --with-python --with-java=/usr/lib/jvm/java-7-openjdk-amd64/
> 
> "http://www.zoo-project.org/docs/install/installation.html#java-support-optional" assumes that the include/linux and jre/lib/i386/client/ subdirectories exist in /usr/lib/jvm/java-7-openjdk-amd64/, and that the include/linux directory contains the jni.h headers file and that the jre/lib/i386/client/ directory contains the libjvm.so file. 
> 
> As I am using OpenJDK (and not Oracle Java), 
> 1. "include/linux" has 2 files (jawt_md.h, jni_md.h) and not jni.h asabove assumption
> 2. libjvm.so is located under /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/ (it is not under jre/lib/i386/client/ as assumed by configure option).
> 
> The configure command did not throw any errors. Last few lines from console output are given below
> 
> checking jni.h usability... yes
> checking jni.h presence... yes
> checking for jni.h... yes
> checking for JNI_CreateJavaVM in -ljvm... yes
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating ZOOMakefile.opts
> 
> Trying to access the Kernel CGI via Apache2 server did not work and apache logs shows the following error.
> 
> [Wed Apr 27 14:16:27.015884 2016] [cgi:error] [pid 16337:tid 140125807777536] [client 193.128.33.248:12614] AH01215: /usr/lib/cgi-bin/zoo_loader.cgi: error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory
> [Wed Apr 27 14:16:27.015950 2016] [cgi:error] [pid 16337:tid 140125807777536] [client 193.128.33.248:12614] End of script output before headers: zoo_loader.cgi
> 
> Also shared library dependencies command confirmed that 
> ldd zoo_loader.cgi | grep jvm
>         libjvm.so => not found
> 
> Java is in the PATH as seen below.
> 
> $locate libjvm.so
> /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/server/libjvm.so
> $echo $JAVA_HOME
> /usr/lib/jvm/java-7-openjdk-amd64/bin
> $echo $JDK_HOME
> /usr/lib/jvm/java-7-openjdk-amd64/
>  
> Please let me know if there a way to tell .configure command the path to libjvm.
> 
> regards
> Rakesh
> 
> _______________________________________________
> Zoo-discuss mailing list
> Zoo-discuss at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/zoo-discuss



Gérald Fenoy
http://wiki.osgeo.org/wiki/User:Djay



More information about the Zoo-discuss mailing list