Product:
Search Type:

Web Application fails with an error in the browser.

Article ID: 250 
Last Review: Oct,18 2005
APPLIES TO:
  • Plesk for Linux/Unix

RESOLUTION


(File: //home/builder/psa_700_rpm/psa/apache-modules/
mod_webapp_apache2/work/jakarta-tomcat-connectors-4.1.29-src/webapp/lib/pr_warp.c
Line: 398)
Communication interrupted
and there is an error in tomcat log file /var/log/tomcat4/catalina.out:
Compile failed; see the compiler error output for details.
............
java.lang.OutOfMemoryError

  1. This errorĀ  hides a real error very often. In order to see the real error there are two ways:
    1. Use the problem web application through standalone Tomcat. In order to do it:
      1. Put a web application to /var/tomcat4/webapps
      2. Restart tomcat /etc/init.d/tomcat4 restart
      3. Open page http://:8080/ 
      4. Now the error can be viewed in greater details
    2. Compile the problem page manually:

      /usr/java/j2sdk1.4.2_04/bin/javac_ -classpath
      /usr/java/j2sdk1.4.2_04/lib/tools.jar:/var/tomcat4/
      bin/bootstrap.jar:/var/cache/tomcat4/work/PSA/a
      -server.net/example/WEB-INF/classes:/var/tomca
      t4/shared/classes:/var/tomcat4/common/classes:
      /var/tomcat4/common/endorsed/jaxp_parser_impl
      .jar:/var/tomcat4/common/endorsed/xml-common
      s-apis.jar:/var/tomcat4/common/lib/commons-coll
      ections.jar:/var/tomcat4/common/lib/activation.jar
      :/var/tomcat4/common/lib/ant.jar:/var/tomcat4/com
      mon/lib/commons-logging-api.jar:/var/tomcat4/com
      mon/lib/commons-dbcp.jar:/var/tomcat4/common/li
      b/naming-resources.jar:/var/tomcat4/common/lib/c
      ommons-pool.jar:/var/tomcat4/common/lib/jasper-
      compiler.jar:/var/tomcat4/common/lib/jasper-runti
      me.jar:/var/tomcat4/common/lib/jdbc2_0-stdext.ja
      r:/var/tomcat4/common/lib/jndi.jar:/var/tomcat4/co
      mmon/lib/jta.jar:/var/tomcat4/common/lib/mailapi.j
      ar:/var/tomcat4/common/lib/naming-common.jar:/v
      ar/tomcat4/common/lib/naming-factory.jar:/var/tom
      cat4/common/lib/servlet.jar

      -sourcepath /var/tomcat4/work/PSA/a-server.net/example -encoding UTF8 -g
      /var/tomcat4/work/PSA///jsp/colors/_jsp.java

  2. In case java.lang.OutOfMemoryError is the real error, add this option to /etc/tomcat4/tomcat4.conf

    CATALINA_OPTS="-Xms97m -Xmx128m -Djava.awt.headless=true"

    This example sets the minimum total heap size to 97Mb and maximum to 128Mb. The default maximum size is 64MB, but for many server applications it makes sense to be much larger.

Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields