Out of memory error in Jsp application

hi
In my project im doing some image processing techniques like changing the uploaded original image to negative image.
by that time im getting the following error with the image size morethan 500KB
exception
javax.servlet.ServletException: Java heap space
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
org.apache.jsp.negative_jsp._jspService(negative_jsp.java:456)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
root cause
java.lang.OutOfMemoryError: Java heap space
can anyone tell me how to rectify this error

Image processing require a lot of resources (RAM and CPU)
increase the maximum JVM memory by using -Xmx option
for instance:
-Xmx512m
to give it a max memory of 512Mo
the place you must do that depend on what server you're running
You'll find it in the documentation

Similar Messages

  • Out of memory error adobe elements 3.0

    When I try to open adobe photo elements 3.0 I get an out of memory error.  the application wont even open.  I upgraded my RAM from 2GB to 3 GB but it has made no difference

    stacey_r79 wrote:
    Hi, just wondering if you had any success in retreiving or opening your Organizer?? Im having the same problem and i have tried everything, i even rang Adobe and they told me there were no technitions able to help because Adobe Photoshop Elements 3.0 was too old. If anyone has a solution please let me know, i have 5 years worth of photos in this software, i just want to be able to open the organizer to burn all my pics to CD then i will update my software. PLEASE HELP!!!!!!!!
    First of all, your photos are not, "in this software" they are in folders on your hard drive, and PSE merely points to them. If >>you personally<< didn't delete them, or reformat your HDD, then they are still there. The default file path for your photos is this; "My Documents" > "My Photos" > "Adobe", and then a couple of different folders dependent on photo type, for example, "Scanned Photos".
    If you are using the default location, you can simply copy and paste you pictures to an external HDD, or burn them to CD or DVD with Windows. I am not recommending this, since if would not allow you to carry over information created by the organizer, and the photos would have to be reimported and retagged, by your files would be backed up and safe, the most important thing.
    There really isn't a need for all these histrionics, Even if you uninstall PSE, your photos will still be exactly where they were.  Even if you uninstall PSE, its catalog information will still be intact, and a later version will pick it up and "convert it" to its own file system.
    Support for PSE-3 has obviously ended, it's more than 5 years and 5 versions old. Just as a topic of conversation, my personal favorite version of PSE, is PSE-5.  IMO, it's the fasest importing, the most reliable, yet it has a lot more bells and whistles than PSE-3. If you can find a usable copy, I'd grab it, especially for a computer running XP.
    As to the out of memory issue there can be several issues that can affect this, for example; not enough RAM is allotted to PSE, this is independent of the amount of RAM actually installed in the computer. The scratch disc area is full or insufficient, the preferences file is corrupt.
    Everybody is complaining about not being helped in this thread, yet no one has posted back as to whether they have tried Barbara's suggestions, or even if they understand enough about Windows file system to be able to begin to help themselves.

  • Out of Memory Error when generating JSP

    Hi,
    I have a bit of a problem. I?m trying to generate quite a large JSP file (a table with about 1500 rows). The problem is that I get an out of memory error when the JSP is being generated. And it is definitely that the JSP is too large, or rather the HTML being generated from it. Now I was under the impression that the JSP page was flush now and again, but I tried to set all the different flush options and I have also tried to manually flush the page. Nothing of this made any difference except for displaying a white page instead of an error page since the header was already sent. Now this suggests to me that the page is being cached internally by the server and then sent to the client. So is there anything I can do about this?
    Regards
    Hertz

    You are building an HTML table with 1500 rows? That is definitely a lot. And I assume you are also putting some styling on that table...
    These days programmers resource to [url en.wikipedia.org/wiki/AJAX]AJAX techniques for things like that.
    You can, for example, send the table data as a list of comma separated values, and then use Javascript on the browser to create a partial table with options to browse through the different pages of data.
    If you need to show all that data in one single page, you can still try sending just the data as CSV or XML and then building the table on the browser via a Javascript loop. Use CSS for the styling so you don't overload the HTML code with styling information.
    Marcos Broc
    Hi,
    I have a bit of a problem. I?m trying to generate
    quite a large JSP file (a table with about 1500
    rows). The problem is that I get an out of memory
    error when the JSP is being generated. And it is
    definitely that the JSP is too large, or rather the
    HTML being generated from it. Now I was under the
    impression that the JSP page was flush now and again,
    but I tried to set all the different flush options
    and I have also tried to manually flush the page.
    Nothing of this made any difference except for
    displaying a white page instead of an error page
    since the header was already sent. Now this suggests
    to me that the page is being cached internally by the
    server and then sent to the client. So is there
    anything I can do about this?
    Regards
    Hertz

  • Large Pdf using XML XSL - Out of Memory Error

    Hi Friends.
    I am trying to generate a PDF from XML, XSL and FO in java. It works fine if the PDF to be generated is small.
    But if the PDF to be generated is big, then it throws "Out of Memory" error. Can some one please give me some pointers about the possible reasons for this errors. Thanks for your help.
    RM
    Code:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import org.xml.sax.InputSource;
    import org.xml.sax.XMLReader;
    import org.apache.fop.apps.Driver;
    import org.apache.fop.apps.Version;
    import org.apache.fop.apps.XSLTInputHandler;
    import org.apache.fop.messaging.MessageHandler;
    import org.apache.avalon.framework.logger.ConsoleLogger;
    import org.apache.avalon.framework.logger.Logger;
    public class PdfServlet extends HttpServlet {
    public static final String FO_REQUEST_PARAM = "fo";
    public static final String XML_REQUEST_PARAM = "xml";
    public static final String XSL_REQUEST_PARAM = "xsl";
    Logger log = null;
         Com_BUtil myBu = new Com_BUtil();
    public void doGet(HttpServletRequest request,
    HttpServletResponse response) throws ServletException {
    if(log == null) {
         log = new ConsoleLogger(ConsoleLogger.LEVEL_WARN);
         MessageHandler.setScreenLogger(log);
    try {
    String foParam = request.getParameter(FO_REQUEST_PARAM);
    String xmlParam = myBu.getConfigVal("filePath") +"/"+request.getParameter(XML_REQUEST_PARAM);
    String xslParam = myBu.SERVERROOT + "/jsp/servlet/"+request.getParameter(XSL_REQUEST_PARAM)+".xsl";
         if((xmlParam != null) && (xslParam != null)) {
    XSLTInputHandler input = new XSLTInputHandler(new File(xmlParam), new File(xslParam));
    renderXML(input, response);
    } else {
    PrintWriter out = response.getWriter();
    out.println("<html><head><title>Error</title></head>\n"+
    "<body><h1>PdfServlet Error</h1><h3>No 'fo' "+
    "request param given.</body></html>");
    } catch (ServletException ex) {
    throw ex;
    catch (Exception ex) {
    throw new ServletException(ex);
    public void renderXML(XSLTInputHandler input,
    HttpServletResponse response) throws ServletException {
    try {
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    response.setContentType("application/pdf");
    Driver driver = new Driver();
    driver.setLogger(log);
    driver.setRenderer(Driver.RENDER_PDF);
    driver.setOutputStream(out);
    driver.render(input.getParser(), input.getInputSource());
    byte[] content = out.toByteArray();
    response.setContentLength(content.length);
    response.getOutputStream().write(content);
    response.getOutputStream().flush();
    } catch (Exception ex) {
    throw new ServletException(ex);
    * creates a SAX parser, using the value of org.xml.sax.parser
    * defaulting to org.apache.xerces.parsers.SAXParser
    * @return the created SAX parser
    static XMLReader createParser() throws ServletException {
    String parserClassName = System.getProperty("org.xml.sax.parser");
    if (parserClassName == null) {
    parserClassName = "org.apache.xerces.parsers.SAXParser";
    try {
    return (XMLReader) Class.forName(
    parserClassName).newInstance();
    } catch (Exception e) {
    throw new ServletException(e);

    Hi,
    I did try that initially. After executing the command I get this message.
    C:\>java -Xms128M -Xmx256M
    Usage: java [-options] class [args...]
    (to execute a class)
    or java -jar [-options] jarfile [args...]
    (to execute a jar file)
    where options include:
    -cp -classpath <directories and zip/jar files separated by ;>
    set search path for application classes and resources
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -showversion print product version and continue
    -? -help print this help message
    -X print help on non-standard options
    Thanks for your help.
    RM

  • Out of Memory error in  JTextPane

    Hi all,
    A application contains four JTextPanes.The features supported are foreground,background colouring,editing etc...
    When i try to load a file
    containing 10,000 lines i get "out of memory error".
    What is the maximum number of characters or lines that can be
    represented in a JTextPane.
    I find a lot of objects related to JTextPane getting created.
    Is there any work around to avoid this?.
    Has any one faced this problem already?.
    The forum already contains the question but no replies to it.
    Thanks.

    Has any one faced this problem already?.assuming you're having the same problem (sure sounds similar)...
    see my thread here:
    http://forum.java.sun.com/thread.jsp?forum=57&thread=340872
    there's a bug in jtextarea, jtextpane and jeditorpane. a link to the initial bug report (jtextarea) is in there. i duplicated the bug in all three components by creating a blank jframe with the component in question on it. memory use skyrocketed with all three
    i already cast two votes for for the bug to be fixed. i don't know how sun can expect people to adopt java when there are debilitating problems such as these...
    anyway, try using an awt text area instead...that is, if you don't need to make use of the extra features of jtextpane. using the awt text area solved my problems.

  • Out Of Memory Error : unable to create new native thread

    Hi Experts,
    The details are given below -
    1. Sun Java System Application Server 7
    2. Java 1.4.2_05
    3. Solaris 9 (OS)
    4. RAM 8 GB
    There are 3-4 applications deployed on this Sun Server 7. Some times we got "Out Of Memory" Error while displaying any jsp. Then we restart the Sun Server, the problem is resolved for some time.
    This all is happening on production environment. We can not start the Sun Server again & again on production.
    We have also set the java parameters as -Xms 3584M & -Xmx 3584M i.e 3.5 GB around.
    If we change this parameter means less or more from 3584M, then our site becomes down.
    Please help us out as soon as possible.

    How do you expect anyone to give you a sensible answer to this? What server are you using to execute the JSP's? Tomcat? Is the code in the JSP causing the out of mem or is it a server related issue (unlikely...)?
    Drill down to the core of the problem before posting...

  • Out of Memory Error - Production Down

    Hi there:
    Production environment setup:
    JRUN Version 3.1.15506 Professional
    OS Windows2000, 2Gb RAM
    JRE 1.3.1_05
    3 applications written in Java with JSP front end interfaces running on IIS
    We have a situation that our javaw process associated to our JSP apps will error out with JavaOutOfMemory, and our users get the '500 HTTP Internal Server Error'. So far, we have performed the following tasks to resolve this problem:
    1) Java code analysis (ensuring un-used objects' memories are marked for gc).
    2) We have specified the heap sizes (-Xms 256M, -Xmx512M) and (-Xincgc) as a part of the Java parameter.
    All of our efforts still cannot prevent this problem from recurring. We have also implemented -verbose:gc to generate the output. Our appls will run fine until the output shows back to back FULL GC, and the live object sizes remained unchange. (see below of our output file sample)
    [GC 475473K->475430K(502528K), 0.1879665 secs]
    [GC 475558K->475533K(502656K), 0.1820402 secs]
    [Full GC 475579K->458333K(480448K), 13.8025016 secs]
    [Full GC 458333K->458316K(480320K), 13.1841613 secs]
    [GC 458380K->458325K(480320K), 9.5699595 secs]
    [Full GC 458401K->458304K(480320K), 12.7683476 secs]
    [Full GC 458304K->458303K(480320K), 12.6187116 secs]
    [GC 458305K->458304K(480320K), 9.5906711 secs]
    [Full GC 458574K->458313K(480320K), 12.6526716 secs]
    [Full GC 458313K->458301K(480320K), 12.3069702 secs]
    [GC 458349K->458303K(480384K), 9.3841784 secs]
    [Full GC 458331K->458286K(480384K), 12.3653659 secs]
    [Full GC 458286K->458285K(480320K), 12.2920750 secs]
    [GC 458400K->458297K(480384K), 9.2735958 secs]
    [Full GC 458450K->458315K(480384K), 12.4419648 secs]
    [Full GC 458315K->458303K(480384K), 12.5853938 secs]
    [GC 458481K->458311K(480384K), 9.5728288 secs]
    [Full GC 458315K->458215K(480320K), 13.0953606 secs]
    [Full GC 458215K->458214K(480320K), 12.5852260 secs]
    Any advise or hint on finding a resolution?
    Sincerely, Joseph C. Yin
    [email protected]

    If you are getting an out of memory error then it generally means you are running out of memory.
    Now if you have no leaks in the system then it means that your load is too high for the resources that you are allocating. You either increase the resources or you throttle the system so it can't run out.
    Since you profiled the application under load, it should not be possible for it to be a leak in java. It could be a leak in the JVM. If it is then you have to reduce to the problem, report it as a bug, and then try to find a work around.

  • Acrobat XI Pro "Out of Memory" error after Office 2010 install

    Good Afternoon,
    We recently pushed Office 2010 to our users and are now getting reports of previous installs of Adobe Acrobat XI Pro no longer working but throwing "Out of Memory" errors.
    We are in a Windows XP environment. All machines are HP 8440p/6930p/6910 with the same Service pack level (3) and all up to date on security patches.
    All machines are running Office 2010 SP1.
    All machines have 2GB or 4GB of RAM (Only 3.25GB recognized as we are a 32bit OS environment).
    All machines have adequate free space (ranging from 50gb to 200gb of free space).
    All machines are set to 4096mb initial page file size with 8192mb maximum page file size.
    All machines with Acrobat XI Pro *DO NOT* have Reader XI installed alongside. If Reader is installed, it is Reader 10.1 or higher.
    The following troubleshooting steps have been taken:
    Verify page file size (4096mb - 8192mb).
    Deleted local user and Windows temp files (%temp% and c:\WINDOWS\Temp both emptied).
    Repair on Adobe Acrobat XI Pro install. No change.
    Uninstall Acrobat Pro XI, reboot, re-install. No change.
    Uninstall Acrobat Pro XI Pro along with *ALL* other Adobe applications presently installed (Flash Player, Air), delete all Adobe folders and files found in a full search of the C drive, delete all orphaned Registry entries for all Adobe products, re-empty all temp folders, reboot.
    Re-install Adobe Acrobat XI Pro. No change.
    Disable enhanced security in Acrobat XI Pro. No change.
    Renamed Acrobat XI's plug_ins folder to plug_ins.old.
    You *can* get Acrobat to open once this is done but when you attempt to edit a file or enter data into a form, you get the message, "The "Updater" plug-in has been removed. Please re-install Acrobat to continue viewing the current file."
    A repair on the Office 2010 install and re-installing Office 2010 also had no effect.
    At this point, short of re-imaging the machines (which is *not* an option), we are stumped.
    We have not yet tried rolling back a user to Office 2007 as the upgrade initiative is enterprise-wide and rolling back would not be considered a solution.
    Anyone have any ideas beyond what has been tried so far?

    As mentioned, the TEMP folder is typically the problem. MS limits the size of this folder and you have 2 choices: 1. empty it or 2. increase the size limit. I am not positive this is the issue, but it does crop up at times. It does not matter how big your harddrive is, it is a matter of the amount of space that MS has allocated for virtual memory. I am surprised that there is an issue with 64GB of RAM, but MS is real good at letting you know you can't have it all for use because you might want to open up something else. That is why a lot of big packages turn off some of the limits of Windows or use Linux.

  • Out of Memory Error While deploying as EAR file

    Hai,
    I was trying to deploy an EAR file of size 63 MB which inturn containing about 60 EJB.jars. No WARs. application.xml has all the entries for the JARs. While I am deploying it is giving Out of Memory Error. Is there any way to tweak this problem. I am using my own hand written java application which uses the SunONE deployment APIs for deployment. Can u please tell how to tackle this problem. I am running my application through a batch file which uses jdk1.4.
    Please help me regarding this issue.

    You can set the initial heap size and maximum heap size for the JVM, either in the app-server admin console, or maybe in one of your scripts. You look-up the syntax!...
    I had this error yesterday. I too had run out of memory (150Mb). You simply need to allocate more to the app-server.

  • Hyperion IR : Getting out of memory error while fetching data for whole year through web client (wrokspace)

    Hi,
    While fetching data though IR wen client from workspace for a year(all 12 months) I am getting error as ("Out of Memory .Advice : Close other applications or windows and try again").
    If I am trying same through IR studio it does not give any output and show me same repoting front page.
    If i am selecting periods till 8 months it is giving the required data in both IR web client and IR studio.
    Could you please suggest how can we resolve this issue.
    Thanks,
    D.N.Rana

    Issue Cause :
    Sometimes this is due to excessive data which brings the size of the BQY file up around one gigabyte uncompressed in size (for processing may take twice as actual RAM, plus the memory space space for the plugin, and the typical memory limit on a 32-bit system is 2 gigabytes).
    Solution :
    To avoid excessive BQY size exceeding memory availability:
    Ensure that your computer has at least 2Gb of free RAM before he runs IR Studio.
    Put a limit to the number of rows that can be pulled down: Right click on Request label of Query section and put a value in Return First xxx Rows (and check the check box).
    Do not pull down more than 750 MB of data (remember it may be duplicated while processing).
    Place limits or aggregations in Query section (as opposed to Result section) to limit data entering the BQY.

  • Uploading large files from applet to servlet throws out of memory error

    I have a java applet that needs to upload files from a client machine
    to a web server using a servlet. the problem i am having is that in
    the current scheme, files larger than 17-20MB throw an out of memory
    error. is there any way we can get around this problem? i will post
    the client and server side code for reference.
    Client Side Code:
    import java.io.*;
    import java.net.*;
    // this class is a client that enables transfer of files from client
    // to server. This client connects to a servlet running on the server
    // and transmits the file.
    public class fileTransferClient
    private static final String FILENAME_HEADER = "fileName";
    private static final String FILELASTMOD_HEADER = "fileLastMod";
    // this method transfers the prescribed file to the server.
    // if the destination directory is "", it transfers the file to
    "d:\\".
    //11-21-02 Changes : This method now has a new parameter that
    references the item
    //that is being transferred in the import list.
    public static String transferFile(String srcFileName, String
    destFileName,
    String destDir, int itemID)
    if (destDir.equals(""))
    destDir = "E:\\FTP\\incoming\\";
    // get the fully qualified filename and the mere filename.
    String fqfn = srcFileName;
    String fname =
    fqfn.substring(fqfn.lastIndexOf(File.separator)+1);
    try
    //importTable importer = jbInit.getImportTable();
    // create the file to be uploaded and a connection to
    servlet.
    File fileToUpload = new File(fqfn);
    long fileSize = fileToUpload.length();
    // get last mod of this file.
    // The last mod is sent to the servlet as a header.
    long lastMod = fileToUpload.lastModified();
    String strLastMod = String.valueOf(lastMod);
    URL serverURL = new URL(webadminApplet.strServletURL);
    URLConnection serverCon = serverURL.openConnection();
    // a bunch of connection setup related things.
    serverCon.setDoInput(true);
    serverCon.setDoOutput(true);
    // Don't use a cached version of URL connection.
    serverCon.setUseCaches (false);
    serverCon.setDefaultUseCaches (false);
    // set headers and their values.
    serverCon.setRequestProperty("Content-Type",
    "application/octet-stream");
    serverCon.setRequestProperty("Content-Length",
    Long.toString(fileToUpload.length()));
    serverCon.setRequestProperty(FILENAME_HEADER, destDir +
    destFileName);
    serverCon.setRequestProperty(FILELASTMOD_HEADER, strLastMod);
    if (webadminApplet.DEBUG) System.out.println("Connection with
    FTP server established");
    // create file stream and write stream to write file data.
    FileInputStream fis = new FileInputStream(fileToUpload);
    OutputStream os = serverCon.getOutputStream();
    try
    // transfer the file in 4K chunks.
    byte[] buffer = new byte[4096];
    long byteCnt = 0;
    //long percent = 0;
    int newPercent = 0;
    int oldPercent = 0;
    while (true)
    int bytes = fis.read(buffer);
    byteCnt += bytes;
    //11-21-02 :
    //If itemID is greater than -1 this is an import file
    transfer
    //otherwise this is a header graphic file transfer.
    if (itemID > -1)
    newPercent = (int) ((double) byteCnt/ (double)
    fileSize * 100.0);
    int diff = newPercent - oldPercent;
    if (newPercent == 0 || diff >= 20)
    oldPercent = newPercent;
    jbInit.getImportTable().displayFileTransferStatus
    (itemID,
    newPercent);
    if (bytes < 0) break;
    os.write(buffer, 0, bytes);
    os.flush();
    if (webadminApplet.DEBUG) System.out.println("No of bytes
    sent: " + byteCnt);
    finally
    // close related streams.
    os.close();
    fis.close();
    if (webadminApplet.DEBUG) System.out.println("File
    Transmission complete");
    // find out what the servlet has got to say in response.
    BufferedReader reader = new BufferedReader(
    new
    InputStreamReader(serverCon.getInputStream()));
    try
    String line;
    while ((line = reader.readLine()) != null)
    if (webadminApplet.DEBUG) System.out.println(line);
    finally
    // close the reader stream from servlet.
    reader.close();
    } // end of the big try block.
    catch (Exception e)
    System.out.println("Exception during file transfer:\n" + e);
    e.printStackTrace();
    return("FTP failed. See Java Console for Errors.");
    } // end of catch block.
    return("File: " + fname + " successfully transferred.");
    } // end of method transferFile().
    } // end of class fileTransferClient
    Server side code:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.net.*;
    // This servlet class acts as an FTP server to enable transfer of
    files
    // from client side.
    public class FtpServerServlet extends HttpServlet
    String ftpDir = "D:\\pub\\FTP\\";
    private static final String FILENAME_HEADER = "fileName";
    private static final String FILELASTMOD_HEADER = "fileLastMod";
    public void doGet(HttpServletRequest req, HttpServletResponse resp)
    throws ServletException,
    IOException
    doPost(req, resp);
    public void doPost(HttpServletRequest req, HttpServletResponse
    resp)
    throws ServletException,
    IOException
    // ### for now enable overwrite by default.
    boolean overwrite = true;
    // get the fileName for this transmission.
    String fileName = req.getHeader(FILENAME_HEADER);
    // also get the last mod of this file.
    String strLastMod = req.getHeader(FILELASTMOD_HEADER);
    String message = "Filename: " + fileName + " saved
    successfully.";
    int status = HttpServletResponse.SC_OK;
    System.out.println("fileName from client: " + fileName);
    // if filename is not specified, complain.
    if (fileName == null)
    message = "Filename not specified";
    status = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
    else
    // open the file stream for the file about to be transferred.
    File uploadedFile = new File(fileName);
    // check if file already exists - and overwrite if necessary.
    if (uploadedFile.exists())
    if (overwrite)
    // delete the file.
    uploadedFile.delete();
    // ensure the directory is writable - and a new file may be
    created.
    if (!uploadedFile.createNewFile())
    message = "Unable to create file on server. FTP failed.";
    status = HttpServletResponse.SC_INTERNAL_SERVER_ERROR;
    else
    // get the necessary streams for file creation.
    FileOutputStream fos = new FileOutputStream(uploadedFile);
    InputStream is = req.getInputStream();
    try
    // create a buffer. 4K!
    byte[] buffer = new byte[4096];
    // read from input stream and write to file stream.
    int byteCnt = 0;
    while (true)
    int bytes = is.read(buffer);
    if (bytes < 0) break;
    byteCnt += bytes;
    // System.out.println(buffer);
    fos.write(buffer, 0, bytes);
    // flush the stream.
    fos.flush();
    } // end of try block.
    finally
    is.close();
    fos.close();
    // set last mod date for this file.
    uploadedFile.setLastModified((new
    Long(strLastMod)).longValue());
    } // end of finally block.
    } // end - the new file may be created on server.
    } // end - we have a valid filename.
    // set response headers.
    resp.setContentType("text/plain");
    resp.setStatus(status);
    if (status != HttpServletResponse.SC_OK)
    getServletContext().log("ERROR: " + message);
    // get output stream.
    PrintWriter out = resp.getWriter();
    out.println(message);
    } // end of doPost().
    } // end of class FtpServerServlet

    OK - the problem you describe is definitely what's giving you grief.
    The workaround is to use a socket connection and send your own request headers, with the content length filled in. You may have to multi-part mime encode the stream on its way out as well (I'm not about that...).
    You can use the following:
    http://porsche.cis.udel.edu:8080/cis479/lectures/slides-04/slide-02.html
    on your server to get a feel for the format that the request headers need to take.
    - Kevin
    I get the out of Memory Error on the client side. I
    was told that this might be a bug in the URLConnection
    class implementation that basically it wont know the
    content length until all the data has been written to
    the output stream, so it uses an in memory buffer to
    store the data which basically causes memory issues..
    do you think there might be a workaround of any kind..
    or maybe a way that the buffer might be flushed after
    a certain size of file has been uploaded.. ?? do you
    have any ideas?

  • E71 keeps giving out of memory error; I can't find...

    My Nokia E71 (it's black so it may be an E71x, I guess) keeps giving me out of memory errors. I use my phone for nothing but voice calls, text messages, and emails. I have cleared all call logs, deleted all emails except 5 (they have no attachments) and cleared deleted emails, and deleted all text messages. I went into file manager and made sure there are no images, videos, etc. on the phone. I set up options to use memory card for emails. I've turned the phone off, waited 15 or 20 seconds, and turned it back on.
    I did all this a couple weeks ago. Ever since then. every couple days I get these out of memory errors, and the phone memory shows me 119 MB used and something like 300K free. I'm at the point where every few emails that come in, I have to delete all emails, erase all text messages, etc. or the phone is just too low on memory to operate.
    What else can I try? I don't have any additional applications installed. I've even tried to delete built-in apps such as RealPlayer but it didn't seem like that was possible.
    This is getting really annoying. Please help!

    @EricHarmon
    Although all user data would be deleted, have you tried resetting device to "Out of box" state by keying in *#7370# followed by 12345 (default Nokia lock code unless altered by user)?
    Happy to have helped forum with a Support Ratio = 42.5

  • Out of memory error - JS Runtime: How many users can one connect?

    Not talking video here.  Talking interactive apps, like chat.  Ours crashes at about 500 connected users.  When I report this I'm told "make sure you're not creating too many objects serverside" or "increase the JSRuntimeSize setting in your application.xml file to the max".
    Have now done both of those things but still get this out of memory error.  Let's say I optomized my app and got 100% more connection capacity.  That would be 1,000 connected users - still nowhere near enough.
    Are my dreams of 6,000 or 10,000 connected users enjoying all of the fruits of the FMS interactivity pipe dreams?  Is it not meant for sessions of that size?  Where does one find documentation or advice or application assistance on this issue?
    How do large social media applications connect so many people concurrently.
    Thoughts appreciated.
    Thanks

    Yes.  I'm using the max.
    <RuntimeSize>51200</RuntimeSize>
    See:
    http://help.adobe.com/en_US/FlashMediaServer/3.5_AdminGuide/WS5b3ccc516d4fbf351e63e3d119f2 926bcf-7ff0.html#WS5b3ccc516d4fbf351e63e3d119f2926bcf-7ed2
    Don't think 100MB or 200MB would be valid settings.

  • Indesign cs5.5 out of memory error

    Hi,
    I am having constant problems with out of memory errors in indesign cs5.5 (version 7.5.3).  I am on a mac. Everything is up to date, I have preflight off, my display performance is on typical view and have tried restarted my computer multiple times.  I do not have any other programs open and the document I have open is 3 pages (8.5x11) with little content and a couple links to small images.  I do not know what to do!  This is affecting my job and my performance!! Please help!!!  Thank you!

    close the application
    Rename the preferences from the following location
    /Users/[User Name]/Library/Preferences/Adobe InDesign/Version #
    /Users/[User Name]/Library/Caches/Adobe InDesign/Version [#]
    then open a new document and then open the document you are facing an issue with it should clear the memory issue temporally
    Alternate :
    copy and paste the content in a new document and check if the 1st option does not work
    PS : changing the folder name would reset the preferences
    refer to KB : InDesign preferences and support file locations

  • Out of Memory Errors when Exporting Slideshows

    Hi -
    I've been using LR for sometime now. Today, for the first time ever, I attempted to export a slideshow as a .pdf file, 90% quality setting, 48 slides total. LR created a 41MB file. However, when I played it back, there were many slides which only showed an empty frame with the message "out of memory error" upside down in the lower left corner of the frame. The same slides displayed the message each time I played it, so I'm sure the problem stemmed from creating the file, not showing it.
    I have a core 2 duo machine with 4GB Ram and no other applications running at the time I exported the slideshow.
    Any thoughts on this? BTW, I'm running version 1.2
    Thanks!
    E-

    Try restarting and reexporting. OOM errors have little to do with how much memory you have or how much is available.

Maybe you are looking for

  • Can't Send Mail with Yahoo POP

    Using mail program off of Panther and can recieve mail but can't send it. The error message I get is: "This message could not be delivered and will remain in your Outbox until it can be delivered. The sender address (my email address) was rejected by

  • Force resolution for external monitor

    I have a NEC MultiSync LCD 2690WUXi which supports a resolution of 1920 x 1200 pixels. I have it connected to my MBP i7 (early 2010) via DVI -> Mini-DV. However, the monitor preference pane only shows a max. resolution of 720p or 1024 x 576 pixels: T

  • How to add a Image on Another Image in Photoshop?

    Hi I am totally New to Photoshop I want to add Some Image on Another Image.How to do this? I am using Photoshop first time... Thanks

  • JFileChooser strange registry error

    I am testing a java application on windows 7 and just saw a very strange error pop up after trying to use a JFileChooser: An error was detected in the windows registry. Required windows folders were missing. Googling this did not turn up anything obv

  • Oracle9i form

    Hi, I try to use oracle9iform together with the oracle9idb on the same win2000 machine. I confured that net service of both the 9idb and 9ids in the same way so that the 9ids (9iform) can be connected to the 9idb successfully. The 9iform works OK for