Well since there doesnt seem to be a dedicated forum that specifically includes JNI I thought I'd try this one. Basically I got a C++ server application and a JNI bridge. Inside of
java code I make a few calls to Class.forName(<classname>)
The program seems to work when I run a request trough my server the first time. When I run another request however the program crashes and the callstack shows it's crashing within the JNI JVM as below. What could it possibly be? Is my C++ code thrashing memory and stomping over JVM? Any ideas would be appreciated, thanks Thomas
[Switching to
Thread 0x43002940 (LWP 29233)]
0x00002aaaab26a8f1 in resource_allocate_bytes(unsigned long) ()
from /opt/ThirdParty/8.2/lib/libjvm.so
(gdb) where
#0 0x00002aaaab26a8f1 in resource_allocate_bytes(unsigned long) ()
from /opt/ThirdParty/8.2/lib/libjvm.so
#1 0x00002aaaab33411b in UNICODE::as_utf8(unsigned short*, int) ()
from /opt/ThirdParty/8.2/lib/libjvm.so
#2 0x00002aaaaafebf3c in java_lang_String::as_utf8_string(oopDesc*, int, int) ()
from /opt/ThirdParty/8.2/lib/libjvm.so
#3 0x00002aaaab021c90 in jni_GetStringUTFRegion () from /opt/ThirdParty/8.2/lib/libjvm.so
#4 0x00002aaaaaac226c in Java_java_lang_Class_forName0 () from /opt/ThirdParty/8.2/lib/libjava.so