ODM and JNI



I am trying to access the system configuration database via the ODM C
functions called from JNI. My standalone program works fine, but when
I try the same code under JNI, it instantly crashes at the fist ODM
function call. It seems to be dieing on the call, not in the function
which leads me to believe that maybe -lodm isn't compiled
appropriately to be be called from JNI? The stack traces look like
this:

(dbx) where
pthread_kill(??, ??) at 0xd0128470
_p_raise(??) at 0xd0127f08
raise.raise(??) at 0xd0315740
abort.abort() at 0xd0344ca8
j9dump_create() at 0xd2439cfc
doSystemDump() at 0xd2461528
protectedDumpFunction() at 0xd2461b20
j9sig_protect() at 0xd24381cc
runDumpFunction() at 0xd2462f7c
triggerDumpAgents_30_26() at 0xd246b768
dumpCrashData() at 0xd23e71dc
j9sig_protect() at 0xd24381cc
structuredSignalHandler() at 0xd23e74cc
masterSynchSignalHandler() at 0xd2438420
..() at 0x0
CpuInfoAIX.CpuInfoInitializeCacheFunction(), line 75 in "CpuInfoAIX.c"

Where that line is: path=odm_set_path("/etc/objrepos");

the code is properly encased in a pthread mutex, and I have lots of
other JNI code that is work. I'm using the _r variants of the xlc
compilers, and I have these env vars set:

AIXTHREAD_SCOPE=S
AIXTHREAD_MUTEX_DEBUG=OFF
AIXTHREAD_RWLOCK_DEBUG=OFF
AIXTHREAD_COND_DEBUG=OFF
export AIXTHREAD_SCOPE AIXTHREAD_MUTEX_DEBUG AIXTHREAD_RWLOCK_DEBUG
AIXTHREAD_CO
ND_DEBUG

Any ideas?

Evan

.



Relevant Pages

  • Re: ODM and JNI
    ... My standalone program works fine, ... I try the same code under JNI, it instantly crashes at the fist ODM ... compilers, and I have these env vars set: ...
    (comp.unix.aix)
  • Re: C++ to java bridge
    ... An the different solution I want an evaluation are compilers that ... generates java code implementing JNI. ... JNI is very complicated to use. ...
    (comp.lang.java.programmer)
  • Re: C++ to java bridge
    ... An the different solution I want an evaluation are compilers that ... generates java code implementing JNI. ... JNI is very complicated to use. ...
    (comp.lang.java.programmer)