C$JAVA Gives Error: Java dynamic init failed

0 Likes

On SCO UnixWare 7.1.4 the call to C$JAVA fails with this error, seen in the runtime trace: Java dynamic init failed.

Problem:

The ACUCOBOL-GT application calls Java programs via the C$JAVA library routine. On Windows and Linux platforms there is no error when running the application. However, when running the same application with the same configuration on SCO UnixWare 7.1.4, the call to C$JAVA fails with the error: Java dynamic init failed.

Resolution:

On SCO UnixWare 7.1.4 (and possibly some other platforms) there are additional steps and configurations necessary to enable the C$JAVA library routine to function properly.

Here's what must be done:


  1. In the ACUCOBOL-GT 8.1.0 lib directory copy "Makefile" as "Makefile-java".
  2. Modify Makefile-java as follows:

    Locate the two Java lines, uncomment them, and set them like this:


    JAVA_HOME = path to main java directory]
    JAVA_LINK_FLAGS = -L $(JAVA_HOME)path to directory containing libjvm.so] -ljvm -lpthread -ljsig

    On our server they look like this:


    JAVA_HOME = /opt/java2-1.4.2
    JAVA_LINK_FLAGS = -L $(JAVA_HOME)/jre/lib/i386/client -ljvm -lpthread -ljsig
  3. Relink the runtime by executing the following command:
    make -f Makefile-java
  4. Move the newly relinked runcbl to the ACUCOBOL-GT 8.1.0 bin directory.
  5. Set the following in the environment:

    JAVA_HOME=path to main java directory]
    LD_LIBRARY_PATH=path to directory containing libjvm.so]:ath to the directory above that one]
    JAVA_LIBRARY_NAME=path to and including libjvm.so]

    On our server they look like this:


    JAVA_HOME=/opt/java2-1.4.2
    LD_LIBRARY_PATH=/opt/java2-1.4.2/jre/lib/i386/client:opt/java2-1.4.2/jre/lib/i386
    JAVA_LIBRARY_NAME /opt/java2-1.4.2/jre/lib/i386/client/libjvm.so
  6. Make sure the configuration variable PRELOAD_JAVA_LIBRARY is turned off (the default). If it is set to "ON" in the runtime configuration file or in the environment then please comment it out, remove it, or set it to "OFF".
  7. Add the --no-signal-handlers option to the runtime command line. NOTE: If the application runs via Thin Client this option may not be set in the Alias, as it will be ignored. Instead it must be passed in the acuthin command line like this:
     acuthin servername:port --no-signal-handlers aliasname
    Alternatively, it may be implemented on the server via the ACUSW environment variable.
    Adding:
    ACUSW=" --no-signal-handlers" ;export ACUSW
    to the profile of the user account that will run the application may be necessary.
    The ACUSW method requires the addition and setting of:
    USE_UNIX_SHELL ON
    to the AcuConnect configuration file(acurcl.cfg).
Old KB# 14127
Comment List
Anonymous
Related Discussions
Recommended