Previous Contents Index DocHome Next |
iPlanet Unified Integration Framework Developer's Guide |
Chapter 6 Exceptions
This chapter describes the generic exception framework implemented in UIF. It also describes various exception types, exception scenarios, and how to handle them. In addition, refer to your specific iPlanet Enterprise Connector Developer's Guide for more details on enterprise connector specific exceptions.The chapter contains the following sections:
About UIF Exceptions
Refer to Chapter 5 "Programming Model" for more information on UIF programming model and suggestions pertaining to the UIF exception handling mechanisms.
About UIF Exceptions
UIF exceptions are used to notify the user of an error. UIF exceptions follow Java exception patterns and have all the characteristics of Java exceptions. UIF throws various types of netscape.bsp.BspException which can be interpreted and extended to provide more meaningful information at the application level.All UIF exceptions are logged into the iPlanet Application Server logs. The logging of UIF exceptions are enabled by setting log_user_exceptions to `on' in the iPlanet Application Server registry using the iPlanet Application Server tools. Refer to the iPlanet Application Server documentation for the specifics of changing log levels. Refer to Related Information for details.
In addition to the generic netscape.bsp.BspException, UIF throws the following data object specific exceptions.
netscape.bsp.dataobject.exceptions.DataObjectException
Refer to Chapter 7 "API Reference" for more information on these Exceptions.netscape.bsp.dataobject.exceptions.FieldNameIsNullException
netscape.bsp.dataobject.exceptions.FieldNameTooLongException
netscape.bsp.dataobject.exceptions.FieldNotFoundException
netscape.bsp.dataobject.exceptions.IllegalPathException
netscape.bsp.dataobject.exceptions.IllegalRecursionException
netscape.bsp.dataobject.exceptions.IndexOutOfBoundsException
netscape.bsp.dataobject.exceptions.MethodUnsupportedException
UIF exceptions have a wrapped IBSPDataObjectStructure inside which provides the error information. This object is obtained by calling getInfo() on the UIF exception. This is an opaque structure that is populated by the exception thrower to provide details on the error state. This structure is not used by most of the exceptions originating from UIF. The enterprise connectors use this feature more concretely to forward the EIS error details. Refer to your specific iPlanet Enterprise Connector Developer's Guide for specific exceptions and the error data object structure contents.
Exception Scenarios
UIF exceptions can occur in the following scenarios:
Application Logic Errors
Application Logic Errors
Exceptions that usually occur due to application logic errors. The various exceptions with correction information are as follows:
DataObject missing
IllegalRecursion
- Reason: The specified path may be wrong or the data object may not be available in the repository.
IndexOutOfBounds
- Reason: Illegal recursion when getting or setting values on a data object.
IllegalPath
- Reason: The array or list index is exceeding the number of elements.
FieldNotFound
- Reason: Data object, function object, and/or service path is not set correctly.
FieldNameIsNull
- Reason: The data object field is missing in the repository.
FieldNameTooLong
- Reason: The field name is null in the repository.
MethodUnsupported
- Reason: The field name specified is too long.
TypeMismatch
- Reason: The method being used is not supported.
Invalid datasource/domain
- Reason: The value being set does not match the type specified in the repository.
Repository node not found
- Reason: The datasource or domain is not specified in the repository.
Unable to create map dataobject
- Reason: The repository node being accessed is not found in the repository.
Map is not array
- Reason: Unable to create the map object for a specific data object.
Bad Mapelement type
- Reason: The map being specified is not an array.
Invalid MapStruct
- Reason: The element type specified in the data object and data object map do not match.
Access not allowed for this user
- Reason: The data object map specified for the data object is invalid.
Function Object not prepared yet
- Reason: The web user and the datasource user match is not successful. The access is not allowed for the specified user.
Object instance is not valid
- Reason: The web user is trying to use a function object that has not been prepared yet.
Invalid repository content
- Reason: The object instance being accessed is invalid or is no longer in memory.
Invalid repository content for datasource
- Reason: The respository content being accessed is invalid.
- Reason: The repository content being access is invalid for the datasource being used.
UIF Runtime Errors
Exceptions that usually occur due to UIF runtime errors. The various exceptions with correction information are as follows:
Metadata service missing
LDAPRepository missing
- Reason: The UIF metadata service is not loaded properly.
Cannot create repository with LDAP parameters: hostname, port, userdn, password, and bspbasedn
- Reason: The LDAP repository is not available to read contents from, it may be down or the application server cannot reach it.
Cannot create pool
- Reason: UIF cannot access the repository with the configuration parameters such as host name, port, username, password and bsp base node.
Pooled connection cannot be reserved (likely, the maximum number of concurrent connections is reached)
- Reason: UIF cannot create the pool based on the pool path. The configuration may be wrong or the pool size is set to 0.
Cannot find pool
- Reason: UIF is unable to reserve a pooled connection. The system may have reached the maximum number of concurrent users.
Service provider has not been enabled or has timed out
- Reason: Cannot find the specified pool.
Cannot retrieve LDAP configuration data
- Reason: The service provider being accessed has not been enabled or has timed out.
Cannot find datasource instance with name
- Reason: UIF is unable to retrieve LDAP configuration data.
Service provider has timed out with state
- Reason: UIF cannot find the datasource instance with the specified name.
Repository instance missing
- Reason: The service provider with certain state content has timed out and is no longer available.
Repository manager unavailable
- Reason: The repository instance is not accessible by UIF and may not be loaded properly.
- Reason: The repository manager instance is not accessible by UIF and may not be loaded properly.
Enterprise Connector Errors
Exceptions that usually occur due to enterprise connector errors. Please refer to your enterprise connector documentation for more specific enterprise connector exceptions. The various exceptions with correction information are as follows:
Cannot create the datasource instance with name
Cannot find extension
- Reason: UIF is unable to create the datasource instance being specified. The enterprise connector may not be available or not loaded properly.
- Reason: UIF cannot find a specific enterprise connector extension. The connector may not be available or not loaded properly.
UIF Exceptions Handling
Most exceptions that originate from the UIF runtime are due to various repository and access errors. These are data path missing errors, invalid content errors, illegal access errors, etc. These development time errors need to be resolved by taking the necessary corrective actions in the repository or the user code. Use the reason presented to make corrective actions.Runtime specific errors need to have programmatic correction steps to exit from the error state gracefully. A few of the exception thrown by UIF are due to either missing a specific service or LDAP related errors explained above. These error may not be taken care of programmatically.
The crucial exceptions to handle programmatically are thrown by the enterprise connector. Enterprise connector specific exceptions extend netscape.bsp.BspException. Use getInfo() for the enterprise connector specific exceptions to interpret the results and take corrective actions accordingly. Refer to your specific iPlanet Enterprise Connector Developer's Guide for detailed error description contents.
Refer to Chapter 5 "Programming Model" for more information on UIF programming model and suggestions pertaining to the UIF exception handling mechanisms.
Previous Contents Index DocHome Next
Copyright © 2000 Sun Microsystems, Inc. Some preexisting portions Copyright © 2000 Netscape Communications Corp. All rights reserved.
Last Updated October 19, 2000