Return-Path: X-Original-To: apmail-axis-java-user-archive@www.apache.org Delivered-To: apmail-axis-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0F9827028 for ; Sat, 16 Jul 2011 02:02:25 +0000 (UTC) Received: (qmail 14070 invoked by uid 500); 16 Jul 2011 02:02:23 -0000 Delivered-To: apmail-axis-java-user-archive@axis.apache.org Received: (qmail 13990 invoked by uid 500); 16 Jul 2011 02:02:22 -0000 Mailing-List: contact java-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@axis.apache.org Delivered-To: mailing list java-user@axis.apache.org Received: (qmail 13981 invoked by uid 99); 16 Jul 2011 02:02:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Jul 2011 02:02:22 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of cerebrotecnologico@gmail.com designates 74.125.82.173 as permitted sender) Received: from [74.125.82.173] (HELO mail-wy0-f173.google.com) (74.125.82.173) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Jul 2011 02:02:17 +0000 Received: by wyf28 with SMTP id 28so267437wyf.32 for ; Fri, 15 Jul 2011 19:01:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=ZYyD3jD3rD21TETdk4Y2zeNV85uKW3357pFQ7Db0E+k=; b=hz66vo5wfGAO5mxO5QkmVHtVlGMQ8arjwiXcDq9d2q5HWQjOEphVMRvGUXw2cevVS6 KHG4bOqrs0A+m6FRKj5jDi+zq03hKIxA6e38J8BLfqJ4zMmF24buCSHHkakHm/W8KBj0 yyTfCs+91l/f34LIHeg653CWf+yl3I/BHRaA4= MIME-Version: 1.0 Received: by 10.216.229.93 with SMTP id g71mr978058weq.70.1310781715629; Fri, 15 Jul 2011 19:01:55 -0700 (PDT) Received: by 10.216.162.140 with HTTP; Fri, 15 Jul 2011 19:01:55 -0700 (PDT) In-Reply-To: References: <2D6E9839E91516499783A049FD7EE564C997@SGSIEXC008.nsn-intra.net> <2D6E9839E91516499783A049FD7EE564BEAD1F@SGSIEXC008.nsn-intra.net> Date: Fri, 15 Jul 2011 22:01:55 -0400 Message-ID: Subject: Re: Attaching huge attachments in axis2 From: Jorge Medina To: java-user@axis.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Never mind, after looking at the Axis2 source code now it is clear to me that the error is coming from the server. You need to modify the server side. There is nothing you can do in the client side to prevent such error in the server. The server may be reading the whole attachment before processing it. On Fri, Jul 15, 2011 at 9:41 PM, Jorge Medina wrote: > I am not clear, Is the message " OutOfMemoryError " coming from the serve= r? > Or is it your client code running out of memory? > > I think it is your client code running out of memory because your > stack trace contains: > =A0 org.apache.axis2.description.OutInAxisOperationClient.send > rather than > =A0 org.apache.axis2.description.OutInAxisOperationClient.receive > > Post the segment of code you use to transfer the file. > > > > > On Mon, Jul 11, 2011 at 4:56 AM, Bhat B, Niranjan (NSN - IN/Bangalore) > wrote: >> Hi Jorge, >> >> I am sorry for the misunderstanding here. >> Let me put it in other words, >> In the client code I am trying to attach huge file and send it to the >> server where the webservice is attached. >> So I get this stack trace with OutOfMemory error in the client side when >> I try to upload this huge file to the webservice: >> >> --cut-- >> Sending ReportOperationStatus >> ['..\esymacstarter\gmoTemp\osr_13101481196870.xml'] to following >> manager: 421506509 (to URL >> http://localhost:8081/axis2/services/NE3SOperationNotificationService) >> ERROR 08-Jul-2011 23:32:17.734 - AxisFault: ReportOperationStatus >> sending failed. (..\esymacstarter\gmoTemp\osr_13101481196870.xml to >> following manager: 421506509 to URL >> http://localhost:8081/axis2/services/NE3SOperationNotificationService) >> org.apache.axis2.AxisFault: java.lang.OutOfMemoryError: Java heap space >> =A0 =A0 =A0 =A0at >> org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java >> :435) >> =A0 =A0 =A0 =A0at >> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(Out >> InAxisOperation.java:371) >> =A0 =A0 =A0 =A0at >> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper >> ation.java:417) >> =A0 =A0 =A0 =A0at >> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA >> xisOperation.java:229) >> =A0 =A0 =A0 =A0at >> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165 >> ) >> =A0 =A0 =A0 =A0at >> com.nokiasiemens.www.ne3s._1_0.NE3SOperationNotificationServiceStub.repo >> rtOperationStatus(NE3SOperationNotificationServiceStub.java:604) >> =A0 =A0 =A0 =A0at >> com.nokia.j2ssp.comp.esymac.common.soapAdapter.notification.ReportOperat >> ionStatusSender.sendOperationStatusResponse(ReportOperationStatusSender. >> java:99) >> =A0 =A0 =A0 =A0at >> com.nokia.j2ssp.comp.esymac.common.soapAdapter.notification.Notification >> SenderThreader.operationStatusResponse(NotificationSenderThreader.java:1 >> 094) >> =A0 =A0 =A0 =A0at >> com.nokia.j2ssp.comp.esymac.common.soapAdapter.notification.Notification >> SenderThreader.access$200(NotificationSenderThreader.java:36) >> =A0 =A0 =A0 =A0at >> com.nokia.j2ssp.comp.esymac.common.soapAdapter.notification.Notification >> SenderThreader$SenderThread.run(NotificationSenderThreader.java:420) >> --cut-- >> >> -----Original Message----- >> From: ext Jorge Medina [mailto:cerebrotecnologico@gmail.com] >> Sent: Saturday, July 09, 2011 7:26 AM >> To: java-user@axis.apache.org >> Subject: Re: Attaching huge attachments in axis2 >> >> Make sure you stream the file. >> >> I use SpringWS on the server side and Axis2 in the client side for >> downloading files. In the server side, I spawn a new thread to write >> the attachment portion using PipedInputStream/PipedOutputStream. >> >> To do an upload, I would do the same. Spawn a new thread to read the >> attachment using =A0PipedInputStream/PipedOutputStream from the stream >> obtained from the DataHandler, connect the piped streams to the >> FileInputStream you use to read the file. >> >> -Jorge >> >> >> >> On Fri, Jul 8, 2011 at 6:31 AM, Bhat B, Niranjan (NSN - IN/Bangalore) >> wrote: >>> >>> Hi All, >>> >>> Recently I had a use case of attaching a huge attachment file(around >> 500 MB) in the request to a webservice. >>> But however, when I tried to do this I see out of memory errors in >> application logs. >>> Can you please let me know the efficient way of attaching huge >> attachment files in the request to a webservice ? >>> I am using SWA attachment APIs. >>> >>> regards, >>> Niranjan >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org >>> For additional commands, e-mail: java-user-help@axis.apache.org >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org >> For additional commands, e-mail: java-user-help@axis.apache.org >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org >> For additional commands, e-mail: java-user-help@axis.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org For additional commands, e-mail: java-user-help@axis.apache.org