camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ywang9009 <ywang9...@gmail.com>
Subject Re: Camel Unmarshal throwing heap space exception
Date Thu, 17 Sep 2015 15:30:29 GMT
Claus, could you elaborate on the splitter/streaming approach? I am running
into the same issue - gzip unmarshaling is done in memory and I am getting
this error when processing a large file:

java.lang.OutOfMemoryError: Java heap space

at java.util.Arrays.copyOf(Arrays.java:2271)[:1.7.0_45]

at
java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:178)[:1.7.0_45]

at
org.apache.camel.impl.GzipDataFormat.unmarshal(GzipDataFormat.java:52)[142:org.apache.camel.camel-core:2.12.0.redhat-610379]

Here is my blueprint:


<camel:from
uri="file://{{cmi.home}}/{{cmi.myworld.data.file.path}}?doneFileName=${file:name}.done"
/>


<camel:choice>

<camel:when>
<camel:simple>${file:name} regex ".*.gz$" </camel:simple>

<camel:unmarshal ref="gzip"/>

<camel:to

uri="file://{{cmi.home}}/{{cmi.myworld.file.path}}?fileName=${file:name.noext}&amp;doneFileName=${file:name}.done"
/>

<camel:log message="********processGzip:gzip file(${file:name})********" />

</camel:when>
<camel:otherwise>

<camel:log message="********processGzip:regular file(${file:name})********"
/>

<camel:to

uri="file://{{cmi.home}}/{{cmi.myworld.file.path}}?doneFileName=${file:name}.done"
/>

</camel:otherwise>

</camel:choice>


</camel:route>

I am using jboss-fuse-6.1.0.redhat-379



Thank you




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-Unmarshal-throwing-heap-space-exception-tp5736621p5771602.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message