English

Error: ArcSDE Java API: Exception in thread main java.lang.UnsatisfiedLinkError

Error Message

Running an ArcSDE Java API program returns the error:

"Exception in thread 'main' java.lang.UnsatisfiedLinkError: no [library name] in java.library.path"

Cause

The JRE (Java Run time Environment) cannot find the required library file during runtime.

Solution or Workaround

  1. Make sure you have the required library files installed on your workstation. The files are usually installed in your SDEHOME directory during the ArcSDE client install. The library files required for the ArcSDE Java API version 8.1 are:

    Windows:
    jsg81.dll, sg81.dll, sdejavautil.dll.

    Unix (HP-UX only) :
    libjsg81.sl, libsg81.sl, sdejavautil.sl.

    Unix (All other platforms) :
    libjsg81.so, libsg81.so, sdejavautil.so.
  2. Check the operating system's library path environment variable setting to make sure the JRE can load the library when required. From within the Java program, add the line:

    Code:
    System.out.println("Library Path = " + System.getProperty("java.library.path") );

    The directory containing the ArcSDE Java API libraries must be in the library path displayed. If it is not, you must add it to the library path.

    Windows:
    Add the directory containing the Java library dll's to the PATH environment variable.

    Sun Solaris, SGI IRIX, Compaq Tru64 & Red Hat Linux:
    Add the directory containing the Java libraries to the LD_LIBRARY_PATH variable:

    For example:
    Code:
    setenv LD_LIBRARY_PATH $LD_LIBRARY_PATH:$SDEHOME/lib

    IBM AIX:
    Add the directory containing the Java libraries to the LIBPATH environment variable:

    For Example:
    Code:
    setenv LIBPATH $LIBPATH:$SDEHOME/lib

    HP-UX:
    Add the directory containing the Java libraries to the SHLIB_PATH environment variable:

    For example:
    Code:
    setenv SHLIB_PATH $SHLIB_PATH:$SDEHOME/lib