Error handling

All messages generated by the connector are stored in a message file named BIA_CORBAConnector.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 additional specific errors as described in the following sections.

Connector error handling

CORBA exception

If the CORBA application is down, or the CORBA call returns a failure, the connector throws a CORBA exception.

The connector handles such exceptions by logging and returning a FAIL code. To aid in debugging, the connector logs the details of the CORBA exception, 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.

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 IDL2Java IDL compiler 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 CORBA 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 an InParameter 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. For details about business object structure and verb ASI, see Understanding business objects.

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.

ODA error handling

Error produced in buffered reader is: {1}

This exception is raised when an error occurs in the javac compiler. The description of the error appears in {1}.

There are no components or methods selected by the user

The ODA raises this exception if the user has not selected CORBA methods or components in Business Object Designer for creating corresponding business objects.

An error has occurred in {1}:{2}

This exception is raised when an unexpected error occurs in an ODA routine. The module or function that generates the error appears in {1}, and the description of the error appears in {2}.

There are no java files in the specified directory, {1}

The ODA raises this exception when the IDL2Java IDL compiler tool does not output any files to the directory for Java proxy files. The name of the directory appears in {1}. This directory is specified in the OutputDir property of the ODA Configure Agent. For details about this property, see Table 17.

The specified directory, {1}, doesn't exist

The ODA raises this exception when the user specifies a value in the OutputDir property of the ODA Configure Agent but the directory does not exist on the machine where the IDL2Java IDL compiler tool outputs the proxy .jar files. The name of the directory appears in {1}. For details about this property, see Table 17.

Could not get IDL type information on {1} attribute

The ODA raises this exception when it cannot determine the data type of the CORBA attribute specified in the IDL file. The name of the attribute appears in {1}. Note that the CORBA attribute and business object attribute have the same name (except for the prefix added to the business object name).

{1}: Path to IDL Compiler is incorrect: {2}

The ODA raises this exception when an incorrect pathname has been specified in the IDLToJavaTool property of the Configure Agent. For details about this property, see Table 17. The module or function that generates the error appears in {1}, and the incorrect pathname appears in {2}.

{1}: Path to IDL Compiler is unspecified

The ODA raises this exception when a pathname is not specified in the IDLToJavaTool property of the Configure Agent. For details about this property, see Table 17. The module or function that generates the error appears in {1}.

{1}: Could not execute idl2java. Make sure it is in your PATH

The ODA raises this exception when it cannot run the IDL2Java IDL compiler tool. The module or function that generates the error appears in {1}.

Make sure that the IDL2Java IDL compiler tool is specified in your system path.

Invalid input file found -- <Type>Operations.java is expected

The ODA raises this exception when it attempts to generate a business object that corresponds to an IDL interface but is unable to find a particular Java file.

Unable to create base directory

The ODA raises this exception if it cannot, for whatever reason, create the directory for the implementation classes that are used for server-side business objects (processed with the connector runs as a server).

Directory not found and is not absolute path

The ODA raises this exception if a relative path, rather than an absolute directory path, has been specified in any of the Configure Agent properties. You must specify absolute paths that point to a specific drive and directory. For example: specify c:\vbroker\bin\idl2java.exe, not ..\bin\idl2java.exe.

For details about the Configure Agent properties, see Table 17

Unable to create directory {1}

The ODA raises this exception if it cannot, for whatever reason, create a given output directory for any of the business object output files. The directory name appears in {1}.

{1}: Found IDL type of "{2} " in file {3}. This is not a known IDL type. Could not determine IDL type

The ODA raises this exception if an unrecognized type exists in the IDL file. The module or function that generates the error appears in {1}, the name of the unrecognized data type appears in {2}, and the IDL file name appears in {3}.

This exception is typically raised if you are using a Java proxy compiler other than the IDL2Java IDL compiler tool of Borland VisiBroker 4.5, which is the only IDL to Java proxy compiler that the connector currently supports.

Copyright IBM Corp. 1997, 2003