[appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-10-25 Thread zen
Despite all the documentations and examples you have missed adding the
enctype!


add this to the form enctype=multipart/form-data you should have no
problems.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-10-25 Thread Adrian Petrescu
No, we had the enctype; that's what the uploadForm.setEncoding(FormPanel.
ENCODING_MULTIPART); was about. As several of us have discovered, it's the
name we were missing. The requirement to have encoding set is
well-documented, the name is not so much.

And the point remains that even if it is documented, running out of memory
NOT the right way to respond to it, because any malicious user can send a
POST request with no name.

On Mon, Oct 25, 2010 at 2:42 AM, zen donny.bidda...@gmail.com wrote:

 Despite all the documentations and examples you have missed adding the
 enctype!

 add this to the form enctype=multipart/form-data you should have no
 problems.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-07-06 Thread Adrian Petrescu
Okay guys, I think I've figured out the source of the problem.

If you fail to add a setName() attribute on your FileInput element (or,
presumably, any other in the form), the resulting HTTP request is
unparseable which causes the MimeMultipart parser to explode in the way all
of you have encountered. I fixed this just by adding a
fileInput.setName(file); and now it uploads to the Blobstore upload url
without any problems.

Even though the problem turned out to be mine, and was easily fixable, I
still consider this a bug in AppEngine because there's no way such a simple
mistake should cause an OutOfMemoryException and crash; it could even be the
source of DOS vulnerabilities in the future just by crafting malicious HTTP
POST requests. I'll file a bug report with Google.

Cheers,
Adrian

On Mon, Jul 5, 2010 at 10:40 PM, Thomas mylee...@gmail.com wrote:

 Hi Adrian:

 By plain normal servlet I meaned the url path (of the call to
 blobstoreService.createUploadUrl(url) ) is mapping to a simple plain
 HttpServlet implementation. And it is better to have the servlet
 bypass any filter mapping in development phase. It's how I finally
 succeeded to upload lots of blobs without any problems.

 On 7月6日, 上午10時07分, Adrian Petrescu apetr...@gmail.com wrote:
  Hi Thomas,
 
  Thanks for your reply :) But I'm not sure what you mean by a plain
 normal
  HttpServlet#doPost to handle the upload; in what sense am I not doing
 that?
  Do you mean the fact that I'm uploading to Blobstore? Why would that be a
  problem, and how else would I get them in there?
 
  Thanks,
  Adrian
 
  On Mon, Jul 5, 2010 at 10:03 PM, Thomas mylee...@gmail.com wrote:
   Hi:
 
   I read the post on Stack Overflow. My opinion is that you had better
   use a plain normal HttpServlet#doPost to handle the upload. I also
   encountered 500 Internal Server Error, but it worked well after I
   replace original handler with a plain servlet.
 
   Hope the above helps!
 
   On 7月6日, 上午8時25分, Adrian Petrescu apetr...@gmail.com wrote:
I've also posted about the issue on Stack Overflow here:
  http://stackoverflow.com/questions/3177092/uploading-to-blobstore-giv.
 ..
 
Hopefully getting some more eyeballs on it will help.
 
On Jul 4, 10:47 pm, Adrian Petrescu apetr...@gmail.com wrote:
 
 I'm having the exact same issue too, down to the line numbers in
 the
 stack trace.
 
 Has anyone figured out what is causing this? I find it hard to
 believe
 we've all made the exact same identical mistake, all within the
 last
 month. Is something wrong on Google's end?
 
 Cheers,
 Adrian
 
 On Jun 2, 7:14 pm, Jean Hsu jeanhs...@gmail.com wrote:
 
  Hi all,
 
  I am trying to set up a basic file upload to blobstore,  but I
 get
  this OutOfMemoryError:
 
  WARNING: Error for /_ah/upload/
  aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
  java.lang.OutOfMemoryError: Java heap space
  at java.util.Arrays.copyOf(Arrays.java:2786)
  at
   java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
  at
 
  
 javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
  316)
  at
   javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
  at
   javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
  at
 
  
 com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(Uploa
   dBlobServlet.java:
  135)
  at
   com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
  $000(UploadBlobServlet.java:72)
  at
 com.google.appengine.api.blobstore.dev.UploadBlobServlet
  $1.run(UploadBlobServlet.java:100)
  at java.security.AccessController.doPrivileged(Native
 Method)
  at
 
  
 com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobS
   ervlet.java:
  98)
  at
   javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
  at
   javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
  at
   org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
  511);
 
  I used the Memory Analyzer on Eclipse and it said that the memory
   leak
  suspect is QueuedThreadPool.  I found this information about a
 memory
  leak bug:
 
 http://jira.codehaus.org/browse/JETTY-1188
 
  How can I figure out what release of jetty is running locally?
  It
  looks like they fixed this in version 6.1.23:
 
  http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160vers.
 ..
 
  Has anyone else had this issue?
 
  Thanks,
  Jean
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Google App Engine for Java group.
   To post to this group, send email to
   google-appengine-j...@googlegroups.com.
   To unsubscribe from this group, send email to
   

[appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-07-05 Thread Adrian Petrescu
I've also posted about the issue on Stack Overflow here:
http://stackoverflow.com/questions/3177092/uploading-to-blobstore-gives-a-java-heap-outofmemoryerror

Hopefully getting some more eyeballs on it will help.

On Jul 4, 10:47 pm, Adrian Petrescu apetr...@gmail.com wrote:
 I'm having the exact same issue too, down to the line numbers in the
 stack trace.

 Has anyone figured out what is causing this? I find it hard to believe
 we've all made the exact same identical mistake, all within the last
 month. Is something wrong on Google's end?

 Cheers,
 Adrian

 On Jun 2, 7:14 pm, Jean Hsu jeanhs...@gmail.com wrote:



  Hi all,

  I am trying to set up a basic file upload to blobstore,  but I get
  this OutOfMemoryError:

  WARNING: Error for /_ah/upload/
  aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
  java.lang.OutOfMemoryError: Java heap space
          at java.util.Arrays.copyOf(Arrays.java:2786)
          at 
  java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
          at
  javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
  316)
          at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
          at 
  javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
          at
  com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(Uploa 
  dBlobServlet.java:
  135)
          at com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
  $000(UploadBlobServlet.java:72)
          at com.google.appengine.api.blobstore.dev.UploadBlobServlet
  $1.run(UploadBlobServlet.java:100)
          at java.security.AccessController.doPrivileged(Native Method)
          at
  com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobS 
  ervlet.java:
  98)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
          at 
  org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
  511);

  I used the Memory Analyzer on Eclipse and it said that the memory leak
  suspect is QueuedThreadPool.  I found this information about a memory
  leak bug:

 http://jira.codehaus.org/browse/JETTY-1188

  How can I figure out what release of jetty is running locally?  It
  looks like they fixed this in version 6.1.23:

 http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160vers...

  Has anyone else had this issue?

  Thanks,
  Jean

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-07-05 Thread Thomas
Hi:

I read the post on Stack Overflow. My opinion is that you had better
use a plain normal HttpServlet#doPost to handle the upload. I also
encountered 500 Internal Server Error, but it worked well after I
replace original handler with a plain servlet.

Hope the above helps!

On 7月6日, 上午8時25分, Adrian Petrescu apetr...@gmail.com wrote:
 I've also posted about the issue on Stack Overflow 
 here:http://stackoverflow.com/questions/3177092/uploading-to-blobstore-giv...

 Hopefully getting some more eyeballs on it will help.

 On Jul 4, 10:47 pm, Adrian Petrescu apetr...@gmail.com wrote:

  I'm having the exact same issue too, down to the line numbers in the
  stack trace.

  Has anyone figured out what is causing this? I find it hard to believe
  we've all made the exact same identical mistake, all within the last
  month. Is something wrong on Google's end?

  Cheers,
  Adrian

  On Jun 2, 7:14 pm, Jean Hsu jeanhs...@gmail.com wrote:

   Hi all,

   I am trying to set up a basic file upload to blobstore,  but I get
   this OutOfMemoryError:

   WARNING: Error for /_ah/upload/
   aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
   java.lang.OutOfMemoryError: Java heap space
           at java.util.Arrays.copyOf(Arrays.java:2786)
           at 
   java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
           at
   javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
   316)
           at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
           at 
   javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
           at
   com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(Uploa
dBlobServlet.java:
   135)
           at com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
   $000(UploadBlobServlet.java:72)
           at com.google.appengine.api.blobstore.dev.UploadBlobServlet
   $1.run(UploadBlobServlet.java:100)
           at java.security.AccessController.doPrivileged(Native Method)
           at
   com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobS
ervlet.java:
   98)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
           at 
   org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
   511);

   I used the Memory Analyzer on Eclipse and it said that the memory leak
   suspect is QueuedThreadPool.  I found this information about a memory
   leak bug:

  http://jira.codehaus.org/browse/JETTY-1188

   How can I figure out what release of jetty is running locally?  It
   looks like they fixed this in version 6.1.23:

  http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160vers...

   Has anyone else had this issue?

   Thanks,
   Jean

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



Re: [appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-07-05 Thread Adrian Petrescu
Hi Thomas,

Thanks for your reply :) But I'm not sure what you mean by a plain normal
HttpServlet#doPost to handle the upload; in what sense am I not doing that?
Do you mean the fact that I'm uploading to Blobstore? Why would that be a
problem, and how else would I get them in there?

Thanks,
Adrian

On Mon, Jul 5, 2010 at 10:03 PM, Thomas mylee...@gmail.com wrote:

 Hi:

 I read the post on Stack Overflow. My opinion is that you had better
 use a plain normal HttpServlet#doPost to handle the upload. I also
 encountered 500 Internal Server Error, but it worked well after I
 replace original handler with a plain servlet.

 Hope the above helps!

 On 7月6日, 上午8時25分, Adrian Petrescu apetr...@gmail.com wrote:
  I've also posted about the issue on Stack Overflow here:
 http://stackoverflow.com/questions/3177092/uploading-to-blobstore-giv...
 
  Hopefully getting some more eyeballs on it will help.
 
  On Jul 4, 10:47 pm, Adrian Petrescu apetr...@gmail.com wrote:
 
   I'm having the exact same issue too, down to the line numbers in the
   stack trace.
 
   Has anyone figured out what is causing this? I find it hard to believe
   we've all made the exact same identical mistake, all within the last
   month. Is something wrong on Google's end?
 
   Cheers,
   Adrian
 
   On Jun 2, 7:14 pm, Jean Hsu jeanhs...@gmail.com wrote:
 
Hi all,
 
I am trying to set up a basic file upload to blobstore,  but I get
this OutOfMemoryError:
 
WARNING: Error for /_ah/upload/
aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2786)
at
 java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
at
   
 javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
316)
at
 javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
at
 javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
at
   
 com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(Uploa
 dBlobServlet.java:
135)
at
 com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
$000(UploadBlobServlet.java:72)
at com.google.appengine.api.blobstore.dev.UploadBlobServlet
$1.run(UploadBlobServlet.java:100)
at java.security.AccessController.doPrivileged(Native Method)
at
   
 com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobS
 ervlet.java:
98)
at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at
 org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511);
 
I used the Memory Analyzer on Eclipse and it said that the memory
 leak
suspect is QueuedThreadPool.  I found this information about a memory
leak bug:
 
   http://jira.codehaus.org/browse/JETTY-1188
 
How can I figure out what release of jetty is running locally?  It
looks like they fixed this in version 6.1.23:
 
   
 http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160vers...
 
Has anyone else had this issue?
 
Thanks,
Jean

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine for Java group.
 To post to this group, send email to
 google-appengine-j...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-07-05 Thread Thomas
Hi Adrian:

 By plain normal servlet I meaned the url path (of the call to
blobstoreService.createUploadUrl(url) ) is mapping to a simple plain
HttpServlet implementation. And it is better to have the servlet
bypass any filter mapping in development phase. It's how I finally
succeeded to upload lots of blobs without any problems.

On 7月6日, 上午10時07分, Adrian Petrescu apetr...@gmail.com wrote:
 Hi Thomas,

 Thanks for your reply :) But I'm not sure what you mean by a plain normal
 HttpServlet#doPost to handle the upload; in what sense am I not doing that?
 Do you mean the fact that I'm uploading to Blobstore? Why would that be a
 problem, and how else would I get them in there?

 Thanks,
 Adrian

 On Mon, Jul 5, 2010 at 10:03 PM, Thomas mylee...@gmail.com wrote:
  Hi:

  I read the post on Stack Overflow. My opinion is that you had better
  use a plain normal HttpServlet#doPost to handle the upload. I also
  encountered 500 Internal Server Error, but it worked well after I
  replace original handler with a plain servlet.

  Hope the above helps!

  On 7月6日, 上午8時25分, Adrian Petrescu apetr...@gmail.com wrote:
   I've also posted about the issue on Stack Overflow here:
 http://stackoverflow.com/questions/3177092/uploading-to-blobstore-giv...

   Hopefully getting some more eyeballs on it will help.

   On Jul 4, 10:47 pm, Adrian Petrescu apetr...@gmail.com wrote:

I'm having the exact same issue too, down to the line numbers in the
stack trace.

Has anyone figured out what is causing this? I find it hard to believe
we've all made the exact same identical mistake, all within the last
month. Is something wrong on Google's end?

Cheers,
Adrian

On Jun 2, 7:14 pm, Jean Hsu jeanhs...@gmail.com wrote:

 Hi all,

 I am trying to set up a basic file upload to blobstore,  but I get
 this OutOfMemoryError:

 WARNING: Error for /_ah/upload/
 aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
 java.lang.OutOfMemoryError: Java heap space
         at java.util.Arrays.copyOf(Arrays.java:2786)
         at
  java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
         at

  javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
 316)
         at
  javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
         at
  javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
         at

  com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(Uploa
  dBlobServlet.java:
 135)
         at
  com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
 $000(UploadBlobServlet.java:72)
         at com.google.appengine.api.blobstore.dev.UploadBlobServlet
 $1.run(UploadBlobServlet.java:100)
         at java.security.AccessController.doPrivileged(Native Method)
         at

  com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobS
  ervlet.java:
 98)
         at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
         at
  javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
         at
  org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 511);

 I used the Memory Analyzer on Eclipse and it said that the memory
  leak
 suspect is QueuedThreadPool.  I found this information about a memory
 leak bug:

http://jira.codehaus.org/browse/JETTY-1188

 How can I figure out what release of jetty is running locally?  It
 looks like they fixed this in version 6.1.23:

 http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160vers...

 Has anyone else had this issue?

 Thanks,
 Jean

  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine for Java group.
  To post to this group, send email to
  google-appengine-j...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-07-04 Thread Adrian Petrescu
I'm having the exact same issue too, down to the line numbers in the
stack trace.

Has anyone figured out what is causing this? I find it hard to believe
we've all made the exact same identical mistake, all within the last
month. Is something wrong on Google's end?

Cheers,
Adrian

On Jun 2, 7:14 pm, Jean Hsu jeanhs...@gmail.com wrote:
 Hi all,

 I am trying to set up a basic file upload to blobstore,  but I get
 this OutOfMemoryError:

 WARNING: Error for /_ah/upload/
 aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
 java.lang.OutOfMemoryError: Java heap space
         at java.util.Arrays.copyOf(Arrays.java:2786)
         at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
         at
 javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
 316)
         at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
         at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
         at
 com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(UploadBlobServlet.java:
 135)
         at com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
 $000(UploadBlobServlet.java:72)
         at com.google.appengine.api.blobstore.dev.UploadBlobServlet
 $1.run(UploadBlobServlet.java:100)
         at java.security.AccessController.doPrivileged(Native Method)
         at
 com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobServlet.java:
 98)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 511);

 I used the Memory Analyzer on Eclipse and it said that the memory leak
 suspect is QueuedThreadPool.  I found this information about a memory
 leak bug:

 http://jira.codehaus.org/browse/JETTY-1188

 How can I figure out what release of jetty is running locally?  It
 looks like they fixed this in version 6.1.23:

 http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160vers...

 Has anyone else had this issue?

 Thanks,
 Jean

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-06-22 Thread Mouseclicker
Did you try to upload a binary object like an image? It seems that app-
engine has hard-coded to parse the content for multipart/form-data.
The error appears when your message body is not formatted to the
multipart rules and parsing fails. The stacktrace gives an indication:

javax.mail.internet.MimeMultipart.readTillFirstBoundary

It is very unfortunate that you can only upload data from html-forms
to use BlobStore. Does someone know a workaround for other MIME types?

That you get an OutOfMemoryError is also the worst that can happen. If
the app really allocates that much heap space this is a perfect target
for a denial-of-service attack...

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-06-11 Thread Vishal Singh
I have the same issue.

On Jun 4, 11:51 am, eighty eightyste...@gmail.com wrote:
 +1

 On Jun 2, 4:14 pm, Jean Hsu jeanhs...@gmail.com wrote:



  Hi all,

  I am trying to set up a basic file upload to blobstore,  but I get
  this OutOfMemoryError:

  WARNING: Error for /_ah/upload/
  aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
  java.lang.OutOfMemoryError: Java heap space
          at java.util.Arrays.copyOf(Arrays.java:2786)
          at 
  java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
          at
  javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
  316)
          at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
          at 
  javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
          at
 com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(Uploa 
 dBlobServlet.java:
  135)
          at com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
  $000(UploadBlobServlet.java:72)
          at com.google.appengine.api.blobstore.dev.UploadBlobServlet
  $1.run(UploadBlobServlet.java:100)
          at java.security.AccessController.doPrivileged(Native Method)
          at
  com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobS 
  ervlet.java:
  98)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
          at 
  org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
  511);

  I used the Memory Analyzer on Eclipse and it said that the memory leak
  suspect is QueuedThreadPool.  I found this information about a memory
  leak bug:

 http://jira.codehaus.org/browse/JETTY-1188

  How can I figure out what release of jetty is running locally?  It
  looks like they fixed this in version 6.1.23:

 http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160vers...

  Has anyone else had this issue?

  Thanks,
  Jean

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-06-07 Thread Jean Hsu
Anyone NOT getting an outOfMemory error?  I tried to deploy to
appengine, and don't get an outofmemory error, but instead eventually
get a methodNotFound.  Anyone have a small working example?

Jean

On Jun 5, 5:22 pm, Luai kassar luai.kas...@gmail.com wrote:
 I am getting OutOfMemoryError too for any file i try to upload .
 can someone explain what the problem is please?

 Thanks
 Luai.

 On Jun 3, 12:14 am,JeanHsu jeanhs...@gmail.com wrote:

  Hi all,

  I am trying to set up a basic file upload to blobstore,  but I get
  this OutOfMemoryError:

  WARNING: Error for /_ah/upload/
  aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
  java.lang.OutOfMemoryError: Java heap space
          at java.util.Arrays.copyOf(Arrays.java:2786)
          at 
  java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
          at
  javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
  316)
          at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
          at 
  javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
          at
  com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(UploadBlobServlet.java:
  135)
          at com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
  $000(UploadBlobServlet.java:72)
          at com.google.appengine.api.blobstore.dev.UploadBlobServlet
  $1.run(UploadBlobServlet.java:100)
          at java.security.AccessController.doPrivileged(Native Method)
          at
  com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobServlet.java:
  98)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
          at 
  org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
  511);

  I used the Memory Analyzer on Eclipse and it said that the memory leak
  suspect is QueuedThreadPool.  I found this information about a memory
  leak bug:

 http://jira.codehaus.org/browse/JETTY-1188

  How can I figure out what release of jetty is running locally?  It
  looks like they fixed this in version 6.1.23:

 http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160vers...

  Has anyone else had this issue?

  Thanks,
 Jean

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-06-07 Thread Jean Hsu
Here's what I get from live http headers when I deploy and try to
upload.  It tries to do a get on the uploadUrl, for test.nocache.js,
and also later for css.  I get a 405 Method Not Allowed for these.
Any ideas why it's trying to do a get??


POST /_ah/upload/
AMmfu6ZRpZf67ospmbfJKHd0AKnI9LFkWSDeDuGECy_md0wTVCgPaA9nVuqSg3MUlLJM26dP9I421TDZriqztBSoT7vDEq_Eeel0lhoWwoD1JgFj2pA7bSI/
ALBNUaYATA2SyHej3Q3PwRuq5WJuE0QxgQPHYGMk/ HTTP/1.1

...


HTTP/1.1 200 OK

Server: Upload Server Built on May 19 2010 13:39:25 (1274301565)

Etag: N3jo2g

Date: Tue, 08 Jun 2010 00:36:01 GMT

Expires: Fri, 01 Jan 1990 00:00:00 GMT

Cache-Control: no-cache, no-store, must-revalidate

X-AppEngine-Estimated-CPM-US-Dollars: $0.52

X-AppEngine-Resource-Usage: ms=2 cpu_ms=0 api_cpu_ms=0

Content-Type: text/html

Pragma: no-cache

Content-Length: 2590

--

http://app-name.appspot.com/_ah/upload/AMmfu6ZRpZf67ospmbfJKHd0AKnI9LFkWSDeDuGECy_md0wTVCgPaA9nVuqSg3MUlLJM26dP9I421TDZriqztBSoT7vDEq_Eeel0lhoWwoD1JgFj2pA7bSI/ALBNUaYATA2SyHej3Q3PwRuq5WJuE0QxgQPHYGMk/test/test.nocache.js



GET /_ah/upload/
AMmfu6ZRpZf67ospmbfJKHd0AKnI9LFkWSDeDuGECy_md0wTVCgPaA9nVuqSg3MUlLJM26dP9I421TDZriqztBSoT7vDEq_Eeel0lhoWwoD1JgFj2pA7bSI/
ALBNUaYATA2SyHej3Q3PwRuq5WJuE0QxgQPHYGMk/test/test.nocache.js HTTP/
1.1

Host: app-name.appspot.com

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:
1.9.2.3) Gecko/20100401 Firefox/3.6.3

Accept: */*

Accept-Language: en-us,en;q=0.5

Accept-Encoding: gzip,deflate

Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7

Keep-Alive: 115

Connection: keep-alive

Referer:
http://app-name.appspot.com/_ah/upload/AMmfu6ZRpZf67ospmbfJKHd0AKnI9LFkWSDeDuGECy_md0wTVCgPaA9nVuqSg3MUlLJM26dP9I421TDZriqztBSoT7vDEq_Eeel0lhoWwoD1JgFj2pA7bSI/ALBNUaYATA2SyHej3Q3PwRuq5WJuE0QxgQPHYGMk/



HTTP/1.1 405 Method Not Allowed

Server: Upload Server Built on May 19 2010 13:39:25 (1274301565)

Allow: POST

Date: Tue, 08 Jun 2010 00:36:01 GMT

Pragma: no-cache

Expires: Fri, 01 Jan 1990 00:00:00 GMT

Cache-Control: no-cache, no-store, must-revalidate

Content-Length: 0

Content-Type: text/html



On Jun 7, 5:10 pm, Jean Hsu jeanhs...@gmail.com wrote:
 Anyone NOT getting an outOfMemory error?  I tried to deploy to
 appengine, and don't get an outofmemory error, but instead eventually
 get a methodNotFound.  Anyone have a small working example?

 Jean

 On Jun 5, 5:22 pm, Luai kassar luai.kas...@gmail.com wrote:

  I am getting OutOfMemoryError too for any file i try to upload .
  can someone explain what the problem is please?

  Thanks
  Luai.

  On Jun 3, 12:14 am,JeanHsu jeanhs...@gmail.com wrote:

   Hi all,

   I am trying to set up a basic file upload to blobstore,  but I get
   this OutOfMemoryError:

   WARNING: Error for /_ah/upload/
   aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
   java.lang.OutOfMemoryError: Java heap space
           at java.util.Arrays.copyOf(Arrays.java:2786)
           at 
   java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
           at
   javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
   316)
           at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
           at 
   javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
           at
   com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(UploadBlobServlet.java:
   135)
           at com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
   $000(UploadBlobServlet.java:72)
           at com.google.appengine.api.blobstore.dev.UploadBlobServlet
   $1.run(UploadBlobServlet.java:100)
           at java.security.AccessController.doPrivileged(Native Method)
           at
   com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobServlet.java:
   98)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
           at 
   org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
   511);

   I used the Memory Analyzer on Eclipse and it said that the memory leak
   suspect is QueuedThreadPool.  I found this information about a memory
   leak bug:

  http://jira.codehaus.org/browse/JETTY-1188

   How can I figure out what release of jetty is running locally?  It
   looks like they fixed this in version 6.1.23:

  http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160vers...

   Has anyone else had this issue?

   Thanks,
  Jean

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-06-06 Thread Luai kassar
I am getting OutOfMemoryError too for any file i try to upload .
can someone explain what the problem is please?

Thanks
Luai.

On Jun 3, 12:14 am, Jean Hsu jeanhs...@gmail.com wrote:
 Hi all,

 I am trying to set up a basic file upload to blobstore,  but I get
 this OutOfMemoryError:

 WARNING: Error for /_ah/upload/
 aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
 java.lang.OutOfMemoryError: Java heap space
         at java.util.Arrays.copyOf(Arrays.java:2786)
         at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
         at
 javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
 316)
         at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
         at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
         at
 com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(UploadBlobServlet.java:
 135)
         at com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
 $000(UploadBlobServlet.java:72)
         at com.google.appengine.api.blobstore.dev.UploadBlobServlet
 $1.run(UploadBlobServlet.java:100)
         at java.security.AccessController.doPrivileged(Native Method)
         at
 com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobServlet.java:
 98)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 511);

 I used the Memory Analyzer on Eclipse and it said that the memory leak
 suspect is QueuedThreadPool.  I found this information about a memory
 leak bug:

 http://jira.codehaus.org/browse/JETTY-1188

 How can I figure out what release of jetty is running locally?  It
 looks like they fixed this in version 6.1.23:

 http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160vers...

 Has anyone else had this issue?

 Thanks,
 Jean

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Uploading to blobstore gives OutOfMemoryError

2010-06-04 Thread eighty
+1

On Jun 2, 4:14 pm, Jean Hsu jeanhs...@gmail.com wrote:
 Hi all,

 I am trying to set up a basic file upload to blobstore,  but I get
 this OutOfMemoryError:

 WARNING: Error for /_ah/upload/
 aghvbWdkcmVzc3IcCxIVX19CbG9iVXBsb2FkU2Vzc2lvbl9fGMACDA
 java.lang.OutOfMemoryError: Java heap space
         at java.util.Arrays.copyOf(Arrays.java:2786)
         at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:71)
         at
 javax.mail.internet.MimeMultipart.readTillFirstBoundary(MimeMultipart.java:
 316)
         at javax.mail.internet.MimeMultipart.parse(MimeMultipart.java:186)
         at javax.mail.internet.MimeMultipart.getCount(MimeMultipart.java:109)
         at
 com.google.appengine.api.blobstore.dev.UploadBlobServlet.handleUpload(Uploa 
 dBlobServlet.java:
 135)
         at com.google.appengine.api.blobstore.dev.UploadBlobServlet.access
 $000(UploadBlobServlet.java:72)
         at com.google.appengine.api.blobstore.dev.UploadBlobServlet
 $1.run(UploadBlobServlet.java:100)
         at java.security.AccessController.doPrivileged(Native Method)
         at
 com.google.appengine.api.blobstore.dev.UploadBlobServlet.doPost(UploadBlobS 
 ervlet.java:
 98)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 511);

 I used the Memory Analyzer on Eclipse and it said that the memory leak
 suspect is QueuedThreadPool.  I found this information about a memory
 leak bug:

 http://jira.codehaus.org/browse/JETTY-1188

 How can I figure out what release of jetty is running locally?  It
 looks like they fixed this in version 6.1.23:

 http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11160vers...

 Has anyone else had this issue?

 Thanks,
 Jean

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.