Out of memory error - Help

Hi,
I have a big result set with records , it may be 100K records. But that result set has only one row.
I need to convert the records it into a single string. What I did was I got the result set in a arraylist, and after that I used StringBuffer. But I got Outof memory problem even for 10K records when appending in Stringbuffer..
So now I write them in a BufferedOutputStream. I want to know how to convert that stream back to a string. Not sure if what i am doing is correct.
Please let me know how it can be done.
Thanks

Records and rows are generally considered synonymous. You seem to have different meanings for the two terms. Would you like to explain them?
And if the String is going to be too large to hold in memory, it really doesn't matter how you construct it. So trying new ways of constructing it is going to be pointless.

Similar Messages

  • Out Of Memory Error Help Please

    Hey Folks
    Need some help here big time, i'm after creating a teaching aid, i'm trying to run it to complete a full systems test and i'm getting an error
    java.lang.OutOfMemoryError
    Any ideas
    Sorry now if i'm not in the right forum, is it my computer or what
    Thanks
    Ambrose

    If you don't have a lot of objects you may have a so called involuntary object retention problem. Somehow somewhere you keep references to objects you really have no further use for. But you hold on to them so the GC cannot recycle them.
    Another possible problem is that you do not call a so called explicit termination method although you should. Classes allocating native OS resources often have a special method that must be called before the object reference is released. Failure to do so will eventually deplete OS resources. One example is the dispose method of class Window (including subclasses derived from it).

  • Out of memory error.............plz help

    i m implementing an application containing 90 data fields.
    i m doing it using jdk1.4 and oracle 8i.
    problem is every time i try open any menu item from menubar the application gets stopped and nothing works and it shows out of memory error on console.
    is it due to 90 fields together in the database???
    or it means something else.
    plz help
    thanks in advance.

    thanks for reply
    in menubar i have many menuitems.
    when i click on menuitem1, say there are about 15 fields in which i fill data an insert it into database.
    in next menuitem i.e menuitem2, i have 25 fields in which i view / read 15 fields which were previously entered in menuitem1, and i add another 10 fields to the database.
    this way it happens in all other menuitems.
    i had to follow this way as i m making a project for a company having many departments.
    the code is too large to post over here, if i could get your e-mail address i can mail it to you.

  • Can anyone help with an out of memory error on CS2?

    Hello,
    I have been battling with an out of memory error on a dell laptop running 2gb of ram. I have had no prior issues with this laptop running CS2 until last week when I started getting the out of memory errors. I have seen several articles about this occuring on later versions of illustrator. Just prior to this issue appearing I had to delete and rebuild the main user profile on the computer due to it consistently logging into a temporary account.
    Once the new profile was established and all user documents and profile settings were transferred back into it, this problem started showing up. The error occurs when clicking on files listed as Illustrator files, and when opening the illustrator suite. Once I click on the out of memory error it still continues to load illustrator. The files are located on a server and not on the remote computer. I have tried to copy the files to the local hard drive with the same result when I try to open them. I also tried to change the extension to .pdf and got no further. I tried to open a file and recreate the work and all I got was the black outline of the fonts. none of the other artwork appeared. once rebuilt, when trying to save, It gives the out of memory error and does not save the file.
    Illustrator was installed on another dell laptop, same model, etc and works fine. no problem accessing network files. I just attempted to use Illustrator from the admin profile on the machine in question and it works fine and lightening fast. Just not from the new rebuilt profile. I have tried to uninstall and reinstall the software. it has not helped. could there be stray configuration settings that we transfered over to the new profile that should not have been?
    Any insights will be helpful.
    Thank You,
    Brad Yeutter

    Here are some steps that could help you:
    http://kb2.adobe.com/cps/320/320782.html
    http://kb2.adobe.com/cps/401/kb401053.html
    I hope this helps!

  • Weblogic 6.1 deployment out of memory error - please help

    I am getting an out of memory error when deploying an ear to a weblogic 6.1 server. I tried increasing heap size with the startup param. I also tried upgrading the jdk to 1.3.1_02. Here is how I am starting weblogic -
    "%JAVA_HOME%\bin\java" -hotspot -XX:MaxPermSize=256m -ms64m -mx64m -classpath "%CLASSPATH%" -Dweblogic.Domain=mydomain -Dweblogic.management.discover=false -Dweblogic.Name=myserver "-Dbea.home=C:\bea" -Dweblogic.management.password=%WLS_PW% -Dweblogic.ProductionModeEnabled=%STARTMODE% "-Djava.security.policy==C:\bea\wlserver6.1/lib/weblogic.policy" weblogic.Server
    I tried 64, 128, and 256 for the MaxPermSize param and the larger I make this number, the longer the deploy takes. I also tried lowering the session timeout to 1 min from 30. Now, when I deploy to the weblogic connection, jdev writes the war, then hangs. The rest of my desktop is slow but responsive, but I let jdev go for up to 1hr when running this deploy, and it never even starts the weblogic.deploy call. I end up killing it. This ear is not very big and is a simple servlet.
    Any thoughts?

    repost

  • HELP out of memory error message

    I'm using fcp 7 with 10.6 on a macbook pro.
    I just finished editing a 16 minute photo montage with about 100 stills. The pictues all of movement.
    I used some of the pictures in photoshop and AE.
    When I try and render I'm getting "out of memory" error. All of the footage is on my 1 tb external hard drive with
    450 gig not used. I've done more layered ones before with no issues.
    I tried to render indivdual clips and several clips. It worked fine for a while. The render files are about 7 gig
    so it's not much. I also tried to output the whole sequence instead of rendering and I'm still getting the
    "out of memory"  I need to output by tomorrow.
    Thanks,
    Michael

    I have done some Google searching, and FCP 7 is a 32-bit application.  So it is my guess that whatever you are currently doing has FCP 7 wanting to use more than 4 gigibytes of Virtual Address space, and it cannot grow expand any further because it is a 32-bit applications.
    This is my best guess as to why you are getting "out of memory" errors.
    I am not an FCP user so I cannot suggest any tricks to get this to work.  The only other suggestion is to get newer version of FCP which is 64-bit capable, but that might also require upgrading to a newer version of Mac OS X, so going down the upgrade road can get involved.

  • "out of memory error" will more memory help?

    I seem to be reading mixed reviews. I have an employee doing a really simple editing task with FCP 4.5 on an iMac we have that is 1.8 GHZ with 512 MB RAM. she keeps getting "Out of Memory" errors in FCP 4.5. So we're buying 2 GB RAM. Now I'm reading in other forums that the error may still continue. Any thoughts?

    Aside from the lack of ram - 512 MB is really the minimum for the OS - out of memory messages can also come about when using CMYK color space graphics in FCP. All images should be in the RGB color space.
    This usually doesn't appear as an issue unless you are using images that were intended for offset printing or someone inadvertently changed the color space from RGB.
    Good luck.
    x

  • Acrobat XI Pro "Out of Memory" Error.

    We just received a new Dell T7600 workstation (Win7, 64-bit, 64GB RAM, 8TB disk storage, and more processors than you can shake a stick at). We installed the Adobe CS6 Master Collection which had Acrobat Pro X. Each time we open a PDF of size greater than roughly 4MB, the program returns an "out of memory" error. After running updates, uninstalling and reinstalling (several times), I bought a copy of Acrobat XI Pro hoping this would solve the problem. Same problem still exists upon opening the larger PDFs. Our business depends on opening very large PDF files and we've paid for the Master Collection, so I'd rather not use an freeware PDF reader. Any help, thoughts, and/or suggestions are greatly appreciated.
    Regards,
    Chris

    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.

  • Adobe X Pro 10.1.10 Out of Memory error message

    Hello One, Hello All
    Since updating our Adobe X Pro machines to version update 10.1.10, we occasionally receive an "Out of Memory" error message, which depending on what we are doing, may force us to shutdown all Adobe windows and re-open Adobe, or simply click OK and continue working with the PDF document like nothing is wrong. It seems to have no rhyme or reason to when or why it occurs. I do not see any warnings or errors in the Windows Event Log. It happens with files we have created, and also happens with files received from internal and external sources through email. It is affecting our high end machines: Lenovo X Series and W Series laptops with Windows 8.1 3rd/4th gen i5 CPUs, 8+GB RAM, 128+GB SSD's. We have all system and Windows updates applied. We have Trend Micro and Malwarebytes real-time protection and system scans do not find any malware.
    I have found a few other recent threads on Adobe forum related to this error message but the responses are weak at best with no definitive fix. The system and user temp folders size are less than 100MB each so this cannot be the issue. When the error occurs I check task manager and system utilization, including memory, is well below 100%.
    We did not have this issue prior to version update 10.1.10.
    Really hoping Adobe can step in to help here and hoping boilerplate responses are not used.

    Hi wayne103,
    We released a new security update yesterday that is v10.1.11
    Please update to this version and check the performance.
    I have seen this error message occur while opening a 3rd party created pdf that has corrupted file structure.
    Please let me know if the issue occurs for some specific files or random
    Also let me know the PDF producer for these pdfs.
    Regards,
    Rave

  • Getting out of memory errors in Indesign 5.5. What can I do to fix it?

    Getting out of memory errors in Indesign 5.5. What can I do to fix it?

    Tell your dumb friend to pay you for a new phone as he damaged it. You cannot get help here for a phone that has been taken apart, as it is not user servicible. Your dumb friend also voided your warranty and, even if the warranty were expired Apple will never touch that phone.
    Time to get smarter friends.

  • JavaScript Out of Memory Error on Portal timeout.

    Hello All,
    I am using jsf and Inline navigation in all our portlets and when user leave the browser idle for portal timeout we have 2 problems. 1: Login portlet shows in that specific portlet. 2: we get a javascript alert saying out of memory at line 40. and the porltet shows error message as "Gateway was not able to access requested content. If the error persists, contact your portal Administrator."
    We are using Plumtree 5.0.4 Java version.
    any help is highly appreciated.
    Thanks
    A.J.

    Both are valid behaviors unfortunately.
    1) login portlet is showing up in specific portlet b/c inline navigation allows for you to create and load pages without affecting the overall portal.
    This happens when you use iframes (which behave in a similar fashion).
    - your only workaround is really to write some javascript function to "listen" to the portal login page getting loaded and then throwing the session into the parent browser (which is Portal). At least this is the only solution that I ever came up with when using Iframes.
    2) Don't know about out of memory error actually, but getting the "gatewy was not able to access requested content" is valid b/c the session died.
    - javascript errors require javascript solutions. Sorry I couldn't be more helpful than that.
    Maybe someone else will have better suggestions.
    The other suggestion is to use your app server to listen to the logout event and redirect appropriately to somewhere else, or have it do what you want it to do in situations as this.

  • 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

  • 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 - 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.

Maybe you are looking for