2 Replies Latest reply on Apr 22, 2010 4:48 AM by Fernando Salceda

    Deploying ActiveMQ Example

    Fernando Salceda Novice

      I'm trying to run the deploy activeMQ Example  tutorial . But when I copy the camel-timer.xml in deploy folder I get the following Exception:

       

      org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file: /temp/camel-timer/ID-fsalceda-desktop-60045-1271839239927-2-8-1-1-11

           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.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:84)

           at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:543)

           at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:482)

           at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:451)

           at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:323)

           at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:261)

           at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:982)

           at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:974)

           at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:876)

           at java.lang.Thread.run(Thread.java:595)

      Caused by: org.apache.camel.InvalidPayloadException: No body available of type: java.io.InputStream but has value: Hello World! of type: java.lang.String on: Message: Hello World!. Caused by: No type converter available to convert from type: java.lang.String to the required type: java.io.InputStream with value Hello World!. Exchange[Message: Hello World!]. Caused by: org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: java.lang.String to the required type: java.io.InputStream with value Hello World!

           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)

           ... 31 more

      Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: java.lang.String to the required type: java.io.InputStream with value Hello World!

           at org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:119)

           at org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)

           ... 33 more

      Caused by: java.lang.IllegalArgumentException: Could not retrieve InputStream for class path resource : class path resource cannot be opened because it does not exist

           at org.springframework.beans.propertyeditors.InputStreamEditor.setAsText(InputStreamEditor.java:76)

           at org.apache.camel.impl.converter.PropertyEditorTypeConverter.convertTo(PropertyEditorTypeConverter.java:49)

           at org.apache.camel.impl.converter.PropertyEditorTypeConverter.convertTo(PropertyEditorTypeConverter.java:64)

           at org.apache.camel.impl.converter.DefaultTypeConverter.doConvertTo(DefaultTypeConverter.java:167)

           at org.apache.camel.impl.converter.DefaultTypeConverter.mandatoryConvertTo(DefaultTypeConverter.java:117)

           ... 34 more

       

      I didn't find how to fix it or what is wrong with the TypeConverter.

       

      THX.

       

      Edited by: fsalceda on Apr 21, 2010 11:43 AM