camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: Problem with FileEndpoint
Date Sun, 12 Oct 2008 16:51:24 GMT
Hi Claus,

the problem also happens with camel 1.5-snapshot. I have found a 
workaround though. When I put a .convertBodyTo(String.class) before the 
bean processor it works. The behaviour is still not exactly how I would 
expect it as the  xml file with the error in it is copied to the ok dir 
and the error dir. This is ok for me though.

The workaround also works for camel 1.4.0.

I have an idea what the problem could be. In my opinion the file is 
opened when the conversion with jaxb starts and it is not closed 
correctly when an exception happens. When I use the 
convertBodyTo(String.class) the file is opened and correctly closed 
there so the above problem can not happen in the JAXB type converter. I 
have not debugged this. It is only what I guess from the behaviour.

BTW. Is there a reason why the FileEndpoint does not simply read the 
file into a string? At least for smaller files this would be much 
easier. For large files it could be better with the FileMessage of 
course. But I do not believe the other processors would make much use of 
this.

Greetings

Christian


Claus Ibsen schrieb:
> Hi Christian
>
> You can always try the latest version (SNAPSHOT) from:
> http://activemq.apache.org/camel/download.html
>
> See maven instructions in bottom if you use maven
>
> We are about to cut the first RC for 1.5. Only a few documentation issues left in the
roadmap. I assume Hadrian will do this in next week.
>
> If there is still an issue in 1.5 with the file component it would be great to know now
before the RC is cut. So please try to out asap.
>
>
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
>
> -----Original Message-----
> From: Christian Schneider [mailto:chris@die-schneider.net] 
> Sent: 12. oktober 2008 12:19
> To: camel-user@activemq.apache.org
> Subject: Re: Problem with FileEndpoint
>
> Hi Claus,
>
> is the version 1.5 already out or do you mean I should simply compile 
> the trunk and test this?
>
> Greetings
>
> Christian
>
> Claus Ibsen schrieb:
>   
>> Hi Christian
>>
>> What version of Camel are you using? In 1.5 have many improvements in the File component.
Could you try this version first? It should be better at handling such errors.
>>
>> If it's still a problem: Then please create a small sample of your project and create
a ticket in JIRA.
>>   
>>     
>
>
>   


-- 

Christian Schneider
---
http://www.liquid-reality.de


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