Class ServerFailureException

All Implemented Interfaces:
OperationResult, XMLMarshallable, Serializable

public class ServerFailureException extends OperationFailureException
Exception thrown when a nonbusiness exception occurs in the connected SAP CC Core Server system; The initial operation request has failed but no change is stored in the back-end database system.

Important Note

This exception is specified in HCI but it is available in both technical interfaces:

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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    600: Reason code for old use of access (in subscription)
    static final int
    900: Reason code when the operation cannot be audited
    static final int
    401: 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 int
    101: Reason code when the SAP CC system cannot lock resources into the back-end database system after having tried several attempts.
    static final int
    404: Reason code when a currency is unknown because the currency is not defined.
    static final int
    102: Reason code when the SAP CC system is failing over due to a database failure.
    static final int
    100: Reason code when a failure occurred with the back-end database system.
    static final int
    302: Reason code relative to a service operation invocation on HCI APIs which is in concurrency with another operation
    static final int
    300: 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 int
    301: Reason code relative to a service operation invocation on HCI APIs which is not supported
    static final int
    2: Reason code when the server system cannot load its configuration due to out of rank parameter values or missing parameter values
    static final int
    500: Reason code for networking/communication issues between rater, backups, and updater instances
    static final int
    501: Reason code when the server system encountered some I/O failure.
    static final int
    203: Reason code relative to fulfilling of queues implemented by the message protocol specified
    static final int
    204: Reason code relative to a service invocation on message APIs which is not supported
    static final int
    402: Reason code when the subscription cannot be charged because its related offer is temporary inaccessible due to cache refreshing process.
    static final int
    1: Reason code when the server system is shutting down
    static final int
    200: Reason code when the SAP CC system cannot execute the operation request (Java API) with the required timeout
    static final int
    502: Reason code when the SAP CC system encountered communication/network issues while trying to reply to your client application (or system).
    static final int
    800: Reason code when the backup rejects a rating request due to the restarting of the original rater regarding to the partition ID
    static final int
    201: Reason code when the message is sent to the stateful API is not conformed to the stateful protocol specified in the Java APIs
    static final int
    202: Reason code when the message is sent to the stateless API is not conformed to the stateless protocol specified in the Java APIs
    static final int
    700: Reason code when the backup rejects a rating request due to the restarting of the original rater regarding to the partition ID
    static final String
    The XML tag name of the class failure exception/operation result.
    static final int
    403: Reason code when the subscription cannot be charged because taxes are temporary inaccessible due to cache refreshing process.
    static final int
    0: 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 a Java error and is not supported by the connected SAP CC system; All reasons relative to general server system failure get an ID of -1.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Reserved 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 Type
    Method
    Description
    void
    Adds character data to the content element.
    void
    addChild(String tagName, XMLMarshallable child)
    Adds a child to the object, the child representing the marshallable object which must be added to the element.
    void
    attach(Object object)
    Attaches 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 is null.
    int
    Returns the reason code of the exception.
    Returns the original nested exception which is the cause of this generated ServerFailureException.
    void
    Gives an XML representation of this object, including its children.
    int
    Retrieves the numerical reason code from the reason string XML representation.
    Returns the XML reason name from the reason code.
    void
    Sets the attributes of the XML representation of the element being processed.
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • TAG_NAME

      public static final String 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 a Java error and 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_FAILURE
      0: 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_DOWN
      1: Reason code when the server system is shutting down
      See Also:
    • INCOMPATIBLE_CONFIGURATION

      public static final int INCOMPATIBLE_CONFIGURATION
      2: 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_FAILURE
      100: 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_RESOURCE
      101: 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_FAILOVER
      102: 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_TIMEOUT
      200: 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_PROTOCOL
      201: 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_PROTOCOL
      202: 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_FULL
      203: Reason code relative to fulfilling of queues implemented by the message protocol specified
      See Also:
    • MESSAGE_UNSUPPORTED_SERVICE

      public static final int MESSAGE_UNSUPPORTED_SERVICE
      204: 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_PROTOCOL
      300: 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_SERVICE
      301: 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_OPERATION
      302: 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_FAILURE
      401: 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_REFRESHING
      402: 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_REFRESHING
      403: 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_DEFINED
      404: 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_FAILURE
      500: Reason code for networking/communication issues between rater, backups, and updater instances
      See Also:
    • IO_FAILURE

      public static final int IO_FAILURE
      501: 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_FAILURE
      502: 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_FAILURE
      600: Reason code for old use of access (in subscription)
      See Also:
    • SWITCH_BACK_TO_RATER

      public static final int SWITCH_BACK_TO_RATER
      700: 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_LOADER
      800: 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_FAILURE
      900: 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

      public ServerFailureException(int reason, String msg, Throwable t)
      Builds the exception.
      Parameters:
      reason - The exception reason
      msg - The exception message
      t - The nested (throwable) exception
    • ServerFailureException

      public ServerFailureException(int reason, String msg)
      Builds the reason/message exception.
      Parameters:
      reason - The exception reason
      msg - The exception message
  • Method Details