axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Betsy Frey" <betsy.f...@earthlink.net>
Subject RE: MTOM error "java.lang.OutOfMemoryError: Java heap space"
Date Wed, 23 May 2007 14:21:31 GMT
Hi Vikas,
An OutOfMemoryError strongly suggests that cacheAttachments or one of the
other 3 associated properties are not being set properly.  On the client
side, for receiving the file, one can code:
	Options options = new Options();
	options.setTo(new EndpointReference(url));
	options.setProperty(Constants.Configuration.ENABLE_MTOM,
		Constants.VALUE_TRUE);
	options.setProperty(Constants.Configuration.CACHE_ATTACHMENTS,
		Constants.VALUE_TRUE);
	options.setProperty(Constants.Configuration.ATTACHMENT_TEMP_DIR,
		AXIS2_ATTACHMENT_DIR);
	options.setProperty(Constants.Configuration.FILE_SIZE_THRESHOLD,
"8000");
One can modify axis2.xml on the server side similarly.
Betsy

-----Original Message-----
From: Vikas [mailto:vikas.khengare@unnat-e.com] 
Sent: Wednesday, May 23, 2007 2:18 AM
To: axis user
Subject: Re: MTOM error "java.lang.OutOfMemoryError: Java heap space"

Hi Thilina / Friends

      As you said earlier that you have tested Axis2 with 200 MB-700 MB file
attachment, Can you tell me which configuration of axis you did it [means
MTOM / SwA/ StAX / SAAJ versions] ?

        Can we do direct streaming using StAX / SAAJ to send such big files?

With best regards
From
Vikas R. Khengare

----- Original Message ----- 
From: "Thilina Gunarathne" <csethil@gmail.com>
To: <axis-user@ws.apache.org>; "Vikas" <vikas.khengare@unnat-e.com>
Sent: Wednesday, May 23, 2007 1:39 PM
Subject: Re: MTOM error "java.lang.OutOfMemoryError: Java heap space"


> We have successfully used the MTOM sample to transfer files with sizes
> in the range of 200MB to 700 MB...
>
> >  I have enabled FileCaching on server side by following code.
> >         <parameter name="enableMTOM" locked="false">true</parameter>
> >         <parameter name="enableSwA" locked="false">true</parameter>
> >
> >         <!--Uncomment if you want to enable file caching for
attachments -->
> >         <parameter name="cacheAttachments"
locked="false">true</parameter>
> >         <parameter name="attachmentDIR"
> > locked="false">C:\\TempWebService\\DestinationTemp</parameter>
> >         <parameter name="sizeThreshold" locked="false">4000</parameter>
> > At the same time I am continuing with client side file caching code.
> Client side caching is not needed for the MTOM sample...
>
> > It is caching that file in given directory, but not writing on to output
> > stream i.e. on specified location.
> Can you explain the above statement a bit more... Can you see the
> whole file on the caching directory... What do you mean by writing to
> the output stream...
>
> Thanks,
> Thilina
>
> > Now also I am able send 2-3MB size of
> > files but not bigger file size like 7MB-100MB. I am getting same error
> >      [java] Exception in thread "main" org.apache.axis2.AxisFault:
> > java.lang.OutOfMemoryError: Java heap space
> >      [java]     at
> >
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
> > n.java:271)
> >      [java]     at
> >
org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOpera
> > tion.java:202)
> >      [java]     at sample.mtom.service.MTOMSampleStub.attachment(Unknown
> > Source)
> >
> >      [java]     at sample.mtom.client.Client.transferFile(Unknown
Source)
> >      [java]     at sample.mtom.client.Client.main(Unknown Source)
> >      [java] Java Result: 1
> >
> > my questions still unsolved? Can some one suggest solution?
> > [Can we send file as attachment of size 5MB - 1GB?]
> >
> > With best regards
> > Vikas R. Khengare
> >
> > ----- Original Message -----
> > From: "Jochen Zink" <jochenlist@web.de>
> > To: <axis-user@ws.apache.org>
> > Sent: Wednesday, May 23, 2007 11:51 AM
> > Subject: Re: MTOM error "java.lang.OutOfMemoryError: Java heap space"
> >
> >
> > >
> > > Hi Vikas.
> > >
> > > you have to enabled FileCaching on ServerSide. This is the only way to
> > handle large attachments int axis2, sadly.
> > >
> > >
> > > > -----Urspr√ľngliche Nachricht-----
> > > > Von: axis-user@ws.apache.org
> > > > Gesendet: 23.05.07 07:23:12
> > > > An: "axis user" <axis-user@ws.apache.org>
> > > > Betreff: MTOM error "java.lang.OutOfMemoryError: Java heap space"
> > >
> > >
> > > > Hi friends,
> > > >
> > > >
> > > >
> > > >     I am running sample application "mtom" from standard axis2
samples
> > [axis2-1.1.1\samples\mtom]. This sample is working for sending
attachment of
> > size 2-3 MB, but giving error for more than 3MB size of files.
> > > >
> > > >
> > > >
> > > > I want to send file of size 50-100 MB.
> > > >
> > > >
> > > >
> > > > error is as follows
> > > >
> > > >      [java] Exception in thread "main" org.apache.axis2.AxisFault:
> > java.lang.Out
> > > > OfMemoryError: Java heap space
> > > >      [java]     at
> > org.apache.axis2.description.OutInAxisOperationClient.send(Ou
> > > > tInAxisOperation.java:271)
> > > >      [java]     at
> > org.apache.axis2.description.OutInAxisOperationClient.execute
> > > > (OutInAxisOperation.java:202)
> > > >      [java]     at
sample.mtom.service.MTOMSampleStub.attachment(Unknown
> > Source)
> > > >
> > > >
> > > >
> > > >      [java]     at sample.mtom.client.Client.transferFile(Unknown
> > Source)
> > > >      [java]     at sample.mtom.client.Client.main(Unknown Source)
> > > >      [java] Java Result: 1
> > > >
> > > >
> > > >
> > > > I have enabled "MTOM" & "filecaching" both in the client side, but
not
> > server side caching means in "axis2.xml".
> > > >
> > > > 1) Can some one figureout solution?
> > > >
> > > > 2) Can we send file as attachment of size 50MB - 1GB?
> > > >
> > > >
> > > >
> > > > With best regards
> > > >
> > > > From
> > > > Vikas R. Khengare
> > > >
> > >
> > >
> > > _______________________________________________________________
> > > SMS schreiben mit WEB.DE FreeMail - einfach, schnell und
> > > kostenguenstig. Jetzt gleich testen! http://f.web.de/?mc=021192
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
>
> -- 
> Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message