ColdFusion 5: Data source connection to Oracle 9.2 database fails
Issue
On Solaris platforms, the Oracle Native and ODBC drivers provided in Macromedia ColdFusion 5 require the Oracle 9.2 32-bit client in order to function properly. By default, ColdFusion looks for the Oracle client in the Oracle_Home/lib directory, which normally contains only the 64-bit client.
For a ColdFusion Server install on Solaris when connecting a data source to an Oracle 9.2 database, the data source verification will fail and any template referencing to that data source will throw the following error:
Oracle Error Code = 0 The driver for the ORACLE80 Data Source type could not be loaded. ld.so.1: /opt/coldfusion/bin/cfserver: fatal: /export/home/oracle/DEV//lib/libclntsh.so: wrong ELF class: ELFCLASS64
Solution
In order to successfully verify the data source, the ColdFusion start script needs to point to the Oracle 32-bit client libraries instead of the default Oracle 64-bit client libraries. The following steps explain how to make this change.
- Make a backup copy of the ColdFusion start script located in the cf_root/bin directory.
- Find the LD_LIBRARY_PATH section of the start script:
LD_LIBRARY_PATH=$CFHOME/lib:$ORACLE_HOME/lib - Modify the LD_LIBRARY_PATH to point to the 32-bit client libraries:
LD_LIBRARY_PATH=$CFHOME/lib:$ORACLE_HOME/lib32 - Save the changes to the file.
- Restart ColdFusion.
The Oracle data source should now verify successfully.
Additional Information
Related TechNotes:
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
