Under Mach and Windows NT, EOF uses dynamic linking to load the adaptor for your database. Because this is not possible on Solaris or HP-UX, you will need to statically link in the adaptor for your database.
Database Access in Scripted Applications
Because the WODefaultApp shipped with WebObjects versions 3.1 and 3.51 is not statically linked against any database adaptors, scripted WebObjects apps that use WODefaultApp as their application interface will not be able to access a database. If you don't want to convert your application to a compiled app, the workaround is to use the application file that comes with WebObjects' DodgeDemo example. Just rename it to WODefaultApp and replace the original WODefaultApp with it.
Database Access in Compiled Applications under WebObjects 3.5.1
To link a database adaptor into your compiled WebObjects application, you will need to edit your makefile.preamble to statically link the adaptor framework and libraries.
In WebObjects 3.5.1, Apple provides platform- and database-specific makefiles in /NextDeveloper/Makefiles/PB.makefiles/. Simply uncomment the line in your makefile.preamble that references the pdo-eoadaptor-linking.make file, and use the FRAMEWORKS keyword to specify the adaptor framework to link against; for example, to link against the Oracle adaptor, you would add FRAMEWORKS += OracleEOAdaptor to your makefile. For an example of a compiled application that uses the pdo-eoadaptor-linking.make file provided with WebObjects 3.51, please see the DodgeDemo example.
Database Access in Compiled Applications under WebObjects 3.1
In WebObjects 3.1, you will need to add the library and framework paths to your makefile manually. Below are the makefile keys and values for the most common database adaptors under both Solaris and HP/UX.
To access an Informix database on Solaris, you will need to set the following keys in your makefiles:
You must also have the INFORMIXDIR (full path to the Informix home), INFORMIXSERVER (your server name), and INFORMIX_HOME (usually /opt/informix) environment variables set. For HP-UX, replace the above OTHER_LIBS line with:
For Oracle on Solaris or HPUX, you need to set the following two tags:
FRAMEWORKS += OracleEOAdaptor
OTHER_LDFLAGS += -L$(ORACLE_HOME)/lib
The ORACLE_HOME environment variable must contain the full path to the Oracle server directory.
You also need to set the OTHER_LIBS tag to an appropriate set of libraries for your platform and Oracle version.
For Oracle 8.0 (with static linking), use these values for Solaris:
OTHER_LIBS += -lclntsh -lcommon -lcore4 -lnlsrtl3