activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Problem with ETL example
Date Wed, 08 Aug 2007 11:34:18 GMT
BTW there is now a separate forum/mailing list for Camel...
http://activemq.apache.org/camel/discussion-forums.html

On 8/8/07, James Strachan <james.strachan@gmail.com> wrote:
> Hi! Sorry you're having issues.
>
> BTW which version are you using? (Trunk from subversion?). Also how
> are you running the example?
>
> On 8/8/07, jameszhang <jameszhang.james@gmail.com> wrote:
> >
> > I have post the problem here.
> > http://cwiki.apache.org/confluence/display/CAMEL/ETL+Example
> > http://cwiki.apache.org/confluence/display/CAMEL/ETL+Example
> >
> > Maybe we should delete that comment.thank you.
> >
> >
> > When I run the example,the result is failed.
> >
> > [nent.file.FileComponent@36d047] ScheduledPollConsumer          DEBUG
> > Starting to poll
> > [nent.file.FileComponent@36d047] FileConsumer                   DEBUG
> > Polling directory src\data
> > [nent.file.FileComponent@36d047] FileEndpoint                   DEBUG
> > Endpoint[file:src/data?noop=true] using strategy:
> > org.apache.camel.component.file.strategy.NoOpFileStrategy@98bbf6
> > [nent.file.FileComponent@36d047] FileConsumer                   DEBUG About
> > to process file:  src\data\row1.xml using exchange: Exchange[FileMessage:
> > src\data\row1.xml]
> > [onent.jpa.JpaComponent@1e16483] ScheduledPollConsumer          DEBUG
> > Starting to poll
> > [nent.file.FileComponent@36d047] DeadLetterChannel              ERROR On
> > delivery attempt: 0 caught: java.lang.ClassCastException:
> > org.apache.camel.impl.DefaultExchange
> > java.lang.ClassCastException: org.apache.camel.impl.DefaultExchange
> >         at
> > org.apache.camel.component.file.FileMessage.getExchange(FileMessage.java:51)
> >         at
> > org.apache.camel.component.file.FileMessage.getExchange(FileMessage.java:33)
> >         at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:49)
> >         at
> > org.apache.camel.component.jpa.JpaEndpoint$1.evaluate(JpaEndpoint.java:197)
> >         at org.apache.camel.component.jpa.JpaProducer.process(JpaProducer.java:44)
> >         at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:69)
> >         at
> > org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:77)
> >         at org.apache.camel.processor.Pipeline.process(Pipeline.java:57)
> >         at
> > org.apache.camel.component.file.FileConsumer.pollFile(FileConsumer.java:77)
> >         at
> > org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:50)
> >         at
> > org.apache.camel.component.file.FileConsumer.pollFileOrDirectory(FileConsumer.java:57)
> >         at org.apache.camel.component.file.FileConsumer.poll(FileConsumer.java:44)
> >         at
> > org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:63)
> >         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
> >         at
> > java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:280)
> >         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:135)
> >         at
> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:65)
> >         at
> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:142)
> >         at
> > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:166)
> >         at
> > java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
> >         at
> > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
> >         at java.lang.Thread.run(Thread.java:595)
> >
> > I have run the following testcase,and the result is failed too.
> >
> > package org.apache.camel.component.file;
> >
> > import java.io.File;
> >
> > import org.apache.camel.ContextTestSupport;
> > import org.apache.camel.Exchange;
> >
> > public class FileExchangeTest extends ContextTestSupport {
> >
> >          public void testCopy() {
> >
> >                  File file = new
> > File(FileExchangeTest.class.getResource("FileExchangeTest.class").getFile());
> >                  FileExchange fileExchange = new FileExchange(context,file);
> >                  Exchange exchange = fileExchange.copy();
> >                  assertTrue("the copy of a FileExchange is not a FileExchange instance",
> >
> > exchange instanceof FileExchange);
> >          }
> >
> > }
> >
> > Thanks very much.
> >
> > --
> > View this message in context: http://www.nabble.com/Problem-with-ETL-example-tf4235477s2354.html#a12050655
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
> >
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>


-- 
James
-------
http://macstrac.blogspot.com/

Mime
View raw message