camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yong Wang <ywang9...@gmail.com>
Subject Camel Unmarshal throwing heap space exception
Date Thu, 17 Sep 2015 15:14:43 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

Yong

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