Error handling

All messages generated by the connector are stored in a message file named BIA_COMConnector.txt. (The name of the file is determined by the LogFileName standard connector configuration property.) Each message has a message number followed by the message:

Message number
 Message text
 

The connector handles specific errors as described in the following sections.

COM exception generated by COMProxy

The COMProxy interface tool can generate a variety of errors. For example, if the COM application is down, or the COM call returns a failure, the COMProxy tool throws an exception.

The connector handles such COMProxy exceptions by logging and returning a FAIL code. The HRESULT of the COM call is contained in the COM exception. To aid in debugging, the connector logs the HRESULT, and returns it in the message field of the VerbProcessingFailed exception. The exception also contains information about which call in the sequence failed.

ClassNotFound for proxy

When the Loader receives the proxy class name and tries to create a proxy object of that class, an exception is raised if it cannot find the class. The connector logs the error, which includes the name of the class not found, and returns a FAIL code.

InstantiationException in Loader

When the Loader receives the proxy class name and tries to create a proxy object of that class, an exception is raised if it cannot create the object instance. The connector logs the error, which includes the class name of the object that cannot be instantiated, and returns a FAIL code.

InstantiationException or ClassNotFound during setup of factory or connection pool

A fatal exception is raised if one of the following occurs:

The connector logs the error and returns an APP_RESPONSE_TIMEOUT code.

IIlegal AccessException in Loader or Invoker

The connector raises an exception due to invalid code or improper access (public or private) on a method by the COMProxy tool.

The connector logs the error and returns a FAIL code.

NoSuchMethodException in Invoker

The connector raises an exception if a method is specified on the business object that does not exist in the corresponding proxy object.

The connector logs the error and returns a FAIL code.

InvocationTargetException in Invoker

The connector raises an exception when the COM application (with which the connector is exchanging business objects) raises an exception.

The connector logs the error and returns a FAIL code.

Invalid argument (CXIgnore) in a method object in Invoker

The connector raises an exception when a method is included in the business object's verb ASI, but the arguments of that method have not been populated.

The connector logs the error and returns a FAIL code.

Cast failure or wrong attribute type

The connector raises an exception if a proxy object method takes or returns a different data type than what has been specified in the business object.

The connector logs the error and returns a FAIL code.

Invalid verb ASI

The connector raises an exception if the verb ASI of the business object being passed to it is formatted incorrectly or uses improper syntax. Examples of this include a verb ASI that does not contain a proper method sequence, or a child business object that specifies CBOH (custom BO handler) for an active verb.

The connector logs the error and returns a FAIL code.

Copyright IBM Corp. 1997, 2003