Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

OutOfMemoryError

 
sheril she
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
i get this error frequently while executing the pages in IE.The files are located in a linux server with jdk1.3 and tomcat 3.2.2 as the webserver.could anyone help?
thanx in advance
Internal Servlet Error:
javax.servlet.ServletException
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
Root cause:
java.lang.OutOfMemoryError
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:110)
at java.util.zip.ZipFile.(ZipFile.java:125)
at sun.tools.java.ClassPath.init(ClassPath.java:97)
at sun.tools.java.ClassPath.(ClassPath.java:41)
at sun.tools.javac.BatchEnvironment.classPaths(BatchEnvironment.java:212)
at sun.tools.javac.BatchEnvironment.create(BatchEnvironment.java:147)
at sun.tools.javac.Main.compile(Main.java:456)
at org.apache.jasper.compiler.SunJavaCompiler.compile(SunJavaCompiler.java:158)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612)
at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146)
at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspServlet.java:258)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:268)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)
 
Dave Landers
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like Tomcat is running out of memory while compiling your jsp pages.
You have a couple of choices. The most obvious is to increase the heap available to the JVM by starting java with -Xmx, for example -Xmx256M to set the max heap to 256 Mb.
Another choice would be to configure Tomcat to compile the jsps in a separate process - this would be slower but only when jsps needed recompile. But it would keep the recompile from using up lots of server heap. I am unfamiliar with Tomcat, so I don't actually know if this configuration is possible.
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, it looks like the OOME occurs specifically when the JVM is trying to read a zip file (or possibly a java file) somewhere in your class path. It might be worthwhile to look at your classpath and see what zip files are listed in it. Are any of them particularly large? Are they all necessary? Often people just keep adding things to the classpath and forget about them - it may be time to clean up some things. Also, if you've go one very big file in the classpath, it may be advantageous to unzip it and maybe re-zip it as two or more smaller files. Of course it's probably easier to increase the JVM memory allocation as Dave suggests - but maybe not.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic