Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-1837

Sporatic OutOfMemoryErrors on bootup in a 64bit environment

XMLWordPrintable

      For some reason, JBOSS attempts to unzip every deployment (including XML files). The code is in DeploymentInfo (See below). In a 64bit environment, when trying to unzip an xml file (jboss-service.xml), the zip library is throwing an OutOfMemory error that bypasses the exception handling logic below. The logic attempts to catch Exceptions but Not errors. A work around is to catch Throwable but one questions the needs to unjar every file including non-zips on startup. This is a bug that should be fixed. This happens on startup with the 'all' deployment.

      public Manifest getManifest()
      {
      try
      {
      if (manifest == null)
      {
      File file = new File(localUrl.getFile());

      if (file.isDirectory())

      { FileInputStream fis = new FileInputStream(new File(file, "META-INF/MANIFEST.MF")); manifest = new Manifest(fis); fis.close(); }

      else // a jar
      manifest = new JarFile(file).getManifest();

      }

      return manifest;
      }
      // It is ok to barf at any time in the above, means no manifest
      catch (Exception ignored)

      { return null;}

      === Does Not catch OutOfMemoryError ====
      }

      Exception:

      10:53:39,841 INFO [Server] Starting General Purpose Architecture (GPA)...
      10:53:40,102 INFO [ServerInfo] Java version: 1.5.0_02,Sun Microsystems Inc.
      10:53:40,102 INFO [ServerInfo] Java VM: Java HotSpot(TM) 64-Bit Server VM 1.5.0_02-b09,Sun Microsystems Inc.
      10:53:40,103 INFO [ServerInfo] OS-System: Linux 2.6.10-1.770_FC3smp,amd64
      10:53:40,332 INFO [Server] Core system initialized
      In get manifest
      In get manifest:tmp5585jboss-service.xml:/export/jboss/myjboss/server/all/tmp/deploy/tmp5585jboss-service.xml
      java.lang.OutOfMemoryError
      at java.util.zip.ZipFile.open(Native Method)
      at java.util.zip.ZipFile.<init>(ZipFile.java:204)
      at java.util.jar.JarFile.<init>(JarFile.java:132)
      at java.util.jar.JarFile.<init>(JarFile.java:97)
      at org.jboss.deployment.DeploymentInfo.getManifest(DeploymentInfo.java:344)
      at org.jboss.deployment.MainDeployer.parseManifestLibraries(MainDeployer.java:905)
      at org.jboss.deployment.MainDeployer.init(MainDeployer.java:

          There are no Sub-Tasks for this issue.

              starksm64 Scott Stark (Inactive)
              thammoud_jira Tarek Hammoud (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m