Reputation: 3297
When I tried to upload a large size image(2.3MB), I got following exception. I use a thumbnail creation jar for thumbnail creation(thumbnailator-0.4.2-all.jar). The file is getting uploaded fine, but I am not able to create thumbnail from it and it shows the exception.
org.apache.jasper.JasperException: Java heap space
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:453)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
I use JSP, with apache tomcat 5.5, eclipse helios as my development tool.
Upvotes: 0
Views: 241
Reputation: 3297
i refered this tutorial and my problem is solved now. Thanks @aroth
Upvotes: 0
Reputation: 54854
The error message gives you a pretty good clue:
Java heap space
You've run out of heap memory. To create a thumbnail your image is probably being decoded to a bitmapped format, which can require quite a bit of memory for a large/high-resolution image file.
You can allocate more memory to your server instance using the -Xmx
argument. This thread may be helpful, if you're not sure where to set this option.
Upvotes: 2