IBM Support

Return Code of -1027 - Failed to load shared library error when a map connecting to a database is executed on UNIX

Troubleshooting


Problem

When a map is executed a return code (adapterreturn) of -1027, Failed to load shared library is produced. This error occurs on UNIX® when connecting to a database.

Cause

The WebSphere® Transformation Extender (WTX) environment is unable to locate a required library. This error is most commonly observed when interfacing with all versions of Oracle® Databases. All examples in this technote are with the Oracle Database libraries.

Resolving The Problem

Review the map's associated audit log or adapter trace file to determine which adapter library can not be loaded.

From a map audit log, the error will be similar to the following.

<TargetReport card="1" adapter="DB" bytes="367" adapterreturn="-1027">
<Message>Failed to load shared library</Message>
</TargetReport>


From an adapter trace file, the error will be similar to the following.

<33208-001>: Validating the adapter command...
<33208-001> Database type is Oracle
<33208-258> Connecting...
<33208-258>: Returned status: (-1027) Failed to load shared library


If this is the error contained in the file(s), follow the debug and corrective action sections below in order.

Debug 1:
Verify that Oracle Database path information is defined in the UNIX environment.

Corrective Action 1:
The path to the Oracle Database libraries must be defined in both the path and library path environment variables. To verify the path is set properly, type the following command at the UNIX command prompt.

echo $PATH

/opt/ibm/wtx/bin:/opt/SUNWspro/bin:.:/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:
/usr/local/bin:/usr/sbin::/usr/openwin/bin:/opt/oracle/product/11.1.0./bin


If the Oracle Database is installed in /opt/oracle/product/11.1.0 then the PATH environment variable must contain /opt/oracle/product/11.1.0/bin.

The library path environment variable differs by operating system. The table below lists the library path environment variable name by operating system.

Operating SystemEnvironment Variable
Solaris® and Linux®LD_LIBRARY_PATH
HP-UX®SHLIB_PATH
IBM® AIX®LIBPATH

You can verify the library environments using the echo command. To verify the path is set properly, type the following command at the UNIX command prompt. This example is for Solaris.

echo $LD_LIBRARY_PATH

WebSphere Transformation Extender versions 8.1 and earlier are 32-bit product installations, therefore environmental variables must reference Oracle 32-bit libraries and not 64-bit libraries.

/opt/ibm/wtx/libs:/jre/lib/sparc:/opt/oracle/product/11.1.0/lib32

If the Oracle Database is installed in /opt/oracle/product/11.1.0 then the library path variable must contain /opt/oracle/product/11.1.0/lib32.

WebSphere Transformation Extender versions 8.2 and higher can be installed as either a 32-bit or 64-bit product. If you have installed the 32-bit version of WebSphere Transformation Extender, you must ensure LD_LIBRARY_PATH/LIBPATH/SHLIB_PATH references the 32-bit versions of the Oracle client libraries.

If the 64-bit version of WebSphere Transformation Extender is installed you must set LD_LIBRARY_PATH/LIBPATH/SHLIB_PATH to reference Oracles' 64-bit client libraries. With Solaris this is typically defined to be /opt/oracle/product/11.1.0/lib.


Debug 2:
Verify that the environment can find all required libraries with the ldd command.

Corrective Action 2:
You will need to use the ldd command on the WTX Oracle database library. Please see your UNIX system administrator for additional information on using this command.

1. At the UNIX command line, change directory to the WTX installation libs subdirectory.

cd <install_dir>/libs

2. Use the ldd command against the libm4ora.s* library. The library name differs by UNIX platform.


PlatformLibrary name
HP-UXlibm4ora.sl
All Other Supported Unix Operating Systemslibm4ora.so

For example, on an AIX platform, the following command can be used.

ldd libm4ora.so

libclntsh.so.9.0 => (file not found)
libnsl.so.1 => /usr/lib/libnsl.so.1
libsocket.so.1 => /usr/lib/libsocket.so.1
libgen.so.1 => /usr/lib/libgen.so.1
libdl.so.1 => /usr/lib/libdl.so.1
libaio.so.1 => /usr/lib/libaio.so.1
librt.so.1 => /usr/lib/librt.so.1
libkstat.so.1 => /usr/lib/libkstat.so.1
libthread.so.1 => /usr/lib/libthread.so.1
libmercadp9i.so => (file not found)
libc.so.1 => /usr/lib/libc.so.1
libmp.so.2 => /usr/lib/libmp.so.2
/usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1


If the ldd command returns a file not found, a required library is either not in the path or missing and must be installed to continue. Please return to the first debug section in this article to verify pathing.

In the example provided above, the libraries, libclnstsh.so.9.0 and libmercadp9i.so were not found. For this example, these libraries must be installed in order to be able to connect to the Oracle database.

Debug 3:
Verify the WebSphere Transformation Extender Oracle Database Adapter libraries have execute permission for the user running the map (rwxr-xr-x).

Corrective Action 3:
You will need to use the ls command on the WTX Oracle database library. Please see your UNIX system administrator for additional information on using this command.

1. At the UNIX command line, change directory to the WTX installation libs subdirectory.

cd <install_dir>/libs

2. Use the ls -l command against the libm4ora.s* library. The library name differs by UNIX platform.

PlatformLibrary name
HP-UXlibm4ora.sl
All Other Supported Unix Operating Systemslibm4ora.so

For example, on a Solaris platform, the following command can be used.

ls -l libm4ora.so

-rwxr-xr-x 2 wtxuser staff 285312 Jan 25 2006 libm4ora.so


Debug 4:
Verify that the environment can find all required libraries with the dlopen utility.

This utility provides a simple load library test tool based on the dlopen() system call.

Corrective Action 4:
Please refer to the Technote, WebSphere Transformation Extender - Troubleshooting Shared Libraries/ WTX Adapters Dependencies for additional information on how to obtain and run this utility. This techote can be found here:

Troubleshooting Shared Libraries


Debug 5:
This debug instruction is for AIX only. Remove shared libraries from memory using the slibclean command.

The slibclean command unloads all object files with load and use counts of 0. It can also be used to remove object files that are no longer used from both the shared library region and in the shared library and kernel text regions by removing object files that are no longer required. Please see your UNIX system administrator for additional information on using this command.

Corrective Action 5:
You will need to be logged in as root or a user with super user privileges to use the slibclean command. At the UNIX command prompt type the following command.

slibclean

Debug 6:
Ensure that the user running the map has connectivity to the Oracle Database.

Corrective Action 6:
Log in to your Oracle Database using sqlplus or another client. Be sure that you are using the same userid and password that is defined in the map or in the Database Interface Designer mdq file. Run a simple select query. If you cannot connect or cannot run the query, contact your local Database Administrator for additional assistance.
[{"Product":{"code":"SSVSD8","label":"IBM Transformation Extender"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Database Adapter","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"}],"Version":"8.4;8.3;8.2","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Ascential DataStage TX Mercator

Document Information

More support for:
IBM Transformation Extender

Software version:
8.4, 8.3, 8.2

Operating system(s):
AIX, HP-UX, Linux, Solaris

Document number:
85531

Modified date:
16 June 2018

UID

swg21245178