Class ServerFailureException
- All Implemented Interfaces:
OperationResult,XMLMarshallable,Serializable
Important Note
This exception is specified in HCI but it is available in both technical interfaces:
- Message TCP (convergent charging services)
- HTTP Communication Interface (HCI)
Implementation in Your Client Application
Exception and Error Handling
Depending on your business requirements, design and develop the handling functions in your client application.
Consult the Field Detail section for more information about the failure to handle in your client application.
When your client application receives this exception, it means that the initial operation request did not succeed and any change has been performed into the back-end database system: the database transaction has been rolled back.
Use the getMessage() method that returns the message of the nested exception
if it exists.
This exception is used to transform in a single common exception a large
set of internal exceptions (Runtimes exception for most of them)
that occurs in on server side in the connected SAP CC Core Server system. That the reason why
this exception manages a nested Throwable attribute which is initialized
with the original exception. The SAP CC system never transmits this nested exception
to your client application.
Note
Each time a Server Failure exception is raised and
created from an internal exception, the SAP CC Core Server system records the
nested (internal) exception stack trace in the logs or traces.
The SAP CC system records also the Server Failure exception
sent to your client application. This facilitates the troubleshooting of problems and potential anomaly.
Reason Categories
| Reason Category | Reason Code Range | Failures | Customizing and Implementation | Troubleshooting (Next Steps) |
|---|---|---|---|---|
| Unsupported Java failure in the SAP CC system | -1 | -1: Unsupported Java failure |
Note To design the exception and error handling functions (automated treatments, logging and manual treatments), see the Field Detail section in this topic. Refer to the information available in the Customizing subsection of each failure to develop your integration code. |
Note For troubleshooting investigations, see the Field Detail section in this topic. Refer to the information available in the Next Steps subsection of each failure. |
| All reasons relative to general SAP CC system failure (server failure) | 0 to 99 | |||
| All reasons relative to the back-end database system | 100 to 199 | |||
| All reasons relative to the Message TCP technical interface | 200 to 299 | |||
| All reasons relative to the HTTP Communication Interface (HCI) | 300 to 399 | |||
| All reasons relative to the data cache management | 400 to 499 | |||
| All the server-side networking/communication issues | 500 to 599 | |||
| Access Control Functions and Customer Master Data Identification | 600 to 699 | |||
| Guiding Functions | 700 to 799 | |||
| Bulk Loading Functions | 800 to 899 | |||
| Audit Functions | 900 to 999 |
Consider the detailed information in the Field Detail section.
- See Also:
XML API for HCI
The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="serverFault">
<xs:complexType>
<xs:attribute name="message" type="xs:string"/>
<xs:attribute name="reason" type="ServerFaultReasonType"/>
</xs:complexType>
</xs:element>
<xs:simpleType name="ServerFaultReasonType">
<xs:restriction base="xs:string">
<xs:enumeration value="databaseFailure"/>
<xs:enumeration value="databaseFailover"/>
<xs:enumeration value="serverTimeoutOccured"/>
<xs:enumeration value="cannotLockResource"/>
<xs:enumeration value="IOFailure"/>
<xs:enumeration value="interInstanceCommunicationFailure"/>
<xs:enumeration value="serverShuttingDown"/>
<xs:enumeration value="statefulServiceViolationProtocol"/>
<xs:enumeration value="statelessServiceViolationProtocol"/>
<xs:enumeration value="hciServiceViolationProtocol"/>
<xs:enumeration value="cacheInvalidationFailure"/>
<xs:enumeration value="messageQueueFull"/>
<xs:enumeration value="messageUnsupportedService"/>
<xs:enumeration value="hciUnsupportedService"/>
<xs:enumeration value="hciConcurrency"/>
<xs:enumeration value="incompatibleConfiguration"/>
<xs:enumeration value="serverToClientCommunicationFailure"/>
<xs:enumeration value="accessCompatibilityFailure"/>
<xs:enumeration value="unsupportedFailure"/>
<xs:enumeration value="offerCacheBusyWhileRefreshing"/>
<xs:enumeration value="switchBackToRater"/>
<xs:enumeration value="unsupportedJavaFailure"/>
<xs:enumeration value="auditFailure"/>
</xs:restriction>
</xs:simpleType>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int600: Reason code for old use of access (in subscription)static final int900: Reason code when the operation cannot be auditedstatic final int401: Reason code when the updater instance did not succeed to update in a synchronous way, the data caches belonging to the rater instances of the SAP CC system.static final int101: Reason code when the SAP CC system cannot lock resources into the back-end database system after having tried several attempts.static final int404: Reason code when a currency is unknown because the currency is not defined.static final int102: Reason code when the SAP CC system is failing over due to a database failure.static final int100: Reason code when a failure occurred with the back-end database system.static final int302: Reason code relative to a service operation invocation on HCI APIs which is in concurrency with another operationstatic final int300: Reason code when the XML stream received by the HCI listeners (updater and admin) is not conformed to the HCI protocol specified in the XML APIs;static final int301: Reason code relative to a service operation invocation on HCI APIs which is not supportedstatic final int2: Reason code when the server system cannot load its configuration due to out of rank parameter values or missing parameter valuesstatic final int500: Reason code for networking/communication issues between rater, backups, and updater instancesstatic final int501: Reason code when the server system encountered some I/O failure.static final int203: Reason code relative to fulfilling of queues implemented by the message protocol specifiedstatic final int204: Reason code relative to a service invocation on message APIs which is not supportedstatic final int402: Reason code when the subscription cannot be charged because its related offer is temporary inaccessible due to cache refreshing process.static final int1: Reason code when the server system is shutting downstatic final int200: Reason code when the SAP CC system cannot execute the operation request (Java API) with the required timeoutstatic final int502: Reason code when the SAP CC system encountered communication/network issues while trying to reply to your client application (or system).static final int800: Reason code when the backup rejects a rating request due to the restarting of the original rater regarding to the partition IDstatic final int201: Reason code when the message is sent to the stateful API is not conformed to the stateful protocol specified in the Java APIsstatic final int202: Reason code when the message is sent to the stateless API is not conformed to the stateless protocol specified in the Java APIsstatic final int700: Reason code when the backup rejects a rating request due to the restarting of the original rater regarding to the partition IDstatic final StringThe XML tag name of the class failure exception/operation result.static final int403: Reason code when the subscription cannot be charged because taxes are temporary inaccessible due to cache refreshing process.static final int0: Contact your SAP Support Team - Reason code when the server system failure is unknown or not supported by the connected SAP CC system; There is a potential software anomaly.static final int-1: Contact your SAP Support Team - Reason code when the server system failure is aJava errorand is not supported by the connected SAP CC system; All reasons relative to general server system failure get an ID of-1. -
Constructor Summary
ConstructorsConstructorDescriptionReserved for HCI/XML protocol incarnation; DO NOT USE.ServerFailureException(int reason, String msg) Builds the reason/message exception.ServerFailureException(int reason, String msg, Throwable t) Builds the exception. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCharacterData(String cData) Adds character data to the content element.voidaddChild(String tagName, XMLMarshallable child) Adds a child to the object, thechildrepresenting the marshallable object which must be added to the element.voidAttaches an object to this exception.Returns the object attached to this exception.Returns a readable exception description.Gets the code or the reference (if no code exists) that identifies the operand of the operation request; If the operation is not auditable, the operand reference isnull.intReturns the reason code of the exception.Returns the original nested exception which is the cause of this generatedServerFailureException.voidmarshal(XMLOutputter output) Gives an XML representation of this object, including its children.intparseReason(String str) Retrieves the numerical reason code from the reason string XML representation.reasonToString(int r) Returns the XML reason name from the reason code.voidsetAttributes(XMLAttributes atts) Sets the attributes of the XML representation of the element being processed.toString()Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Field Details
-
TAG_NAME
The XML tag name of the class failure exception/operation result.- See Also:
-
UNSUPPORTED_JAVA_FAILURE
public static final int UNSUPPORTED_JAVA_FAILURE-1: Contact your SAP Support Team - Reason code when the server system failure is aJava errorand is not supported by the connected SAP CC system; All reasons relative to general server system failure get an ID of-1.Next Steps
Caution
Contact a support specialist from your SAP Support Team.
- See Also:
-
UNSUPPORTED_FAILURE
public static final int UNSUPPORTED_FAILURE0: Contact your SAP Support Team - Reason code when the server system failure is unknown or not supported by the connected SAP CC system; There is a potential software anomaly.Next Steps
Caution
Contact a support specialist from your SAP Support Team.
- See Also:
-
SERVER_SHUTTING_DOWN
public static final int SERVER_SHUTTING_DOWN1: Reason code when the server system is shutting down- See Also:
-
INCOMPATIBLE_CONFIGURATION
public static final int INCOMPATIBLE_CONFIGURATION2: Reason code when the server system cannot load its configuration due to out of rank parameter values or missing parameter values- See Also:
-
DATABASE_FAILURE
public static final int DATABASE_FAILURE100: Reason code when a failure occurred with the back-end database system.Next Steps
Verify the logs (and traces) of the SAP CC Core Server system to get the related database error information. Contact the database administrator (dba).
- See Also:
-
CANNOT_LOCK_RESOURCE
public static final int CANNOT_LOCK_RESOURCE101: Reason code when the SAP CC system cannot lock resources into the back-end database system after having tried several attempts.This error occurs:
- When a database deadlock is detected
- If the resource in the database is busy
- If an SAP CC business object is locked y another process
Next Steps
Check the value of the SQLHELPER_MAX_REDO system parameter.
- See Also:
-
DATABASE_FAILOVER
public static final int DATABASE_FAILOVER102: Reason code when the SAP CC system is failing over due to a database failure. This error occurs when a transaction cannot be completed on the same database node because the database node failed over.The charging operation request can be re-attempted.
Next Steps
Design and develop the implementation of the automated processing of this particulare case to request the charging operation again to the SAP CC system.
- See Also:
-
SERVER_TIMEOUT
public static final int SERVER_TIMEOUT200: Reason code when the SAP CC system cannot execute the operation request (Java API) with the required timeout- See Also:
-
STATEFUL_SERVICE_VIOLATION_PROTOCOL
public static final int STATEFUL_SERVICE_VIOLATION_PROTOCOL201: Reason code when the message is sent to the stateful API is not conformed to the stateful protocol specified in the Java APIs- See Also:
-
STATELESS_SERVICE_VIOLATION_PROTOCOL
public static final int STATELESS_SERVICE_VIOLATION_PROTOCOL202: Reason code when the message is sent to the stateless API is not conformed to the stateless protocol specified in the Java APIs- See Also:
-
MESSAGE_QUEUE_FULL
public static final int MESSAGE_QUEUE_FULL203: Reason code relative to fulfilling of queues implemented by the message protocol specified- See Also:
-
MESSAGE_UNSUPPORTED_SERVICE
public static final int MESSAGE_UNSUPPORTED_SERVICE204: Reason code relative to a service invocation on message APIs which is not supported- See Also:
-
HCI_SERVICE_VIOLATION_PROTOCOL
public static final int HCI_SERVICE_VIOLATION_PROTOCOL300: Reason code when the XML stream received by the HCI listeners (updater and admin) is not conformed to the HCI protocol specified in the XML APIs;- See Also:
-
HCI_UNSUPPORTED_SERVICE
public static final int HCI_UNSUPPORTED_SERVICE301: Reason code relative to a service operation invocation on HCI APIs which is not supported- See Also:
-
HCI_CONCURRENCY_OPERATION
public static final int HCI_CONCURRENCY_OPERATION302: Reason code relative to a service operation invocation on HCI APIs which is in concurrency with another operation- See Also:
-
CACHE_INVALIDATION_FAILURE
public static final int CACHE_INVALIDATION_FAILURE401: Reason code when the updater instance did not succeed to update in a synchronous way, the data caches belonging to the rater instances of the SAP CC system.- See Also:
-
OFFER_CACHE_BUSY_WHILE_REFRESHING
public static final int OFFER_CACHE_BUSY_WHILE_REFRESHING402: Reason code when the subscription cannot be charged because its related offer is temporary inaccessible due to cache refreshing process.- See Also:
-
TAX_CACHE_BUSY_WHILE_REFRESHING
public static final int TAX_CACHE_BUSY_WHILE_REFRESHING403: Reason code when the subscription cannot be charged because taxes are temporary inaccessible due to cache refreshing process.- See Also:
-
CURRENCY_IS_NOT_DEFINED
public static final int CURRENCY_IS_NOT_DEFINED404: Reason code when a currency is unknown because the currency is not defined.- See Also:
-
INTER_INSTANCE_COMMUNICATION_FAILURE
public static final int INTER_INSTANCE_COMMUNICATION_FAILURE500: Reason code for networking/communication issues between rater, backups, and updater instances- See Also:
-
IO_FAILURE
public static final int IO_FAILURE501: Reason code when the server system encountered some I/O failure.- See Also:
-
SERVER_TO_CLIENT_COMMUNICATION_FAILURE
public static final int SERVER_TO_CLIENT_COMMUNICATION_FAILURE502: Reason code when the SAP CC system encountered communication/network issues while trying to reply to your client application (or system).- See Also:
-
ACCESS_COMPATIBILITY_FAILURE
public static final int ACCESS_COMPATIBILITY_FAILURE600: Reason code for old use of access (in subscription)- See Also:
-
SWITCH_BACK_TO_RATER
public static final int SWITCH_BACK_TO_RATER700: Reason code when the backup rejects a rating request due to the restarting of the original rater regarding to the partition ID- See Also:
-
SLEEPING_BULK_LOADER
public static final int SLEEPING_BULK_LOADER800: Reason code when the backup rejects a rating request due to the restarting of the original rater regarding to the partition ID- See Also:
-
AUDIT_FAILURE
public static final int AUDIT_FAILURE900: Reason code when the operation cannot be audited- See Also:
-
-
Constructor Details
-
ServerFailureException
public ServerFailureException()Reserved for HCI/XML protocol incarnation; DO NOT USE. -
ServerFailureException
Builds the exception.- Parameters:
reason- The exception reasonmsg- The exception messaget- The nested (throwable) exception
-
ServerFailureException
Builds the reason/message exception.- Parameters:
reason- The exception reasonmsg- The exception message
-
-
Method Details
-
attach
Attaches an object to this exception.- Parameters:
object- The object to be attached (can be null); Is retrieved thanks to the methodattachment().
-
attachment
Returns the object attached to this exception.- Returns:
- The object set thanks to the method
attach(Object)
-
getMessage
Returns a readable exception description.- Overrides:
getMessagein classThrowable- Returns:
- A readable description of the exception
-
getThrowable
Returns the original nested exception which is the cause of this generatedServerFailureException.Note
This method returns always
nullin your client application (client side).- Returns:
- The nested exception (server side only) or
null(client side)
-
setAttributes
Description copied from interface:XMLMarshallableSets the attributes of the XML representation of the element being processed.- Parameters:
atts- TheXML attributesof the current element
-
addCharacterData
Description copied from interface:XMLMarshallableAdds character data to the content element.- Parameters:
cData- The character data to be added
-
addChild
Description copied from interface:XMLMarshallableAdds a child to the object, thechildrepresenting the marshallable object which must be added to the element.- Parameters:
tagName- The name of tag for the childchild- The child to be added
-
marshal
Description copied from interface:XMLMarshallableGives an XML representation of this object, including its children.- Parameters:
output- TheXML outputto marshal the object into
-
getOperandReference
Description copied from interface:OperationResultGets the code or the reference (if no code exists) that identifies the operand of the operation request; If the operation is not auditable, the operand reference isnull.- Specified by:
getOperandReferencein interfaceOperationResult- Overrides:
getOperandReferencein classOperationFailureException- Returns:
- The operand reference of the operation result
-
getReason
public int getReason()Returns the reason code of the exception.The available reasons are:
unsupportedFailureserverShuttingDownincompatibleConfigurationdatabaseFailuredatabaseFailovercannotLockResourceserverTimeoutOccuredstateFulServiceViolationProtocolstateLessServiceViolationProtocolmessageQueueFullmessageUnsupportedServicehciServiceViolationProtocolhciUnsupportedServicecacheInvalidationFailureinterInstanceCommunicationFailureIOFailureserverToClientCommunicationFailureaccessCompatibilityFailureofferCacheBusyWhileRefreshingtaxCacheBusyWhileRefreshingswitchBackToRaterauditFailure
Check the Field Summary of the XSD Fragment section to have a complete list.
- Returns:
- The reason code of the exception
-
parseReason
Retrieves the numerical reason code from the reason string XML representation.- Parameters:
str- The reason XML representation- Returns:
- The numeric code of the reason
-
reasonToString
Returns the XML reason name from the reason code.- Parameters:
r- The reason code- Returns:
- The XML name of the reason
-
toString
-