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

camel-core - FailedToCreateRouteException issue if route is very long and complex uris that cannot be sanitized

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.7.5
    • 3.11.6, 3.14.1, 3.15.0
    • camel-core
    • None
    • Unknown

    Description

      In my case, the route string is a bit complex and long.

      So the sanitizeUri function was not finished and camel context was stuck.

      How about cut the route string first, then check and sanitize string.

      I think it is better way and improving performance.

      Please check this and let me change this.

      protected static String getRouteMessage(String route) {
          // ensure to sanitize uri's in the route so we do not show sensitive information such as passwords
          route = URISupport.sanitizeUri(route);
      
          // cut the route after 60 chars so it won't be too big in the message
          // users just need to be able to identify the route so they know where to look
          if (route.length() > 60) {
              return route.substring(0, 60) + "...";
          } else {
              return route;
          }
      } 

      Attachments

        1. sample_xml.txt
          15 kB
          Mingu Song

        Activity

          People

            davsclaus Claus Ibsen
            songmingu Mingu Song
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: