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

Unisys support case: Excessive number of exceptions generated during JBoss startup

XMLWordPrintable

      ---Bill: Unisys is reporting a general problem with slow startup (several minutes for the default configuration) on their mainframe and have been looking for ways to improve startup time. There is strong reason to believe that at least some of the performance problem is due to the VM and the underlying OS. We have asked Unisys to benchmark the minimal configuration to establish a baseline startup time.

      The following support case was reported by Unisys. I confirmed the majority of their issues and have added inline comments below:

      We have noticed that excessive number of exceptions generated during JBoss startup impacts the startup time. This occurs both on our OS 2200 mainframe platform as well as Windows platform. In our analysis, we have discovered the following 4 issues. We have discussed these with Daryl Heinz and Bill DeCoste, who are here teaching JBoss Advanced class. We provided them with some materials.

      1) JBoss looking in wrong directories and/or wrong jar files during startup

      ---Bill: Thousands of ClassNotFoundExceptions are generated on the default startup in 4.0.2RC1 coming from multiple classes and packages. In several cases, the underlying classloader throws an exception, which is caught, the mthod returns a null, and the calling class generates a new ClassNotFoundException which is rethrown. This could be cleaned up. Also, in several cases, attempts are made on several classloaders in sequence until the class is found.

      The root cause is JBoss? use of unpacked archives in its deployment directories. The class loaders end up with an ambiguous association of names (classes and resources) to jar files with multiple names in different directories. The class loaders are exposed to the original jar file name in its original directory, and the deployed jar file name in its deployment directory. When a class loader is given an ambiguous name to resolve, a bad URL is created.

      When we changed JBoss to use packed archives for Tomcat, about 3% fewer exceptions are generated during JBoss startup. There are many unpacked archives used by JBoss, not just the Tomcat archives we changed.

      2) String property editor class not found exceptions

      ---Bill: The startup attempts to load org.jboss.util.propertyeditor.StringEditor, but there is no such class. I have been unable to find exactly what class is trying to load this non-existent class.

      We found that JBoss is causing a large number of class not found exceptions during startup looking for a String property editor. If we add a String property editor to JBoss? other property editors, the number of exceptions generated during startup drops by 4.5%.

      package org.jboss.util.propertyeditor;

      import java.beans.PropertyEditorSupport;

      public class StringEditor extends PropertyEditorSupport
      {
      public String getJavaInitializationString()
      {
      return "\"" + getValue() + "\"";
      }
      public void setAsText(String text)
      {
      setValue(text);
      }
      }

      3) Changes made to JBoss that reduces the number of exceptions generated during JBoss startup.

      We have attached the JBoss code modules modified in the following packages

      jmx\src\main\org\jboss\mx\server AbstractMBeanInvoker.java
      server\src\main\org\jboss\web AbstractWebContainer.java
      system\src\main\org\jboss\system ServiceConfigurator.java, server\ServerLoader.java

      4) JBoss uses wrong name for an archive. See attached files.

      File: badurl.log is a log file containing all the java.net.URLs created during JBoss startup that cause file not found and class not found exceptions. The numbered log message with ?should have used? in them, indicates that JBoss used the wrong name for an archive. The names of the archives are changed during JBoss deployment. The archive name is prepending with ?tmp? and a number. The lines after the numbered log message are the Java stack entries (who called who).

      File: url.jar contains the java.net.URL and java.net.Parts class files with the code we added to produce the badurl.log file. This jar file must be prepended to the bootclasspath (e.g., -Xbootclasspath/p. The badurl.log file is written to the current directory for JBoss startup.

        1. AbstractMBeanInvoker.java
          35 kB
        2. AbstractWebContainer.java
          26 kB
        3. build.xml
          113 kB
        4. build.xml
          72 kB
        5. CachedConnectionManager.java
          19 kB
        6. DeploymentInfo.java
          15 kB
        7. J2EEDeployedObject.java
          6 kB
        8. ServerConfig.java
          13 kB
        9. server-config.xml
          19 kB
        10. ServerLoader.java
          9 kB
        11. ServiceConfigurator.java
          25 kB
        12. StringEditor.java
          0.4 kB
        13. TomcatDeployer.java
          16 kB
        14. WrappedConnection.java
          19 kB

              dandread1@redhat.com Dimitrios Andreadis
              wdecoste1@redhat.com William Decoste (Inactive)
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: