Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-7804

MessageHelper - dump message for logging should catch throwable

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.12.5, 2.13.3, 2.14.0, 2.15.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      For example if creating some exception to be logged and the message payload causes some problem, like OOME etc, then we should be resilient to this so the caused exception can be created and logged.

      Caused by: java.lang.OutOfMemoryError: Java heap space
          at java.util.Arrays.copyOf(Arrays.java:2367)
          at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:130)
          at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:114)
          at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:415)
          at java.lang.StringBuilder.append(StringBuilder.java:132)
          at java.lang.StringBuilder.append(StringBuilder.java:128)
          at java.util.AbstractMap.toString(AbstractMap.java:523)
          at java.lang.String.valueOf(String.java:2854)
          at java.lang.StringBuilder.append(StringBuilder.java:128)
          at java.util.AbstractMap.toString(AbstractMap.java:523)
          at java.lang.String.valueOf(String.java:2854)
          at java.lang.StringBuilder.append(StringBuilder.java:128)
          at org.apache.camel.processor.DefaultExchangeFormatter.format(DefaultExchangeFormatter.java:99)
          at org.apache.camel.util.MessageHelper.doDumpMessageHistoryStacktrace(MessageHelper.java:475)
          at org.apache.camel.util.MessageHelper.dumpMessageHistoryStacktrace(MessageHelper.java:425)
          at org.apache.camel.processor.RedeliveryErrorHandler.logFailedDelivery(RedeliveryErrorHandler.java:990)
      

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              davsclaus Claus Ibsen
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: