[sr-dev] [kamailio/kamailio] app_java.so: undefined symbol: JNI_CreateJavaVM please help (#1969)

Henning Westerholt notifications at github.com
Thu May 30 17:45:32 CEST 2019


Indeed gcj was removed from gcc compiler suite for the release 7.1. The openjdk compiler should be used instead.
I managed to build the module on opensuse by setting gcj = no in the Makefile, and set a proper JAVA_HOME on the command line. The module seems to initialize ok:

 0(20759) DEBUG: <core> [core/sr_module.c:909]: init_mod(): app_java
 0(20759) INFO: app_java [app_java_mod.c:131]: mod_init(): Initializing Java VM with options: -Djava.compiler=/usr/lib64/jvm/java/bin/javac -D/usr/lib64/jvm/java/jre/lib/:/home/henning/repositories/kamailio/src/modules/app_java/Kamailio.jar -verbose:gc,jni
 0(20759) INFO: app_java [app_java_mod.c:150]: mod_init(): app_java: Java VM initialization OK
 0(20759) ERROR: app_java [java_support.c:180]: handle_exception(): app_java: Exception:
Exception in thread "main" java.lang.NoClassDefFoundError: Kamailio

Your installation method by trying to match the proper kamailio version of a downloaded version to a package version is not recommended and might produce strange errors.

I would suggest to compile the complete kamailio all together, you will find a tutorial e.g. in our wiki.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1969#issuecomment-497377480
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20190530/9722b4ae/attachment-0001.html>


More information about the sr-dev mailing list