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

AnnotationTypeConverterLoader fails for folders containing spaces

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.7.1
    • 2.7.3, 2.8.0
    • camel-core
    • None
    • Windows XP

    • Patch Available

    Description

      This problem appears when jar dependencies with type converters have path containing space characters.

      In my case, the camel-mail-2.7.1.jar jar is located in my local maven repository.

      I get this error during my project startup:

      [...]
      Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 22: jar:file:/D:/Documents and Settings/501915291/.m2/repository/org/apache/camel/camel-mail/2.7.1/camel-mail-2.7.1.jar!/META-INF/services/org/apache/camel/TypeConverter
              at java.net.URI$Parser.fail(URI.java:2809)
              at java.net.URI$Parser.checkChars(URI.java:2982)
              at java.net.URI$Parser.parse(URI.java:3019)
              at java.net.URI.<init>(URI.java:578)
              at java.net.URL.toURI(URL.java:918)
              at org.apache.camel.impl.converter.AnnotationTypeConverterLoader.findPackages(AnnotationTypeConverterLoader.java:118)
              at org.apache.camel.impl.converter.AnnotationTypeConverterLoader.findPackageNames(AnnotationTypeConverterLoader.java:108)
              at org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:69)
              ... 63 more
      

      FIX:
      findPackages method in AnnotationTypeConverterLoader shouldn't use URIs to store already visited jars.

      Attachments

        1. spaces_issue.patch
          2 kB
          Jean-Christophe Delmas

        Activity

          People

            davsclaus Claus Ibsen
            jcdelmas Jean-Christophe Delmas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified