This appendix describes the Jolt Class Library errors and exceptions. The Jolt Class Library returns both Jolt and TUXEDO errors and exceptions. The Jolt Class Library errors and exceptions are also listed for each class, constructor, and method listed in Chapter 7, "Jolt Class Library Reference."
The following topics are included in this appendix:
TUXEDO errors are described briefly in this appendix. For a complete explanation of TUXEDO errors, refer to the TUXEDO System Reference Manual.
An error condition indicates that a nonrecoverable error has occurred. When an error occurs, a message is displayed and the current method stops executing.
Note:
In general, these errors are not caught in your application. Normally, Java errors and exceptions are automatically caught by Jolt.
An exception indicates that a condition occurred that requires special handling to prevent the application from terminating. Exceptions can be caught and handled.
Each exception or error comes with an error code and a simple text message. The following table describes the relationship between the error code types and their messages.
The Jolt Class Library uses exceptions to report run-time problems. All Jolt exceptions extend from Java's
Since Java's RuntimeException and Error conditions are caught automatically by the Java virtual machine (VM), programmers can ignore these and rely on the Java VM to trap them. However, programmers must catch the exceptions or errors that are important to their particular applications so that application-specific recovery can be initiated.
The ApplicationException class is used by the JoltRemoteService class and its methods. The ApplicationException is thrown only when the service calls a The following methods are used with the ApplicationException class.
Jolt Error and Exception Handling
RuntimeException
and Error classes. Figure A-1 illustrates the relationship of the JoltException
classes to the Java RuntimeException
class.
Figure A-1 Jolt Exception Class Hierarchy
ApplicationException Class
java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----java.lang.RuntimeException
|
+----bea.jolt.ApplicationExceptiontpreturn
(TPFAIL
, tpurcode
, ...).
public class ApplicationException extends
java.lang.RuntimeException ApplicationException Methods
getMessage Method
The
getMessage
method gets the error message.Synopsis
public String getMessage();Usage
This method is taken from the Java RuntimeException class.
The
getApplicationCode
method gets the application code (tpurcode
).Synopsis
public int getApplicationCode();
The
getObject
method gets the object that throws this exception.Synopsis
public Object getObject();Usage
In Jolt 1.1, the object retrieved by
getObject
is an instance of the JoltRemoteService class. The caller can still use this object to retrieve all the output parameters. SeegetStringDef()
or similar methods in JoltRemoteService class.
java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----java.lang.RuntimeException
|
+----bea.jolt.JoltException
All Jolt exceptions are derived from the Java RuntimeException class. The Java virtual machine catches them by default, thus the programmer is not required to catch any of these exceptions.
public class JoltException extends java.lang.RuntimeException
{
public final static int TPEABORT = 1; // Tuxedo error codes
public final static int TPEBADDESC = 2;
public final static int TPEBLOCK = 3;
public final static int TPEINVAL = 4;
public final static int TPELIMIT = 5;
public final static int TPENOENT = 6;
public final static int TPEOS = 7;
public final static int TPEPERM = 8;
public final static int TPEPROTO = 9;
public final static int TPESVCERR = 10;
public final static int TPESVCFAIL = 11;
public final static int TPESYSTEM = 12;
public final static int TPETIME = 13;
public final static int TPETRAN = 14;
public final static int TPGOTSIG = 15;
public final static int TPERMERR = 16;
public final static int TPEITYPE = 17;
public final static int TPEOTYPE = 18;
public final static int TPERELEASE = 19;
public final static int TPEHAZARD = 20;
public final static int TPEHEURISTIC = 21;
public final static int TPEEVENT = 22;
public final static int TPEMATCH = 23;
public final static int TPEDIAGNOSTIC = 24;
public final static int TPEMIB = 25;
public final static int TPEJOLT = 100; // Jolt error or
/programming error
The JoltException methods are used to obtain information about the error or the condition that causes the error.
The
getMessage
method gets the error message.Synopsis
public String getMessage();Usage
This method is taken from the Java RuntimeException class.
The
getErrno
method gets the error code.Synopsis
public int getErrno();
The
getObject
method gets the object that throws this exception.Synopsis
public Object getObject();Usage
In some situations, this method returns a "null" object.
java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----java.lang.RuntimeException
|
+----bea.jolt.JoltException
|
+----bea.jolt.EventException
This exception is thrown when the user encounters any error during the event subscription.
public classEventException
extends JoltException
java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----java.lang.RuntimeException
|
+----bea.jolt.MessageException
This exception is thrown when there is an error in parsing the internal message object.
public classMessageException
extends RuntimeException
java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----java.lang.RuntimeException
|
+----bea.jolt.JoltException
|
+----bea.jolt.ServiceException
The ServiceException class extends JoltException. The ServiceException class is used by the JoltRemoteService class and its methods.
public class ServiceException extends JoltException
java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----java.lang.RuntimeException
|
+----bea.jolt.JoltException
|
+----bea.jolt.SessionException
The SessionException extends JoltException. The SessionException is used by the JoltSession class and its methods.
public class SessionException extends JoltException
java.lang.Object
|
+----java.lang.Throwable
|
+----java.lang.Exception
|
+----java.lang.RuntimeException
|
+----bea.jolt.JoltException
|
+----bea.jolt.TransactionException
The TransactionException class extends JoltException. The TransactionException class is used by the JoltTransaction class and class methods.
public class TransactionException extends JoltException
Expanded references to TUXEDO will be available in a future release of the Jolt product documentation. If you require an immediate, expanded reference for TUXEDO related errors, see the TUXEDO System Reference Manual.