Package com.sap.conn.jco
Class JCoException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.sap.conn.jco.JCoException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AbapClassException
,AbapException
General JCo exception object. It supports getting information about so-called T100 messages,
if the ABAP system used a message statement for signaling an exceptional situation.
T100 is the possibility in ABAP to define language independent error messages. The true
human-readable message can be generated using the key information (message class and number),
and the parameters, which should be language-neutral.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
A ABAP class exception has been thrown by a function module in the remote system.static final int
An exception has been thrown by a function module in the remote system.static final int
An application error occurred in a JCo server.static final int
A registered server connection has been canceled on the gateway.static final int
An exception is thrown while processing data in columnBased mode.static final int
static final int
Exception is caused by network problems, connection breakdowns, gateway problems, unavailability of the remote SAP system, etc.static final int
A concurrent method call has been detected.static final int
A general configuration error detected.static final int
A conversion between two representations of either a parameter, structure, or table field has failed.static final int
static final int
A data provider signaled an internal error to JCo.static final int
A destination instance was used, for which the configuration was either deleted or updated.static final int
static final int
DSR is turned on via JCo property, but the library could not loaded properly.static final int
An exception is thrown due to a situation caused by an infrastructure extension.static final int
A field requested from either a JCoRecord or one of its extending.static final int
A function template could not completely be retrieved from the repository in a JCo server or an error occured during creation of it.static final int
An illegal method argument has been detected.static final int
An illegal situation occurred within JCo runtime.static final int
An invalid transaction ID has been encountered.static final int
Some initialization failed within JCo.static final int
An internal error in the JCo runtime.static final int
A connection handle used internally is invalid, e.g.static final int
Indicates an invalid repository cache.static final int
jARM is turned on via JCo property, but the library could not loaded properly.static final int
Authorization failures during the logon phase in the ABAP backend.static final int
Used for various situations that are not supported within JCo.static final int
A connection handle used internally is null.static final int
static final int
When connecting to a partner system that does not allow to logon with initial and expired passwords this group will be used.static final int
The application using JCo provides JCo wrong information or is behaving incorrectly.static final int
An internal communication protocol error has been detected, while processing data coming over the line.static final int
The gateway is protected with a reg_info file, and the registration of a server failed due to incomplete permissions of the current server.static final int
Deprecated.replaced by JCO_ERROR_SERIALIZATIONstatic final int
A function module execution was cancelled because the scope/session, in which it was running, has been finished.static final int
Indicates that JCo has issues with resources, such as connections in a connection pool, destinations, or servers.static final int
static final int
Indicates an error in json stream.static final int
Exception thrown whenever the server detects an authorization violation.static final int
A server instance was used, for which the configuration was either deleted or updated.static final int
Something went wrong during the startup phase of a JCo server.static final int
static final int
Not used in standalone environment.static final int
The remote ABAP system is busy.static final int
A system failure has occurred in the remote SAP system.static final int
A timeout occurred while trying to logon to an ABAP system.static final int
The remote SAP system or the local systems runs under a codepage, which is not supported by JCoRuntime.static final int
An exception is thrown while processing XML like serialized data. -
Constructor Summary
ConstructorsConstructorDescriptionJCoException
(int group, String message) Creates an instance of the error object with the specified message.JCoException
(int group, String key, String message) Creates an instance of the error object with the specified message.JCoException
(int group, String message, String messageClass, char messageType, String messageNumber, String[] messageParameters, Throwable cause, String raisedBy) Creates an instance of the exception object with the specified message and more information for ABAP messages.JCoException
(int group, String key, String message, String messageClass, char messageType, String messageNumber, String[] messageParameters) Creates an instance of the exception object with the specified message and more information for ABAP messages.JCoException
(int group, String key, String message, String messageClass, char messageType, String messageNumber, String[] messageParameters, Throwable cause) Creates an instance of the exception object with the specified message and more information for ABAP messages.JCoException
(int group, String key, String message, String messageClass, char messageType, String messageNumber, String[] messageParameters, Throwable cause, String raisedBy) Creates an instance of the exception object with the specified message and more information for ABAP messages.JCoException
(int group, String key, String message, Throwable cause) Creates an instance of the error object with the specified message.JCoException
(int group, String message, Throwable cause) Creates an instance of the error object with the specified message. -
Method Summary
Modifier and TypeMethodDescriptionfinal int
getGroup()
Returns the error group.final String
getKey()
Returns the error key.Returns the ABAP message class, if T100 message information is available.Returns the ABAP message number, if T100 message information is available.getMessageParameter
(int index) Returns the ABAP message parameter at position index ornull
, if there is none at that position.String[]
Returns the ABAP message parameters as array.Returns the ABAP message text, if T100 message information is available.char
Returns the ABAP message type, if T100 message information is available.toString()
Returns a short description of this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
JCO_ERROR_PROGRAM
public static final int JCO_ERROR_PROGRAMThe application using JCo provides JCo wrong information or is behaving incorrectly.- See Also:
-
JCO_ERROR_CONFIGURATION
public static final int JCO_ERROR_CONFIGURATIONA general configuration error detected. If the configuration obtained from DestinationDataProvider or ServerDataProvider is wrong, incomplete or not unique- See Also:
-
JCO_ERROR_COMMUNICATION
public static final int JCO_ERROR_COMMUNICATIONException is caused by network problems, connection breakdowns, gateway problems, unavailability of the remote SAP system, etc. Anything that has to do with general communication failures.- See Also:
-
JCO_ERROR_LOGON_FAILURE
public static final int JCO_ERROR_LOGON_FAILUREAuthorization failures during the logon phase in the ABAP backend. Usually caused by unknown user name (typos), wrong password, invalid certificates, expired logon tickets etc. For resolving the issue either the configuration or the ABAP backend settings need to be adjusted. No issue in the JCo runtime.- See Also:
-
JCO_ERROR_SYSTEM_FAILURE
public static final int JCO_ERROR_SYSTEM_FAILUREA system failure has occurred in the remote SAP system. There are different causes possible: a message statement in the code (check out the additional information), a short dump of the work process, a process core or any other unexpected failure, such as uncaught exceptions. In any case, it's a good idea to check the runtime errors in the ABAP system (st22). It's nothing that could be solved in JCo coding.- See Also:
-
JCO_ERROR_APPLICATION_EXCEPTION
public static final int JCO_ERROR_APPLICATION_EXCEPTIONAn application error occurred in a JCo server.- See Also:
-
JCO_ERROR_RESOURCE
public static final int JCO_ERROR_RESOURCEIndicates that JCo has issues with resources, such as connections in a connection pool, destinations, or servers. Typically, there is a lack of resources, e.g. potentially due to high load or simply no destination available at all- See Also:
-
JCO_ERROR_PROTOCOL
public static final int JCO_ERROR_PROTOCOLAn internal communication protocol error has been detected, while processing data coming over the line.- See Also:
-
JCO_ERROR_INTERNAL
public static final int JCO_ERROR_INTERNALAn internal error in the JCo runtime. Typically, this is an unexpected situation, where it does not make sense to continue with normal processing. More details should be available in the message.- See Also:
-
JCO_ERROR_CANCELLED
public static final int JCO_ERROR_CANCELLEDA registered server connection has been canceled on the gateway.- See Also:
-
JCO_ERROR_STATE_BUSY
public static final int JCO_ERROR_STATE_BUSYThe remote ABAP system is busy. Try again later. This is typically a temporary situation.- See Also:
-
JCO_ERROR_ABAP_CLASS_EXCEPTION
public static final int JCO_ERROR_ABAP_CLASS_EXCEPTIONA ABAP class exception has been thrown by a function module in the remote system. Used forAbapClassException
.- See Also:
-
JCO_ERROR_REQUEST_CANCELLED
public static final int JCO_ERROR_REQUEST_CANCELLEDA function module execution was cancelled because the scope/session, in which it was running, has been finished. The backend will rollback anything that has not yet been committed.- See Also:
-
JCO_ERROR_REGISTRATION_DENIED
public static final int JCO_ERROR_REGISTRATION_DENIEDThe gateway is protected with a reg_info file, and the registration of a server failed due to incomplete permissions of the current server.- See Also:
-
JCO_ERROR_EXTENSION
public static final int JCO_ERROR_EXTENSIONAn exception is thrown due to a situation caused by an infrastructure extension.- See Also:
-
JCO_ERROR_NULL_HANDLE
public static final int JCO_ERROR_NULL_HANDLEA connection handle used internally is null.- See Also:
-
JCO_ERROR_CONVERSION
public static final int JCO_ERROR_CONVERSIONA conversion between two representations of either a parameter, structure, or table field has failed. E.g. this can happen when using one of theJCoRecord.setValue()
methods. Used inConversionException
.- See Also:
-
JCO_ERROR_FUNCTION_NOT_FOUND
public static final int JCO_ERROR_FUNCTION_NOT_FOUNDA function template could not completely be retrieved from the repository in a JCo server or an error occured during creation of it.- See Also:
-
JCO_ERROR_ILLEGAL_TID
public static final int JCO_ERROR_ILLEGAL_TIDAn invalid transaction ID has been encountered. The TID was either longer than 24 characters or contained illegal characters- See Also:
-
JCO_ERROR_UNSUPPORTED_CODEPAGE
public static final int JCO_ERROR_UNSUPPORTED_CODEPAGEThe remote SAP system or the local systems runs under a codepage, which is not supported by JCoRuntime.- See Also:
-
JCO_ERROR_ABAP_EXCEPTION
public static final int JCO_ERROR_ABAP_EXCEPTIONAn exception has been thrown by a function module in the remote system. Used forAbapException
.- See Also:
-
JCO_ERROR_FIELD_NOT_FOUND
public static final int JCO_ERROR_FIELD_NOT_FOUNDA field requested from either a JCoRecord or one of its extending. types does not exist- See Also:
-
JCO_ERROR_NOT_SUPPORTED
public static final int JCO_ERROR_NOT_SUPPORTEDUsed for various situations that are not supported within JCo. Moreover, it's used if a function received by a server is not supported by any call handler.- See Also:
-
JCO_ERROR_SERVER_STARTUP
public static final int JCO_ERROR_SERVER_STARTUPSomething went wrong during the startup phase of a JCo server. Usually, this is caused by network issues or the gateway is shutting down so that a registration is refused.- See Also:
-
JCO_ERROR_XML_PARSER
public static final int JCO_ERROR_XML_PARSERAn exception is thrown while processing XML like serialized data. Used forXMLParserException
.- See Also:
-
JCO_ERROR_ILLEGAL_ARGUMENT
public static final int JCO_ERROR_ILLEGAL_ARGUMENTAn illegal method argument has been detected.- See Also:
-
JCO_ERROR_CONCURRENT_CALL
public static final int JCO_ERROR_CONCURRENT_CALLA concurrent method call has been detected. This occurs, if a destination set to stateful in a certain scope/session is used concurrently in several threads. This should be avoided, as otherwise random results are possible.- See Also:
-
JCO_ERROR_INVALID_HANDLE
public static final int JCO_ERROR_INVALID_HANDLEA connection handle used internally is invalid, e.g. if trying to use a connection that was closed by lower layers- See Also:
-
JCO_ERROR_INITIALIZATION
public static final int JCO_ERROR_INITIALIZATIONSome initialization failed within JCo.- See Also:
-
JCO_ERROR_TIMEOUT
public static final int JCO_ERROR_TIMEOUTA timeout occurred while trying to logon to an ABAP system.- See Also:
-
JCO_ERROR_ILLEGAL_STATE
public static final int JCO_ERROR_ILLEGAL_STATEAn illegal situation occurred within JCo runtime.- See Also:
-
JCO_ERROR_CBRFC_SERIALIZE
public static final int JCO_ERROR_CBRFC_SERIALIZEAn exception is thrown while processing data in columnBased mode.- See Also:
-
JCO_ERROR_PASSWORD_CHANGE_REQUIRED
public static final int JCO_ERROR_PASSWORD_CHANGE_REQUIREDWhen connecting to a partner system that does not allow to logon with initial and expired passwords this group will be used.- See Also:
-
JCO_ERROR_DSR_LOAD_ERROR
public static final int JCO_ERROR_DSR_LOAD_ERRORDSR is turned on via JCo property, but the library could not loaded properly.- See Also:
-
JCO_ERROR_SESSION_REF_NOT_VALID
public static final int JCO_ERROR_SESSION_REF_NOT_VALID- See Also:
-
JCO_ERROR_JARM_LOAD_ERROR
public static final int JCO_ERROR_JARM_LOAD_ERRORjARM is turned on via JCo property, but the library could not loaded properly.- See Also:
-
JCO_ERROR_DATA_PROVIDER_ERROR
public static final int JCO_ERROR_DATA_PROVIDER_ERRORA data provider signaled an internal error to JCo.- See Also:
-
JCO_ERROR_SHAREABLE_CONTAINER
public static final int JCO_ERROR_SHAREABLE_CONTAINERNot used in standalone environment. (Re)Storing connection state failed.- See Also:
-
JCO_ERROR_CREATE_SESSION
public static final int JCO_ERROR_CREATE_SESSION- See Also:
-
JCO_ERROR_PASSIVATE_SESSION
public static final int JCO_ERROR_PASSIVATE_SESSION- See Also:
-
JCO_ERROR_RESTORE_SESSION
public static final int JCO_ERROR_RESTORE_SESSION- See Also:
-
JCO_ERROR_DESTROY_SESSION
public static final int JCO_ERROR_DESTROY_SESSION- See Also:
-
JCO_ERROR_CHECK_SESSION
public static final int JCO_ERROR_CHECK_SESSION- See Also:
-
JCO_ERROR_DESTINATION_DATA_INVALID
public static final int JCO_ERROR_DESTINATION_DATA_INVALIDA destination instance was used, for which the configuration was either deleted or updated. Hence, the old instance can no longer be used, but a new one should be fetched from theJCoDestinationManager
.
MethodJCoDestination.isValid()
returnsfalse
for the respective destination instance.- See Also:
-
JCO_ERROR_SERVER_DATA_INVALID
public static final int JCO_ERROR_SERVER_DATA_INVALIDA server instance was used, for which the configuration was either deleted or updated.- See Also:
-
JCO_ERROR_SERVER_ACCESS_DENIED
public static final int JCO_ERROR_SERVER_ACCESS_DENIEDException thrown whenever the server detects an authorization violation.- Since:
- JCo 3.1.0
- See Also:
-
JCO_ERROR_INVALID_REPOSITORY_CACHE
public static final int JCO_ERROR_INVALID_REPOSITORY_CACHEIndicates an invalid repository cache. Used to report issues in ABAP Repository or custom repository data.- See Also:
-
JCO_ERROR_SERIALIZATION
public static final int JCO_ERROR_SERIALIZATIONIndicates an error in json stream.- See Also:
-
JCO_ERROR_REPOSITORY_SERIALIZATION
public static final int JCO_ERROR_REPOSITORY_SERIALIZATIONDeprecated.replaced by JCO_ERROR_SERIALIZATIONIndicates an error in json stream for a repository.- See Also:
-
-
Constructor Details
-
JCoException
Creates an instance of the error object with the specified message.- Parameters:
group
- the error group identifying the errorkey
- error code to identify the errormessage
- the specified detail message
-
JCoException
Creates an instance of the error object with the specified message.- Parameters:
group
- the error group identifying the errormessage
- the specified detail message- Since:
- JCo 3.0.6
-
JCoException
Creates an instance of the error object with the specified message.- Parameters:
group
- the error group identifying the errorkey
- error code to identify the errormessage
- the specified detail messagecause
- a Throwable that caused the JCoException
-
JCoException
Creates an instance of the error object with the specified message.- Parameters:
group
- the error group identifying the errormessage
- the specified detail messagecause
- a Throwable that caused the JCoException- Since:
- JCo 3.0.6
-
JCoException
public JCoException(int group, String key, String message, String messageClass, char messageType, String messageNumber, String[] messageParameters) Creates an instance of the exception object with the specified message and more information for ABAP messages.- Parameters:
group
- the error group identifying the errorkey
- error code to identify the errormessage
- the specified detail messagemessageClass
- the specified ABAP message classmessageType
- the specified ABAP message type, e.g. 'A' or 'E'messageNumber
- the specified ABAP message numbermessageParameters
- the specified ABAP message Parameters
-
JCoException
public JCoException(int group, String key, String message, String messageClass, char messageType, String messageNumber, String[] messageParameters, Throwable cause) Creates an instance of the exception object with the specified message and more information for ABAP messages.- Parameters:
group
- the error group identifying the errorkey
- error code to identify the errormessage
- the specified detail messagemessageClass
- the specified ABAP message classmessageType
- the specified ABAP message type, e.g. 'A' or 'E'messageNumber
- the specified ABAP message numbermessageParameters
- the specified ABAP message Parameterscause
- a Throwable that caused the JCoException
-
JCoException
public JCoException(int group, String message, String messageClass, char messageType, String messageNumber, String[] messageParameters, Throwable cause, String raisedBy) Creates an instance of the exception object with the specified message and more information for ABAP messages.- Parameters:
group
- the error group identifying the errormessage
- the specified detail messagemessageClass
- the specified ABAP message classmessageType
- the specified ABAP message type, e.g. 'A' or 'E'messageNumber
- the specified ABAP message numbermessageParameters
- the specified ABAP message Parameterscause
- a Throwable that caused the JCoExceptionraisedBy
- some information about the system where the exception / message was raised from- Since:
- JCo 3.0.6
-
JCoException
public JCoException(int group, String key, String message, String messageClass, char messageType, String messageNumber, String[] messageParameters, Throwable cause, String raisedBy) Creates an instance of the exception object with the specified message and more information for ABAP messages.- Parameters:
group
- the error group identifying the errorkey
- error code to identify the errormessage
- the specified detail messagemessageClass
- the specified ABAP message classmessageType
- the specified ABAP message type, e.g. 'A' or 'E'messageNumber
- the specified ABAP message numbermessageParameters
- the specified ABAP message Parameterscause
- a Throwable that caused the JCoExceptionraisedBy
- some information about the system where the exception / message was raised from
-
-
Method Details
-
getGroup
public final int getGroup()Returns the error group.
Valid error groups are the constants in JCoException starting with the prefixJCO_ERROR
. Details about the different meanings are available there.- Returns:
- the error group
-
getKey
Returns the error key.
This is a string representation of the group.- Returns:
- the error key
-
getMessageClass
Returns the ABAP message class, if T100 message information is available.- Returns:
- the ABAP message class
-
getMessageNumber
Returns the ABAP message number, if T100 message information is available.- Returns:
- the ABAP message number
-
getMessageText
Returns the ABAP message text, if T100 message information is available.
This is a concatenation of all T100 parameters. Calling this method makes sense if the message is mainly built from parameters.- Returns:
- the ABAP message text
-
getMessageParameter
Returns the ABAP message parameter at position index ornull
, if there is none at that position.
Prerequisite is that T100 information is available at all.- Parameters:
index
- index of the parameter valid is between 0 and 3- Returns:
- the ABAP message parameter or
null
, if there is none
-
getMessageParameters
Returns the ABAP message parameters as array.
Note: parameters that are not filled can benull
. Prerequisite is that T100 information is available at all.- Returns:
- the ABAP message parameters as array
-
getMessageType
public char getMessageType()Returns the ABAP message type, if T100 message information is available.- Returns:
- the ABAP message type
-
toString
Returns a short description of this exception.
-