com.marklogic.xcc.exceptions

## Class ContentInsertException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - com.marklogic.xcc.exceptions.XccException
      - - com.marklogic.xcc.exceptions.RequestException
        - - com.marklogic.xcc.exceptions.RequestServerException
          - - com.marklogic.xcc.exceptions.ContentInsertException

- All Implemented Interfaces:
    java.io.Serializable
  Direct Known Subclasses:
    ContentInsertEntityException

      public class ContentInsertException
      extends RequestServerException

  This exception indicates a failed attempt to insert a `Content` object. Such failures are automatically retried up the number of times allowed by the request's options (`RequestOptions.setMaxAutoRetry(int)`). If this exception occurs, either all retries have been exhausted, no retries were configured, or the specific `Content` instance was not retryable ( `Content.isRewindable()`).
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ContentInsertException(java.lang.String message, Request request, Content content)`
    `ContentInsertException(java.lang.String message, Request request, Content content, java.lang.Throwable cause)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Content` | `getContent()` The `Content` object that could not be inserted.
    `java.lang.String` | `getContentUri()` The URI, as a String, of the `Content` that could not be inserted.

    - ### Methods inherited from class com.marklogic.xcc.exceptions.RequestException

      `appendRequestInfo, getRequest, isRetryable, isRetryAdvised, toString`

    - ### Methods inherited from class java.lang.Throwable

      `addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### ContentInsertException

          public ContentInsertException(java.lang.String message,
                                        Request request,
                                        Content content)

    - #### ContentInsertException

          public ContentInsertException(java.lang.String message,
                                        Request request,
                                        Content content,
                                        java.lang.Throwable cause)

  - ### Method Detail

    - #### getContent

          public Content getContent()

      The `Content` object that could not be inserted.
      Returns:
        an instance of `Content`.

    - #### getContentUri

          public java.lang.String getContentUri()

      The URI, as a String, of the `Content` that could not be inserted.
      Returns:
        a URI String.

Copyright © 2025 MarkLogic Corporation. All Rights Reserved.

Complete online documentation for MarkLogic Server, XQuery and related components may be found at developer.marklogic.com