8 Replies Latest reply on Dec 14, 2010 11:14 AM by Peter Chandler

    Route, from ftp to a local file.

    Peter Chandler Master

      To route from FTP to a local file should be simple (right off the web page). However, I am getting:

       

      Exception:

      No type converter available to convert from type: org.apache.camel.component.file.remote.RemoteFile to the required type: java.io.InputStream

       

      Help any ideas on how to fix this issue?

       

      The Camel Route:

        <route>  
            <from uri="ftp://username@host.domain.com/subdir/?password=MyPassword&amp;binary=true&amp;consumer.delay=1000&amp;passiveMode=true&amp;localWorkDirectory=temp"></from> 
            <to uri="file://inbox"></to> 
        </route>
      

       

      Exception:

      ...
      2010-12-08 18:57:10,004 [Camel thread 0: FtpComponent] TRACE - Polling directory: subdir
      2010-12-08 18:57:10,302 [Camel thread 0: FtpComponent] DEBUG - Total 13 files to consume
      ...
      2010-12-08 18:57:10,605 [Camel thread 0: FtpComponent] TRACE - Starting service: Producer[file://inbox]
      2010-12-08 18:57:10,605 [Camel thread 0: FtpComponent] DEBUG - Starting producer: Producer[file://inbox]
      2010-12-08 18:57:10,606 [Camel thread 0: FtpComponent] DEBUG - Adding to producer cache with key: Endpoint[file://inbox] for producer: Producer[file://inbox]
      2010-12-08 18:57:10,607 [Camel thread 0: FtpComponent] TRACE - Processing Exchange[Message: GenericFile[PETER_20101208_225457Z.xml.gz]]
      2010-12-08 18:57:10,608 [Camel thread 0: FtpComponent] TRACE - Converting org.apache.camel.component.file.remote.RemoteFile -> java.io.InputStream with value: GenericFile[PETER_20101208_225457Z.xml.gz]
      2010-12-08 18:57:10,608 [Camel thread 0: FtpComponent] TRACE - Converting org.apache.camel.impl.DefaultMessage -> java.io.InputStream with value: Message: GenericFile[PETER_20101208_225457Z.xml.gz]
      2010-12-08 18:57:10,608 [Camel thread 0: FtpComponent] TRACE - Building starting directory: inbox
      2010-12-08 18:57:10,608 [Camel thread 0: FtpComponent] TRACE - About to write [inbox/a8b72b9c-22dd-4af6-a1ad-cdb6b6df5527] to [Endpoint[file://inbox]] from exchange [Exchange[Message: GenericFile[PETER_20101208_225457Z.xml.gz]]]
      2010-12-08 18:57:10,608 [Camel thread 0: FtpComponent] TRACE - Converting org.apache.camel.component.file.remote.RemoteFile -> java.io.File with value: GenericFile[PETER_20101208_225457Z.xml.gz]
      2010-12-08 18:57:10,608 [Camel thread 0: FtpComponent] TRACE - Converting org.apache.camel.impl.DefaultMessage -> java.io.File with value: Message: GenericFile[PETER_20101208_225457Z.xml.gz]
      2010-12-08 18:57:10,610 [Camel thread 0: FtpComponent] TRACE - Converting org.apache.camel.component.file.remote.RemoteFile -> java.io.InputStream with value: GenericFile[PETER_20101208_225457Z.xml.gz]
      2010-12-08 18:57:10,611 [Camel thread 0: FtpComponent] TRACE - to: Recording duration: 16 millis for exchange: Exchange[GenericFileMessage with file: GenericFile[PETER_20101208_225457Z.xml.gz]]
      2010-12-08 18:57:10,611 [Camel thread 0: FtpComponent] TRACE - to: Recording duration: 16 millis for exchange: Exchange[GenericFileMessage with file: GenericFile[PETER_20101208_225457Z.xml.gz]]
      2010-12-08 18:57:10,611 [Camel thread 0: FtpComponent] TRACE - Finding best suited exception policy for thrown exception org.apache.camel.NoTypeConversionAvailableException
      2010-12-08 18:57:10,611 [Camel thread 0: FtpComponent] TRACE - Finding best suited exception policy for thrown exception org.apache.camel.InvalidPayloadException
      2010-12-08 18:57:10,612 [Camel thread 0: FtpComponent] TRACE - Finding best suited exception policy for thrown exception org.apache.camel.component.file.GenericFileOperationFailedException
      2010-12-08 18:57:10,612 [Camel thread 0: FtpComponent] TRACE - Found 0 candidates
      2010-12-08 18:57:10,612 [Camel thread 0: FtpComponent] DEBUG - Failed delivery for exchangeId: 957d6fd0-0e2e-483c-afeb-beae0e61dc61. On delivery attempt: 0 caught: org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file: inbox/a8b72b9c-22dd-4af6-a1ad-cdb6b6df5527
      2010-12-08 18:57:10,612 [Camel thread 0: FtpComponent] TRACE - Converting java.lang.Boolean -> java.lang.Object with value: false
      2010-12-08 18:57:10,613 [Camel thread 0: FtpComponent] ERROR - Failed delivery for exchangeId: 957d6fd0-0e2e-483c-afeb-beae0e61dc61. Exhausted after delivery attempt: 1 caught: org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file: inbox/a8b72b9c-22dd-4af6-a1ad-cdb6b6df5527
      org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file: inbox/a8b72b9c-22dd-4af6-a1ad-cdb6b6df5527
           at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:211)
           at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:195)
           at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:126)
           at org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:57)
           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
           at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
           at org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
           at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
           at org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
           at org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
           at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
           at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
           at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
           at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
           at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
           at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
           at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:66)
           at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
           at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:258)
           at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:137)
           at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:103)
           at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:106)
           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
           at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
           at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
           at java.lang.Thread.run(Thread.java:619)
      Caused by: org.apache.camel.InvalidPayloadException: No body available of type: java.io.InputStream but has value: GenericFile[PETER_20101208_225457Z.xml.gz] of type: org.apache.camel.component.file.remote.RemoteFile on: Message: GenericFile[PETER_20101208_225457Z.xml.gz]. Caused by: No type converter available to convert from type: org.apache.camel.component.file.remote.RemoteFile to the required type: java.io.InputStream with value GenericFile[PETER_20101208_225457Z.xml.gz]. Exchange[Message: GenericFile[PETER_20101208_225457Z.xml.gz]]. Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: org.apache.camel.component.file.remote.RemoteFile to the required type: java.io.InputStream with value GenericFile[PETER_20101208_225457Z.xml.gz]]
           at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:103)
           at org.apache.camel.util.ExchangeHelper.getMandatoryInBody(ExchangeHelper.java:116)
           at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:203)
           ... 34 more
      Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: org.apache.camel.component.file.remote.RemoteFile to the required type: java.io.InputStream with value GenericFile[PETER_20101208_225457Z.xml.gz]
           at org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:123)
           at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)
           ... 36 more
      2010-12-08 18:57:10,614 [Camel thread 0: FtpComponent] TRACE - Converting java.lang.Boolean -> java.lang.Object with value: false
      2010-12-08 18:57:10,614 [Camel thread 0: FtpComponent] DEBUG - This exchange is not handled so its marked as failed: Exchange[GenericFileMessage with file: GenericFile[PETER_20101208_225457Z.xml.gz]]
      2010-12-08 18:57:10,614 [Camel thread 0: FtpComponent] DEBUG - Done processing file: GenericFile[PETER_20101208_225457Z.xml.gz] using exchange: Exchange[GenericFileMessage with file: GenericFile[PETER_20101208_225457Z.xml.gz]]
      2010-12-08 18:57:10,614 [Camel thread 0: FtpComponent] ERROR - Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - Cannot store file: inbox/a8b72b9c-22dd-4af6-a1ad-cdb6b6df5527]
      org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file: inbox/a8b72b9c-22dd-4af6-a1ad-cdb6b6df5527
           at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:211)
           at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:195)
           at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:126)
           at org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:57)
           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
           at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
           at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
           at org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
           at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
           at org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
           at org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
           at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
           at org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
           at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
           at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
           at org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHandler.java:49)
           at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:228)
           at org.apache.camel.processor.UnitOfWorkProcessor.processNext(UnitOfWorkProcessor.java:66)
           at org.apache.camel.processor.DelegateProcessor.process(DelegateProcessor.java:48)
           at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
           at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:258)
           at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:137)
           at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:103)
           at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:106)
           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
           at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
           at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
           at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
           at java.lang.Thread.run(Thread.java:619)
      Caused by: org.apache.camel.InvalidPayloadException: No body available of type: java.io.InputStream but has value: GenericFile[PETER_20101208_225457Z.xml.gz] of type: org.apache.camel.component.file.remote.RemoteFile on: Message: GenericFile[PETER_20101208_225457Z.xml.gz]. Caused by: No type converter available to convert from type: org.apache.camel.component.file.remote.RemoteFile to the required type: java.io.InputStream with value GenericFile[PETER_20101208_225457Z.xml.gz]. Exchange[Message: GenericFile[PETER_20101208_225457Z.xml.gz]]. Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: org.apache.camel.component.file.remote.RemoteFile to the required type: java.io.InputStream with value GenericFile[PETER_20101208_225457Z.xml.gz]]
           at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:103)
           at org.apache.camel.util.ExchangeHelper.getMandatoryInBody(ExchangeHelper.java:116)
           at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:203)
           ... 34 more
      Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: org.apache.camel.component.file.remote.RemoteFile to the required type: java.io.InputStream with value GenericFile[PETER_20101208_225457Z.xml.gz]
           at org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:123)
           at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)
           ... 36 more
      

       

        • 1. Re: Route, from ftp to a local file.
          Claus Ibsen Master

          Try without OSGi first to see that it works. Assuming you use OSGi that is.

           

          It could be an issue that Camel could not pickup type converters from the classpath when running in OSGi.

           

          Keep an eye on the logging. Camel logs something about loaded XXX type converters from XXX packages.

           

          What version of Camel are you using?

           

          And if using OSGi make sure to install Camel using the features.

          • 2. Re: Route, from ftp to a local file.
            Peter Chandler Master

            Some details:

             

            Seems like the camel converter are not getting load (Found: [] ). But why?

             

            I am run via a spring camel 2.2.0-fuse-02-00 context (no OSGi) packaging a "one-jar" (onejar-maven-plugin).

             

             

            Loading type converters ...

            2010-12-09 14:32:24,291 [Thread-0] DEBUG - Loading type converters ...
            2010-12-09 14:32:24,292 [Thread-0] DEBUG - Searching for annotations of org.apache.camel.Converter in packages: [org.apache.camel.component.file.remote, org.apache.camel.component.file, org.apache.camel.component.bean, org.apache.camel.component.mina, org.apache.camel.converter, org.apache.activemq.camel.converter]
            2010-12-09 14:32:24,292 [Thread-0] TRACE - The thread context class loader: com.simontuffs.onejar.JarClassLoader@50337d0f  is used to load the class
            2010-12-09 14:32:24,292 [Thread-0] TRACE - Searching for: annotated with @Converter in package: org/apache/camel/component/file/remote using classloader: com.simontuffs.onejar.JarClassLoader
            2010-12-09 14:32:24,292 [Thread-0] TRACE - Getting resource URL for package: org/apache/camel/component/file/remote with classloader: com.simontuffs.onejar.JarClassLoader@50337d0f
            2010-12-09 14:32:24,293 [Thread-0] TRACE - No URLs returned by classloader
            2010-12-09 14:32:24,293 [Thread-0] TRACE - Searching for: annotated with @Converter in package: org/apache/camel/component/file using classloader: com.simontuffs.onejar.JarClassLoader
            2010-12-09 14:32:24,293 [Thread-0] TRACE - Getting resource URL for package: org/apache/camel/component/file with classloader: com.simontuffs.onejar.JarClassLoader@50337d0f
            2010-12-09 14:32:24,293 [Thread-0] TRACE - No URLs returned by classloader
            2010-12-09 14:32:24,293 [Thread-0] TRACE - Searching for: annotated with @Converter in package: org/apache/camel/component/bean using classloader: com.simontuffs.onejar.JarClassLoader
            2010-12-09 14:32:24,293 [Thread-0] TRACE - Getting resource URL for package: org/apache/camel/component/bean with classloader: com.simontuffs.onejar.JarClassLoader@50337d0f
            2010-12-09 14:32:24,293 [Thread-0] TRACE - No URLs returned by classloader
            2010-12-09 14:32:24,293 [Thread-0] TRACE - Searching for: annotated with @Converter in package: org/apache/camel/component/mina using classloader: com.simontuffs.onejar.JarClassLoader
            2010-12-09 14:32:24,293 [Thread-0] TRACE - Getting resource URL for package: org/apache/camel/component/mina with classloader: com.simontuffs.onejar.JarClassLoader@50337d0f
            2010-12-09 14:32:24,293 [Thread-0] TRACE - No URLs returned by classloader
            2010-12-09 14:32:24,293 [Thread-0] TRACE - Searching for: annotated with @Converter in package: org/apache/camel/converter using classloader: com.simontuffs.onejar.JarClassLoader
            2010-12-09 14:32:24,293 [Thread-0] TRACE - Getting resource URL for package: org/apache/camel/converter with classloader: com.simontuffs.onejar.JarClassLoader@50337d0f
            2010-12-09 14:32:24,293 [Thread-0] TRACE - No URLs returned by classloader
            2010-12-09 14:32:24,293 [Thread-0] TRACE - Searching for: annotated with @Converter in package: org/apache/activemq/camel/converter using classloader: com.simontuffs.onejar.JarClassLoader
            2010-12-09 14:32:24,293 [Thread-0] TRACE - Getting resource URL for package: org/apache/activemq/camel/converter with classloader: com.simontuffs.onejar.JarClassLoader@50337d0f
            2010-12-09 14:32:24,294 [Thread-0] TRACE - No URLs returned by classloader
            2010-12-09 14:32:24,294 [Thread-0] DEBUG - Found: []
            2010-12-09 14:32:24,294 [Thread-0] DEBUG - Loading type converters done
            

             

            Maven Dependencies:

                <dependency>
                  <groupId>log4j</groupId>
                  <artifactId>log4j</artifactId>
                  <version>1.2.15</version>
                  <scope>compile</scope>
                </dependency>
                <dependency>
                  <groupId>org.apache.xmlbeans</groupId>
                  <artifactId>xmlbeans</artifactId>
                  <version>2.4.0</version>
                </dependency>
                <dependency>
                  <groupId>joda-time</groupId>
                  <artifactId>joda-time</artifactId>
                  <version>1.6</version>
                </dependency>
                <dependency>
                  <groupId>commons-logging</groupId>
                  <artifactId>commons-logging</artifactId>
                  <version>1.1</version>
                </dependency>
                <dependency>
                  <groupId>commons-net</groupId>
                  <artifactId>commons-net</artifactId>
                  <version>2.0</version>
                </dependency>
                <dependency>
                  <groupId>commons-io</groupId>
                  <artifactId>commons-io</artifactId>
                  <version>1.4</version>
                </dependency>
                <dependency>
                  <groupId>org.apache.camel</groupId>
                  <artifactId>camel-core</artifactId>
                  <version>2.2.0-fuse-02-00</version>
                </dependency>
                <dependency>
                  <groupId>org.apache.camel</groupId>
                  <artifactId>camel-spring</artifactId>
                  <version>2.2.0-fuse-02-00</version>
                </dependency>
                <dependency>
                  <groupId>org.apache.camel</groupId>
                  <artifactId>camel-mina</artifactId>
                  <version>2.2.0-fuse-02-00</version>
                </dependency>
                <dependency>
                  <groupId>org.apache.camel</groupId>
                  <artifactId>camel-jms</artifactId>
                  <version>2.2.0-fuse-02-00</version>
                </dependency>
                <dependency>
                  <groupId>org.apache.camel</groupId>
                  <artifactId>camel-saxon</artifactId>
                  <version>2.2.0-fuse-02-00</version>
                </dependency>
                <dependency>
                  <groupId>org.apache.activemq</groupId>
                  <artifactId>activemq-core</artifactId>
                  <version>5.3.1-fuse-02-00</version>
                </dependency>
                <dependency>
                  <groupId>org.apache.activemq</groupId>
                  <artifactId>activemq-camel</artifactId>
                  <version>5.3.1-fuse-02-00</version>
                </dependency>
                <dependency>
                  <groupId>org.apache.activemq</groupId>
                  <artifactId>activemq-pool</artifactId>
                  <version>5.3.1-fuse-02-00</version>
                </dependency>
                <dependency>
                  <groupId>org.apache.camel</groupId>
                  <artifactId>camel-ftp</artifactId>
                  <version>2.2.0-fuse-02-00</version>
                  <scope>runtime</scope>
                </dependency>
                <dependency>
                  <groupId>org.apache.camel</groupId>
                  <artifactId>camel-stream</artifactId>
                  <version>2.2.0-fuse-02-00</version>
                  <scope>runtime</scope>
                </dependency>
                <dependency>
                  <groupId>xerces</groupId>
                  <artifactId>xercesImpl</artifactId>
                  <version>2.9.1</version>
                </dependency>
                <dependency>
                  <groupId>junit</groupId>
                  <artifactId>junit</artifactId>
                  <version>3.8.1</version>
                  <scope>test</scope>
                </dependency>
             
            

             

            • 3. Re: Route, from ftp to a local file.
              Claus Ibsen Master

              Dont use the onejar plugin.

               

              It will override the type converter services files in META-INF/services in the one JAR it produces. The same applies for other files.

               

              Bottom line it cannot safely merge many JARs into one JAR. It kinda only works if you have 100% separated Java classes.

               

              If you still want to use it, then you have to find a way to manually merge and ensure the META-INF/services files are correct. That they contain the content from all the JARs.

              • 4. Re: Route, from ftp to a local file.
                Peter Chandler Master

                Correct. The issue was a side effect of one-jar. Follow-up question: If I created/added/merged all the package name(s) of the converter(s) I need back into META-INF/services/org/apache/camel/TypeConverter file then the AnnotationTypeConverterLoader should find them. Correct?

                 

                Thanks again,

                 

                Peter.

                • 5. Re: Route, from ftp to a local file.
                  Claus Ibsen Master

                  Yeah but there are other similar files for eg languages and such. So be prepared to fix that yourself if you encounter something similar in the future.

                  • 6. Re: Route, from ftp to a local file.
                    Claus Ibsen Master

                    Repacking Fuse MR or Camel is not recommended or supported. So I discourage you to use the on-jar approach.

                    • 7. Re: Route, from ftp to a local file.
                      Peter Chandler Master

                      The answer is OSGi to avoid one-jar side effects.

                       

                      Thanks for you time and Happy Holidays,

                       

                      Peter.