You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Vesa Varimo <ve...@jippii.com> on 2005/05/27 12:45:16 UTC

jspServlet runs out of memory while compiling some jsp files using fork=true

Hi,

I'm having OutOfMemory error while Tomcat tries to compile jsp files. The problem occures few times in day so it's quite hard to repeat.
Tomcat is configured to run javac in separate JVM with fork=true option. I tried to give more memory for ant using ANT_OPTS, but it didn't help.
I read source code for the jasper compiler and there are variables that configure how much memory is given to ant, but I'm not able to configure them
with jspServlet init parameters. 

How should I resolved this? Is the Jikes compiler a solution worth of trying?

Stacktrace included below. I have hundreds of jars in classpath... so I can't paste the whole compiler output.

BR,

Vesa Varimo
vesa.varimo@jippii.com

--------------------------------------------------------------------------------

2005-05-26 21:42:53 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.OutOfMemoryError

May 7, 2005 12:21:42 PM org.apache.jasper.compiler.Compiler generateClass
SEVERE: Javac exception
Compile failed; see the compiler error output for details.
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:944)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:764)
        at org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:379)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:472)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:451)
        at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
        at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)