Oracle WebServer User's Guide

Contents Index Home Previous Next

Oracle Web Agent Error Handling

There are two types of errors that are handled by the Oracle Web Agent:

Application Errors

Application errors are specific to the PL/SQL application. All applications written by a programmer should have their own exception handling in the PL/SQL procedure that produces the appropriate output.

Because the Oracle Web Agent does not read the HTML output to determine its content, handled exceptions are transparent. As far as the Web Agent is concerned, if the PL/SQL code generates HTML output, the operation was successful. The user will see whatever handled exception message is generated by the PL/SQL procedure.

System Errors

System errors are detected by the Oracle Web Agent itself. These are errors that occur when the Web Agent is unable to launch the PL/SQL procedure or when a PL/SQL exception is not handled by the stored procedure, causing the exception to be propagated back to the Web Agent as a system error. This causes a standard HTML error document to be returned to the browser.

For example, if the Oracle Web Agent cannot make a connection to the Oracle7 Server, the PL/SQL procedure cannot run and a system error occurs. The Web Agent then returns a default error message to the browser from the HTTP Server, or returns a customized HTML error page (if one was previously configured as part of the Web Agent service using the OWA_ERR_PAGE parameter).

How the Web Agent Knows What Error Page to Generate

The Web Agent checks for the error page field in the OWA service configuration. If a value is found there, the Web Agent looks for the specified page in the file system. If found, that page is returned to the Web client. If the lookup fails, a default error message is returned to the Web client.

Creating Error Pages

The Oracle WebServer allows the administrator to create customized error pages that are returned whenever the Web Agent encounters a system error. The purpose of customized error pages is to tell the user what action to take.

Only one custom error page per service can be returned when the Web Agent encounters a system error.

To create a custom HTML error page, use any text or HTML editor you are comfortable with to write your HTML document.

The following is an example of a user-defined HTML error page for a system error:

<HTML>
<HEAD>
<TITLE>ERROR</TITLE>
</HEAD>
<BODY>
<HR>
<H1>Your Request Failed</H1>
<HR>
Bob's Big Bulldozer Company could not process your request. Please try again later, or call us at 1-800-TRACTOR.
Thanks, Bob
</BODY>
</HTML>

Once the customized HTML error page is created, the entry for OWA error page in the Web Agent Service configuration file must reflect where the new HTML error page is stored. Use the Web Service Administration page to insert or change the OWA error page entry.

A full path must be specified for the customized HTML error page. If a path is not specified, the Web Agent will search for it in the same directory in which the Web Agent executable is stored.

See the section, "Creating or Modifying the Web Agent Service,"[*], "Oracle WebServer Administration Utility," for more information.

Error Log File

The Oracle Web Agent keeps an error log file, defined by the OWA Service Name and the OWA Log Directory value for that service. The file will be named service_name.err. An entry is appended to this file whenever the Oracle Web Agent encounters an error. The error log records all relevant information, such as date, error number, and URL.

Remember, there is only one error log for each Web Agent service. However, if the Web Agent cannot resolve a service name, and there is no OWA_DEFAULT_SERVICE configured, then errors will be written to OWA.err in the default log directory.

The following is an example of an error log file, and the corresponding meaning for each line in the file:

Wed Jun 28 08:14:27 1995 				/*Timestamp*/
OWS-05100: Agent : unable to connect due to Oracle error 1017
ORA-01017: invalid username/password; logon denied /*Error stack*/
OWA SERVICE: HR 				 /*Web Agent Service*/
PROCEDURE: hrinfo.emp 		   /*PL/SQL procedure called*/
PARAMETERS: 			/*parameters used by procedure*/
============					
ENAME:
RayBorque


Contents Index Home Previous Next