camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Baptista <Daniel.Bapti...@performgroup.com>
Subject RE: Unmarshalling gzipped file
Date Wed, 14 Dec 2011 15:13:49 GMT
Hi, 

Thanks for the prompt response Claus I guess I have a DataFormat to write. 

Cheers, Dan. 

-----Original Message-----
From: Claus Ibsen [mailto:claus.ibsen@gmail.com] 
Sent: 14 December 2011 15:04
To: users@camel.apache.org
Subject: Re: Unmarshalling gzipped file

Hi

The gzip data format does not support files (eg with ZipFileEntry) etc.
I think we have a JIRA ticket to improve this.

We love contributions :)


On Wed, Dec 14, 2011 at 3:57 PM, Daniel Baptista
<Daniel.Baptista@performgroup.com> wrote:
> Hi All,
>
> I am trying to uncompress a gzipped file using the following route
>
>        <camel:route>
>          <camel:from uri="file://c:/foo/downloaded?recursive=true&amp;delete=true"/>
>          <camel:unmarshal>
>            <camel:gzip/>
>          </camel:unmarshal>
>          <camel:to uri="file://c:/foo/uncompressed?fileName=${file:parent}/${file:name.noext}.log"
/>
>        </camel:route>
>
>
> However I am getting this exception..
>
> java.util.zip.ZipException: incomplete literal/length tree
>        at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:147)
>        at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:92)
>        at java.io.FilterInputStream.read(FilterInputStream.java:90)
>        at org.apache.camel.util.IOHelper.copy(IOHelper.java:105)
>        at org.apache.camel.util.IOHelper.copy(IOHelper.java:92)
>        at org.apache.camel.impl.GzipDataFormat.unmarshal(GzipDataFormat.java:51)
>
> I have checked with 7zip and I am able to open the files located in c:/foo/downloaded
and the properties (according to 7zip)  of the compressed file is gzip.
>
> What am I doing wrong?
>
> Thanks, Dan.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message