Skip to content

ERR-0109F ( 4255) Library file for external procedure(function) not found#

Overview#

This document explains the causes of and solutions for the ERR-0109F error, which occurs when Altibase cannot load the library file used by an external procedure or external function.

Version#

All versions of Altibase

Symptom#

The following error occurs when an external procedure or external function is called.

ERR-0109F : Library file for external procedure/function not found : $ALTIBASE_HOME/lib/shlib.so

This error may occur when the procedure or function is actually called even if CREATE OR REPLACE LIBRARY and the external procedure or function were created successfully and the object status is shown as VALID.

Cause#

This error occurs when the Altibase server cannot load the library used by an external procedure or external function.

The main causes are as follows.

Library File or Path Error#

The library file specified in CREATE OR REPLACE LIBRARY does not exist in the $ALTIBASE_HOME/lib directory on the database server, or the registered file name does not match the actual file name.

Lazy Loading of the Library#

The library used by an external procedure or external function is loaded when the procedure or function is actually called, not when the object is created.

Therefore, CREATE OR REPLACE LIBRARY and the external procedure or function can be created successfully and the object status can be shown as VALID even if there is a problem with the library.

If the library cannot be loaded when the procedure or function is called, the ERR-0109F error occurs.

DLL Bitness Mismatch on Windows#

If the Altibase server process is 64-bit but the DLL was built as 32-bit, the server cannot load the DLL. This is a restriction of the Windows operating system.

Action#

Check the Library File Location#

Verify that the library file exists in the $ALTIBASE_HOME/lib directory on the database server.

Check that the FILE_SPEC value registered in SYSTEM_.SYS_LIBRARIES_ exactly matches the actual file name.

SELECT LIBRARY_NAME, FILE_SPEC, STATUS
  FROM SYSTEM_.SYS_LIBRARIES_;

Check the Windows Environment#

Verify that the DLL was built for the same bitness as the Altibase server process.

If the Altibase server is 64-bit, the DLL must also be built as 64-bit.

Test the Actual Call#

The object status VALID does not guarantee that the library can be loaded successfully.

Call the external procedure or external function to verify that it executes successfully.