activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mick Knutson" <mickknut...@gmail.com>
Subject camel routing issues
Date Thu, 11 Sep 2008 16:53:45 GMT
I have the following routes
    *<camelContext id="camel" xmlns="
http://activemq.apache.org/camel/schema/spring">
        <route>
            <from uri="file:src/data?noop=true"/>
            <to uri="jms:queue:channel/changeRequestInputChannel"/>
        </route>
        <route>
            <from uri="jms:queue:channel/changeRequestInputChannel"/>
            <process ref="jsonTransformer"/>
            <to uri="jms:queue:channel/changeRequestTransformerChannel"/>
        </route>
        <route>
            <from uri="jms:queue:channel/changeRequestTransformerChannel"/>
            **<!--<from uri="jms:queue:channel/changeRequestInputChannel"/>
-->*
*            <to uri="file://target/test?noop=true"/>
        </route>

    </camelContext>
*
So, I am trying to take a test message file from* src/data*, send it to *
changeRequestInputChannel*, then process that message (json to soap), then
put that on *changeRequestTransformerChannel*, then I wanted to process that
message to *file://target/test?noop=true* but when I try this, I get this
error:

*[                          main] Main                           INFO
Waiting for: 2 SECONDS
[aultMessageListenerContainer-1] DeadLetterChannel              ERROR Failed
delivery for exchangeId: ID-mickknutson/1461-1221150867537/0-0. On delive
ry attempt: 0 caught: org.apache.camel.RuntimeCamelException:
java.io.FileNotFoundException: target\test (Access is denied)
org.apache.camel.RuntimeCamelException: java.io.FileNotFoundException:
target\test (Access is denied)
        at
org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:411)
        at
org.apache.camel.impl.converter.StaticMethodTypeConverter.convertTo(StaticMethodTypeConverter.java:42)
        at
org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:67)
        at
org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:59)
        at
org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:50)
        at
org.apache.camel.util.ExchangeHelper.getMandatoryInBody(ExchangeHelper.java:125)
        at
org.apache.camel.component.file.FileProducer.process(FileProducer.java:60)
        at
org.apache.camel.component.file.FileProducer.process(FileProducer.java:55)
        at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43)
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:155)
        at
org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:91)
        at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57)
        at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39)
        at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41)
        at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66)
        at
org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:68)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:531)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:466)
        at
org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:3
22)
        at
org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260
)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer
.java:944)
        at
org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:875)
        at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.FileNotFoundException: target\test (Access is denied)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:106)
        at
org.apache.camel.converter.IOConverter.toInputStream(IOConverter.java:82)
        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.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:407)
        ... 25 more*

*This error seems to be with:*
*<from uri="jms:queue:channel/changeRequestTransformerChannel"/>*
*             **<!--**<from
uri="jms:queue:channel/changeRequestInputChannel"/>**-->*

Why can't *<to uri="file://target/test?noop=true"/> get messages from **<from
uri="jms:queue:channel/changeRequestTransformerChannel"/>

Because when** I change the from to use **<from
uri="jms:queue:channel/changeRequestInputChannel"/>, *I get the files
processed fine, but they are out of* **changeRequestInputChannel, *not the*
**changeRequestTransformerChannel*


Can someone help me understand what I am missing to get this route
completed?

---
Thank You…

Mick Knutson
BASE Logic, inc.
(415) 354-4215

Website: http://baselogic.com
Blog: http://baselogic.com/blog
BLiNC Magazine: http://blincmagazine.com
Linked IN: http://linkedin.com/in/mickknutson
DJ Mick: http://djmick.com
MySpace: http://myspace.com/mickknutson
Vacation Rental: http://tahoe.baselogic.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message