Uploaded image for project: 'FUSE Mediation Router'
  1. FUSE Mediation Router
  2. MR-475

URISyntaxException when running examples with Maven local repository in a directory that contains spaces

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 2.7.1-fuse-00-43
    • 2.6.0-fuse-01-15
    • None
    • None

    Description

      Examples that come with Camel, including but probably not limited to:

      Camel :: Example :: CXF (camel-example-cxf)
      Camel :: Example :: ETL (camel-example-etl)
      Camel :: Example :: Loan-Broker (camel-example-loan-broker)
      Camel :: Example :: Spring :: JMS (camel-example-spring-jms)

      are causing an exception similar to

       
      org.apache.camel.RuntimeCamelException: org.apache.camel.TypeConverterLoaderException: Failed to load type converters 
      because of: Cannot find package names to be used for classpath scanning for annotated type converters.
      	at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1139)
      	at org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:971)
      	at org.apache.camel.impl.DefaultCamelContext.getTypeConverterRegistry(DefaultCamelContext.java:986)
      	at org.apache.camel.impl.DefaultCamelContext.forceLazyInitialization(DefaultCamelContext.java:1908)
      	at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1403)
      	at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1321)
      	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
      	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
      	at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1299)
      	at org.apache.camel.example.cxf.CamelCxfExample.main(CamelCxfExample.java:83)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:283)
      	at java.lang.Thread.run(Thread.java:662)
      Caused by: org.apache.camel.TypeConverterLoaderException: Failed to load type converters because of: Cannot find package 
      names to be used for classpath scanning for annotated type converters.
      	at org.apache.camel.impl.converter.AnnotationTypeConverterLoader.load(AnnotationTypeConverterLoader.java:74)
      	at org.apache.camel.impl.converter.BaseTypeConverterRegistry.loadTypeConverters(BaseTypeConverterRegistry.java:395)
      	at org.apache.camel.impl.converter.DefaultTypeConverter.doStart(DefaultTypeConverter.java:41)
      	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:67)
      	at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:54)
      	at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:60)
      	at org.apache.camel.impl.DefaultCamelContext.startServices(DefaultCamelContext.java:1593)
      	at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:884)
      	at org.apache.camel.impl.DefaultCamelContext.getTypeConverter(DefaultCamelContext.java:969)
      	... 14 more
      Caused by: java.net.URISyntaxException: Illegal character in opaque part at index 22: jar:file:/C:/Documents and Settings/User
      /.m2/repository/org/apache/camel/camel-core/2.6.0-fuse-01-15/camel-core-2.6.0-fuse-01-15.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)
      	... 22 more
      
      

      when run on a Windows machine that has Maven's local repository inside the "Documents and Settings" directory. This may not be a platform-specific problem. A customer encountered it on Windows because on Windows the default directory for Maven's local repository contains spaces in its name.

      There seems to be a patch available for this at Apache.

      Attachments

        Activity

          People

            janstey@redhat.com Jonathan Anstey
            stanii Stan Livitski (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: