On Jan 10, 2014, at 2:14 AM, Yogesh Devi <[email protected]> wrote:
> Dan, > Thanks for your reponse > > I am able to reproduce the same issue with the mtom sample that ships with > CXF > > More specifically > > I used apache-cxf-2.7.7 samples/mtom > > > All I did is , replace the "me.bmp" with a 1.23 GB file and I get exactly > same client side exception that I get in my code You would also need to update the Client.java to NOT do the first call to the server. The first call loads the bmp into a byte[] and calls the port.testByteArray to show how that would get mapped into MTOM. With a 1.3GB file, loading that into the byte[] likely is failing. If I do: dd if=/dev/zero of=src/main/resources/me.bmp bs=4096 count=204800 to create a 800MB file and comment out the code around first call to the service, the client does transfer the file fine. It OOM’s on the server as the server loads the attachment into a ByteArrayOutputStream, but all the data does get there. Dan > > reproduced below from "mvn -Pclient" run of "samples/mtom" > > ------------------------------------- > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2:java > (def > ault) on project mtom: An exception occured while executing the Java class. > null > : InvocationTargetException: Java heap space -> [Help 1] > ---------------------------------------------------------- > > Note - ( I ack. that happen to use 2.7.7 which is a tad older , however I > checked release > notes for 2.7.8 and 3.X milestone release and found no reference to > MTOM fixes so for now I am still sticking to 2.7.7) > > > Best regards > > > Yogesh > > > > ________________________________ > From: Daniel Kulp <[email protected]> > To: [email protected]; [email protected] > Sent: Thursday, January 9, 2014 9:28 PM > Subject: Re: MTOM OutOfMemory > > > > On Jan 9, 2014, at 1:11 AM, [email protected] wrote: > >> List -I am facing a similar problem and have made a post for this. Looking at >> this I would like to know if any of the users here were able to establish >> working MTOM with large attachments. I would hugely appreciate a working >> sample > > You could try modifying the mtom sample in the CXF kits to use a larger > attachment. The samples is fairly small since it’s going in the kit, but > feel free to play with it and see if you can reproduce your issue. > > > -- > Daniel Kulp > [email protected] - http://dankulp.com/blog > Talend Community Coder - http://coders.talend.com -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
