On Jan 13, 2014, at 6:39 AM, [email protected] wrote:
> Dan,
> You're right, it was the byte array that was becoming too big.
> After I commented out the first send to server and the MTOM client code
> seems to send file,
> as you said , now the OOM error has moved to server .
>
>
> However - I am still splitting my hair to see what wrongdoing I did in my
> applications client which still continues to give me OOM error due to heap
> space
>
> Below isclient side stack trace from my client ( that uses https transport
> and a some more complex data structures) ... let me know if you notice
> anything untoward here
>
> Please note that this happens after I call the service method on my port
> object that uploads large object "port.uploadObject(objReqParam);
>
>
>
> Opened file:src/main/InfantHealthcare.jpg for read...( this is a BIG file)
> Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
> at java.util.Arrays.copyOf(Arrays.java:2271)
> at
> java.io.ByteArrayOutputStream.toByteArray(ByteArrayOutputStream.java:178)
> at
> org.apache.cxf.helpers.IOUtils.readBytesFromStream(IOUtils.java:235)
> at
> org.apache.cxf.io.CachedOutputStream.getBytes(CachedOutputStream.java:264)
> at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRetransmits(HTTPConduit.java:2015)
Looking in there:
if (LOG.isLoggable(Level.FINE) && cachedStream != null) {
LOG.fine("Conduit \""
+ getConduitName()
+ "\" Transmit cached message to: "
+ url
+ ": "
+ new String(cachedStream.getBytes()));
}
You wouldn’t by any chance of FINE logging turned on?
It looks like you have auto redirects turned on or similar so that the entire
request is cached PLUS you have FINE logging turned on. Looks like the
combination of the two is causing an issue. Can you verify and log an issue?
--
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com