in Java Runtime Environment Settings.
But still getting the same error. If i run from html i'm not getting the error. Only when i launch it from Jsp i'm getting this error. I'm using Tomcat 5.5
description The server encountered an internal error () that prevented it from fulfilling this request.
org.apache.jasper.JasperException: Java heap space
javax.servlet.ServletException: Java heap space
java.lang.OutOfMemoryError: Java heap space
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.27 logs.
Without seeing your code it will be impossible to tell what's causing this.
Probably 90% of the times that I've seen an OOME like this, it's due to something causing an infinite recursive loop.
Can you post the code to the JSP that you're hitting when this happens?
Vinoth Thirunavukarasu wrote:You can increase heap size for Tomcat.
It's always a good idea to read all the post in a thread before suggesting a solution.
In this case, you'll notice that the original poster already mentioned increasing heap size in his first post.
If it's big enough that one call uses up all the ram you have in a JVM with 512m allotted, then it's probably more than what you want to be loading into a JSP to pass to an applet. You might find that increasing the heap space further will stop the problem in Tomcat but I suspect that you're going to run into issues either with the network or in the client.
Have you considered restructuring your app to first load the applet and then have the applet make calls to the server to get chunks of XML data as it needs it, instead of trying to pass the whole thing to your applet right up front?
export JAVA_OPTS="-Xmx128000000 " in catalina.sh or .bat file In this way I had done.
We have already discussed about this webpage
I made that solution He haven't increased heap size for tomcat.
Vinoth Thirunavukarasu wrote:Just add
export JAVA_OPTS="-Xmx128000000 " in catalina.sh or .bat file
Again, how you do this depends on how you've installed Tomcat.
If it's been installed as a Windows service, your instructions won't work because the catalina wrapper files never get run.
What is the size of the xml you store in your database column?
Usually BLOB datatype is used for storing such huge amount of Data. Instead of loading the entire data into a String i would suggest you to get an InputStream for this BLOB and use SAX parser to parse it.
I am sure not all details in the file needs to be passed to the client
Not sure if increasing the Heap size would help to a great extent, more the number of users more the memory usage and more the chances of OOME, you need to redesign somewhere.
If you can give some details of what you are trying to achieve maybe somebody can throw some light on it.