Article ID: 250, created on Oct 6, 2008, last review on Apr 25, 2014

  • Applies to:
  • Plesk

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.
NOTE:  On RedHat-like operation systems tomcat version 5.5 uses configuration file /etc/sysconfig/tomcat55 instead of /etc/tomcat4/tomcat4.conf or /etc/tomcat55/tomcat55.conf, it should be modified.

a914db3fdc7a53ddcfd1b2db8f5a1b9c 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF