You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by niels_s <st...@gmail.com> on 2013/10/16 13:53:37 UTC

Can't move excel files correctly, ActiveMQ bug?

Hey,

I'm making a context where I will pickup an Excel file, process it and write
it back to disk.
I first played around with one route, like this: 

<route>
  <from uri="file:/tmp/meerakker/in"/>
  <to uri="tika:input=file"/>
  <to uri="file:/tmp/meerakker/tika"/>
</route>

Everything works nicely, my custom 'tika' component can convert the excel
file to xml without problems 


But when I introduce ActiveMQ queues and several routes, things start to go
wrong.

I expected there are some encoding issues introduced by the use of ActiveMQ.
So as a test I removed my custom tika component and see what the behaviour
was when I just move a excel file from one location to another. Like so:

<route>
  <from uri="file:/tmp/meerakker/in"/>
  <to uri="activemq:test_in"/>
</route>
<route>
  <from uri="activemq:test_in"/>
  <to uri="file:/tmp/meerakker/out"/>
</route>

The result is surprising when I consume a perfect fine Excel file which I
can open with OpenOffice, the moved file can't be opened as a spreadsheet
and contains a bunch of crazy stuff.

This is the excel file I used as input  order.xls
<http://camel.465427.n5.nabble.com/file/n5741661/order.xls>   and this 
result.xls <http://camel.465427.n5.nabble.com/file/n5741661/result.xls>   is
the resulting file after being moved by Camel.

Is there anybody who experienced something similar? I would say this seems
like a bug?
Anybody got a solution? I already tested the file components with several
different encodings without any luck.

Any help is welcome!

BTW: I'm using Camel 2.10.4 on ServiceMix 4.5.1



--
View this message in context: http://camel.465427.n5.nabble.com/Can-t-move-excel-files-correctly-ActiveMQ-bug-tp5741661.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't move excel files correctly, ActiveMQ bug?

Posted by James Carman <ja...@carmanconsulting.com>.
No worries.  That's what we're here for.  I'm trying to just build
upon this "sandbox" project I've been creating.  I'll refer to this
thread in the JavaDoc so that we have a trace back to where the
example came from! :)


On Thu, Oct 17, 2013 at 4:03 AM, niels_s <st...@gmail.com> wrote:
> Hey James,
>
> I think I'm going nuts. I can't reproduce my error anymore.
> Thanks for helping me testing some things!
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-t-move-excel-files-correctly-ActiveMQ-bug-tp5741661p5741727.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't move excel files correctly, ActiveMQ bug?

Posted by niels_s <st...@gmail.com>.
Hey James,

I think I'm going nuts. I can't reproduce my error anymore.
Thanks for helping me testing some things!



--
View this message in context: http://camel.465427.n5.nabble.com/Can-t-move-excel-files-correctly-ActiveMQ-bug-tp5741661p5741727.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't move excel files correctly, ActiveMQ bug?

Posted by James Carman <ja...@carmanconsulting.com>.
I added a spring-based test.  Do a rebase.

On Wed, Oct 16, 2013 at 10:38 AM, niels_s <st...@gmail.com> wrote:
> Yes, I cloned your repo, got it running and it worked fine.
> In the meanwhile I created a spring DSL project you can find it here:
> https://github.com/niels-s/camel-spring-test
> Basically it's the same setup as your java DSL project. But the results are
> different.
> This time I can't open the file after it has been moved to the output repo.
>
> This is so strange, eventually the Java en Spring DSL should result in the
> same behavior.
> I can't switch to Java DSL in this project so I need to find a way to get
> this working.
>
> Thanks for the help so far, if you have any tips keep them coming
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-t-move-excel-files-correctly-ActiveMQ-bug-tp5741661p5741678.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't move excel files correctly, ActiveMQ bug?

Posted by niels_s <st...@gmail.com>.
Yes, I cloned your repo, got it running and it worked fine.
In the meanwhile I created a spring DSL project you can find it here:
https://github.com/niels-s/camel-spring-test
Basically it's the same setup as your java DSL project. But the results are
different.
This time I can't open the file after it has been moved to the output repo.

This is so strange, eventually the Java en Spring DSL should result in the
same behavior.
I can't switch to Java DSL in this project so I need to find a way to get
this working.

Thanks for the help so far, if you have any tips keep them coming 



--
View this message in context: http://camel.465427.n5.nabble.com/Can-t-move-excel-files-correctly-ActiveMQ-bug-tp5741661p5741678.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't move excel files correctly, ActiveMQ bug?

Posted by James Carman <ja...@carmanconsulting.com>.
There are two routes created by the same route builder. Yes, I was
able to open the file from the "outbox" folder, successfully using
Excel for Mac.  Did you try downloading my example and running it
yourself?


On Wed, Oct 16, 2013 at 9:56 AM, niels_s <st...@gmail.com> wrote:
> James,
>
> did you try to open the file after moving it? I don't experience any
> troubles moving around the file, omly keeping the content the same is an
> issue.
>
> Would your example involve 2 routes? Not that familiar with the Java DSL.
> Won't the routebuilder only create one route?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-t-move-excel-files-correctly-ActiveMQ-bug-tp5741661p5741674.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't move excel files correctly, ActiveMQ bug?

Posted by niels_s <st...@gmail.com>.
James,

did you try to open the file after moving it? I don't experience any
troubles moving around the file, omly keeping the content the same is an
issue. 

Would your example involve 2 routes? Not that familiar with the Java DSL. 
Won't the routebuilder only create one route?



--
View this message in context: http://camel.465427.n5.nabble.com/Can-t-move-excel-files-correctly-ActiveMQ-bug-tp5741661p5741674.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't move excel files correctly, ActiveMQ bug?

Posted by James Carman <ja...@carmanconsulting.com>.
I'm on OSX too.  I ran just inside a test case.

https://github.com/jwcarman/camel-sandbox/blob/master/src/test/java/com/carmanconsulting/sandbox/camel/FileCopyTest.java


On Wed, Oct 16, 2013 at 9:27 AM, niels_s <st...@gmail.com> wrote:
> Hi James,
>
> I'm running Mac OS X 10.8.4 with ServiceMix 4.5.1 and deployed a bundle with
> my camelcontext.
>
> Would be nice if you could push it to github, thans in advance
>
> Did you run it standalone? Or also in ServiceMix?
>
> Regards,
>
> Niels
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-t-move-excel-files-correctly-ActiveMQ-bug-tp5741661p5741670.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't move excel files correctly, ActiveMQ bug?

Posted by niels_s <st...@gmail.com>.
Hi James,

I'm running Mac OS X 10.8.4 with ServiceMix 4.5.1 and deployed a bundle with
my camelcontext.

Would be nice if you could push it to github, thans in advance

Did you run it standalone? Or also in ServiceMix? 

Regards,

Niels





--
View this message in context: http://camel.465427.n5.nabble.com/Can-t-move-excel-files-correctly-ActiveMQ-bug-tp5741661p5741670.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't move excel files correctly, ActiveMQ bug?

Posted by James Carman <ja...@carmanconsulting.com>.
On what platform are you running your test?  I just ran a test using
your input file using two routes:

from("file://target/inbox").to("jms:queue:myfiles");
from("jms:queue:myfiles").to("file://target/outbox");

The file was copied from inbox to outbox and I was able to open the
file in excel.  If you would like, I can check in my example into
github for you to play with it.

James

On Wed, Oct 16, 2013 at 8:53 AM, niels_s <st...@gmail.com> wrote:
> I did some more testing by replacing the activemq queues with direct's but
> the problem stays.
> I'm experiencing this only with Excel files. It seems like interroute
> communication is causing some issues, I'm guessing with encoding but just
> guessing.
> Never saw this before with other kind of files. Anybody an idea what could
> be causing this?
> Or how I could debug this a little further to get some more meaningful
> information?
>
> @Christian Mueller: Sorry, thought I was already subscribed, is there a way
> to see if I'm subscribed correctly now?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-t-move-excel-files-correctly-ActiveMQ-bug-tp5741661p5741667.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't move excel files correctly, ActiveMQ bug?

Posted by niels_s <st...@gmail.com>.
I did some more testing by replacing the activemq queues with direct's but
the problem stays.
I'm experiencing this only with Excel files. It seems like interroute
communication is causing some issues, I'm guessing with encoding but just
guessing.
Never saw this before with other kind of files. Anybody an idea what could
be causing this?
Or how I could debug this a little further to get some more meaningful
information?

@Christian Mueller: Sorry, thought I was already subscribed, is there a way
to see if I'm subscribed correctly now?



--
View this message in context: http://camel.465427.n5.nabble.com/Can-t-move-excel-files-correctly-ActiveMQ-bug-tp5741661p5741667.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can't move excel files correctly, ActiveMQ bug?

Posted by Christian Mueller <ch...@gmail.com>.
Niels_S,

can you please subscribe to the discussion forum in Nabble as we describe
here [1].
Otherwise all your mails has to be moderate manually by the Camel team so
that your post is also send to our mailing list which most of the Camel team
member are using instead of Nabble. Therefore your post is may
missed/delayed and you don't get an answer in the normal time frame we
answer questions.
Last but not least, it cost time which we cannot spend developing Camel,
answering questions or improving the documentation...

[1] http://camel.apache.org/discussion-forums.html

Thanks in advance,
Christian



--
View this message in context: http://camel.465427.n5.nabble.com/Can-t-move-excel-files-correctly-ActiveMQ-bug-tp5741661p5741663.html
Sent from the Camel - Users mailing list archive at Nabble.com.