Hello, Please take a look to: Sep 11 12:48:12 MAIFREEPBX /usr/local/sbin/kamailio[870]: ERROR: app_java [java_support.c:174]: handle_exception(): Exception:#012Exception in thread "main" java.lang.NoClassDefFoundError: KamailioPlugin#012 <<No stacktrace available>>Exception in thread "main" java.lang.ClassNotFoundException: KamailioPlugin#012 at java.net.URLClassLoader$1.run(URLClassLoader.java:372)#012 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)#012 at java.security.AccessController.doPrivileged(Native Method)#012 at java.net.URLClassLoader.findClass(URLClassLoader.java:360)#012 at java.lang.ClassLoader.loadClass(ClassLoader.java:424)#012 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)#012 at java.lang.ClassLoader.loadClass(ClassLoader.java:357)Exception in thread "main" java.lang.NoClassDefFoundError: KamailioPlugin#012 <<No stacktrace available>>Exception in thread "main" java.lang.ClassNotFoundException: KamailioPlugin#012 at java.net.URLClassLoader$1.run(URLClassLoader.java:372)#012 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)#012 at java.security.AccessController.doPrivileged(Native Method)#012 at java.net.URLClassLoader.findClass(URLClassLoader.java:360)#012 at java.lang.ClassLoader.loadClass(ClassLoader.java:424)#012 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)#012 at java.lang.ClassLoader.loadClass(ClassLoader.java:357) Sep 11 12:48:12 MAIFREEPBX /usr/local/sbin/kamailio[870]: ERROR: <core> [sr_module.c:970]: init_mod(): init_mod(): Error while initializing module app_java (/usr/local/lib64/kamailio/modules/app_java.so)
To Daniel-Constantin, I didn't tested this yet but seems fine to me. Thank you for fix.
2014-09-11 20:57 GMT+04:00 Tom Johnson TJohnson@microautomation.com:
Here is the log after the change.
*From:* Daniel-Constantin Mierla [mailto:miconda@gmail.com] *Sent:* Thursday, September 11, 2014 11:55 AM *To:* Kamailio (SER) - Users Mailing List; Tom Johnson; Konstantin M. *Subject:* Re: [SR-Users] app_java issue
Can you try with the patch from next commit:
http://git.sip-router.org/cgi-bin/gitweb.cgi?p=sip-router;a=commitdiff;h=a13...
It has code indentation, as I needed to figure out the blocks there, effectively you have to change the line:
buf = (char **)pkg_realloc(buf, (i+1) * sizeof(char *));
in:
buf = (char **)pkg_realloc(buf, (i+2) * sizeof(char *));
inside the file modules/app_java/utils.c
I cc-ed Konstantin, the author of the module, to review the change.
Cheers, Daniel
On 09/09/14 21:31, Tom Johnson wrote:
Per my previous message, I determined that the module’s makefile was not properly finding the jdk/jre directories needed to compile. So, I temporarily hardcoded the paths in the makefile.
However, now when I use the module, Kamailio crashes. Below is the lines from /var/log/messages:
Sep 9 15:13:10 MAIFREEPBX kamailio: INFO: <core> [tcp_main.c:4836]: init_tcp(): init_tcp: using epoll_lt as the io watch method (auto detected)
Sep 9 15:13:10 MAIFREEPBX kamailio: WARNING: <core> [daemonize.c:352]: daemonize(): pid file contains old pid, replacing pid
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: rr [../outbound/api.h:54]: ob_load_api(): Failed to import bind_ob
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: rr [rr_mod.c:159]: mod_init(): outbound module not available
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: usrloc [hslot.c:53]: ul_init_locks(): locks array size 512
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: auth [auth_mod.c:350]: mod_init(): auth: qop set, but nonce-count (nc_enabled) support disabled
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: app_java [java_mod.c:125]: mod_init(): Initializing Java VM with options: -Xdebug -verbose:gc,class,jni -Djava.compiler=NONE -Djava.class.path=/opt/microautomation/i3/I3Notifier.jar:/opt/kamailio/java/kamailio.jar:/opt/microautomation/i3/lib/log4j-1.2.16.jar
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: app_java [java_mod.c:146]: mod_init(): app_java: Java VM initialization OK
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: INFO: app_java [java_mod.c:198]: mod_init(): app_java: module initialization OK
Sep 9 15:13:10 MAIFREEPBX /usr/local/sbin/kamailio[12268]: : <core> [mem/q_malloc.c:159]: qm_debug_frag(): BUG: qm_*: prev. fragm. tail overwritten(0, abcdefed)[0x7f0941207190:0x7f09412071c0]!
Sep 9 15:13:11 MAIFREEPBX abrt[12282]: Saved core dump of pid 12268 (/usr/local/sbin/kamailio) to /var/spool/abrt/ccpp-2014-09-09-15:13:10-12268 (183721984 bytes)
The code dump mentioned does not exist.
If I do not load the app_java module, Kamailio works.
Tom Johnson tjohnson@microautomation.com | Senior Software Engineer O: 703-543-2118 | F: 703-543-2099 5870 Trinity Parkway, Suite 600, Centreville, VA 20120 [image: cid:image001.png@01CE18AF.8F231EB0] http://www.microautomation.com/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Next Kamailio Advanced Trainings 2014 - http://www.asipto.com
Sep 22-25, Berlin, Germany