Results 1 to 1 of 1
  1. #1
    Join Date
    Nov 2003
    Posts
    1

    Unhappy Unanswered: JNI/Java - Unable to load native library: insufficient room in the address space to l

    I am trying to access java from the native side under HP-UX.

    In the aCC++ source when I call:
    _____

    rc = JNI_CreateJavaVM(&jvm,(void **)&env, &vm_args);
    _____
    I get:


    Error occurred during initialization of VM
    Unable to load native library: insufficient room in the address space to load the library.

    I tried a number of things including adjusting max stack etc. ulimit now reports:
    _____

    > ulimit -a
    time(seconds) unlimited
    file(blocks) unlimited
    data(kbytes) 262144
    stack(kbytes) 16384
    memory(kbytes) unlimited
    coredump(blocks) 4194303
    ________

    One of the resources I have been using as a guide is:

    http://www.hp.com/products1/unix/jav...#non_java_ac++

    Attached is my (fairly) basis source code I have been using.

    What I am I doing wrong??

    (For completeness I include output from a make/run pass below.)

    (I do have my SHLIB_PATH correctly set to find the jvm sl)

    In anticipation, __daavid

    ______________

    daavid@ausccm1:/home/daavid/projects/CCT/servers/legacy
    > make -f wc.mk clean
    rm test2 test2.o WesCCT.class
    daavid@ausccm1:/home/daavid/projects/CCT/servers/legacy
    > make -f wc.mk
    javac -classpath /opt/eia_3.6/classes:/opt/eia_3.6/conf:/opt/eia_3.6/lib/eialib_client.jar:/opt/eia_3.6/lib
    /weblogic.jar::/home/daavid/projects/CCT/tools/WesTest/adminclient.jar:/home/daavid/projects/CCT/tools/WesTest/comm
    ons-lang-1.0.jar:. WesCCT.java
    aCC -g +u4 -c -ext -I /opt/java1.4/include -I /opt/java1.4/include/hp-ux -D_HPUX -D_POSIX_C_SOURCE=19950L -
    D_REENTRANT test2.cpp
    aCC -g -z -o test2 test2.o -L /opt/java1.4/jre/lib/PA_RISC/hotspot -ljvm -lpthread -llwp
    daavid@ausccm1:/home/daavid/projects/CCT/servers/legacy
    > ./test2
    beginning execution... set up vm args structure
    before CreateJavaVM
    options[0] - -Djava.class.path=.:/opt/java1.4/jre/lib/rt.jar:/opt/hpservices/jre/lib/i18n.jar:/opt/java/lib/classes
    .zip
    Error occurred during initialization of VM
    Unable to load native library: insufficient room in the address space to load the library.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •