A simple compiled application won't run properly.
Java programs sometimes fail when the CLASSPATH is set incorrectly because they are not able to access necessary classes at runtime. Your CLASSPATH should include the directories NeXT_ROOT/NextLibrary/Java and NeXT_ROOT/NextLibrary/JDK/lib/classes.zip.
On the HP-UX platform, examples are not installed built. You must build them yourself before you can run them. To compile an example, cd to the example's project directory and type make. For example:
> cd
<DocRoot>/WebObjects/ObjectiveC/HelloWorldCompiled
> make
A compiled application won't autostart.
If you can run the example by hand but cannot autostart it, check the section Post-Installation Steps for your operating system and make sure you've performed all of the necessary steps.
When WebObjects receives a request for a particular application, it first looks for running instances of that application, then it looks for an executable file that it can start up. If these two strategies fail, WebObjects starts an instance of WODefaultApp and assigns it the task of handling requests for the specified application. So, if WebObjects can't find the executable for your compiled application, it will start the default application, which unfortunately won't have access to all the compiled logic of your application.
The DodgeDemo application won't run.
The DodgeDemo application must be compiled before you can run it. In addition, you must create the DodgeDemo database (scripts are provided) and install the database model file that is compatible with your database server as described in "Setting Up the Sample Databases."
Check the DodgeDemo directory for an directory named DodgeDemo.woa. This is the WebObjects application wrapper. Check the wrapper for an executable file. If the wrapper or the executable doesn't exist, build the DodgeDemo application.
On Solaris and HP-UX, you need to build DodgeDemo with the correct client libraries and adaptor. Before you build, add the appropriate adaptor framework to the FRAMEWORKS makefile variable. Then uncomment the following line in the Makefile.preamble to link the appropriate client libraries:
include $(MAKEFILEDIR)/pdo-eoadaptor-linking.make
If DodgeDemo compiles and runs but can't access data about the various models of cars, it's probably because the application can't communicate with the database server.
A WebObjects application won't connect to the database server.
Check that the client libraries for your database server are correctly installed on your machine. If so, you can, for example, use the tools supplied with the database server (isql
for Sybase, sqlplus
for Oracle, and dbaccess
for Informix) to test that you can connect to the server and execute simple SQL commands.
Applications that access a database should be started from the command line or from the Project Builder launch panel. If you allow WebObjects to autostart them-depending on the server and server configuration-the resulting process may not have the permissions necessary to access the database.
The model file should be in the Resources directory under the application's .woa directory. Taking the DodgeDemo application for example, the directory structure would look like this:
DodgeDemo.woa/
DodgeDemo (the executable file)
Resources/DodgeDemo.eomodeld (the model file)
Frequently, the ODBC data sources are configured as "user" data sources, which are available only to the user that created them. Autostarted WebObjects applications run with the permissions and environment of the "anonymous" user specified by the HTTP server used to start the application. If this anonymous user is not the same as the user who created the user data source, the application will not be able to use the data source.
The best solution is to configure a "system" data source, which would be available to any process in your system. To do so:
1. Install the most current ODBC drivers and related support software available to you.
2. Open the ODBC Control Panel.
3. Click the "System DSN" tab, and click the "Add" button to add a new data source.
If your ODBC support software doesn't have this feature and you are unable to acquire a newer version of ODBC, log in as the "anonymous" user (you may have to do some configuration to get this to work) and configure a user data source that points to your database.
Table of Contents Next Section