There are usually two causes of this problem: 1) not enough memory 2) infinite loop, usually caused by JSP-A including JSP-B including JSP-A etc etc.
Joined: Feb 09, 2005
Hello David thank you for the reply. Is there any way to get over it? Can you be a little more specific? Thank you for the info. In fact its an applet-servlet comm appl that i am running. The servlet creates the object and is send to the applet where it is displayed. The applet then creates an object and is sent back to servlet for updating the database. So its objects being sent back and forth.
Again if the object created at the applet is set to null ..ie. sub s = new sub(id,add,zip) ; ....... ......... s = null; Is object s a candidate for garbage collection? What i mean is, if i no longer want the object s , is there any way to completely(explicitly) remove it from the memory?
Does the user really need all that data in the applet, at once? If not, I'd consider putting a LIMIT or ROWNUM clause in your query to cut down the number of rows sent to the applet. Let the user query again for the next block of rows as s/he needs them.
If you do really need to send all of that data at once, then you should try increasing the heap size in the JVM. Google on -Xms and -Xmx for more information. If you're running Tomcat on windows and you've installed the "start menu" items, you can alter the memory settings by going to Start -> Programs -> Apache Tomcat -> Configure Tomcat -> click on the Java or Memory tab. There are fields for the initial and maximum memory settings.
You'll then have to deal with streaming all of that data over the network and then your user will have to deal with all of that data within the JVM under which the applet is running. If it's blowing up the server's JVM it'll probably cause you headaches on the client's JVM as well.
Hello Ben Thanks so much for that info. The client will be downloading a vector containing around 300 records(objects)- worst case . I am using vector so that the client can scroll through the records (by cliking next or previous buttons).As most of the clients are using win98, so using CachedRowSet may not work, i think.Any better idea?? As you mentioned, records can be limited to about 10 each. Shall also try increasing heap size in jvm. Using Apache2.0.52 - mod_jk2 - Tomcat 5.0.28 on win2k. Thanks rgds csb
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: OutOfMemoryError: PermGen space - pl help