glassfish
  1. glassfish
  2. GLASSFISH-16500

Web container eats exceptions although deployment has not been successful

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.1.1_b04
    • Component/s: web_container
    • Labels:
      None

      Description

      Look at this block of code in MapperListener which gets called when a new Web app is deployed or a servlet is registered. It does not rethrow the exception. Since it does not rethrow the exception, deployment backend thinks the application deployment is successful. Is there any justification for not wrapping the exception into a RuntimeException and throw it back?

      if( "Host".equals( type )) {
      try

      { registerHost(objectName); }

      catch (Exception e)

      { log.log(Level.WARNING, "Error registering Host " + objectName, e); }

      }

      if (j2eeType != null) {
      if (j2eeType.equals("WebModule")) {
      try

      { registerContext(objectName); }

      catch (Throwable t)

      { log.log(Level.WARNING, "Error registering Context " + objectName, t); }

      } else if (j2eeType.equals("Servlet")) {
      try

      { registerWrapper(objectName); }

      catch (Throwable t)

      { log.log(Level.WARNING, "Error registering Wrapper " + objectName, t); }

      }
      }
      } else if (notification.getType().equals
      (MBeanServerNotification.UNREGISTRATION_NOTIFICATION)) {
      String type=objectName.getKeyProperty("type");
      if( "Host".equals( type )) {
      try

      { unregisterHost(objectName); }

      catch (Exception e)

      { log.log(Level.WARNING, "Error unregistering Host " + objectName, e); }

      }

      if (j2eeType != null) {
      if (j2eeType.equals("WebModule")) {
      try

      { unregisterContext(objectName); }

      catch (Throwable t)

      { log.log(Level.WARNING, "Error unregistering webapp " + objectName, t); }

      } else if (Boolean.parseBoolean(objectName.getKeyProperty("osgi")) &&
      j2eeType.equals("Servlet")) {
      try

      { unregisterOSGiWrapper(objectName); }

      catch (Throwable t)

      { log.log(Level.WARNING, "Error unregistering osgi wrapper " + objectName, t); }

      }
      }

        Activity

        Hide
        Shing Wai Chan added a comment -

        fix in trunk

        Sending web-core/src/main/java/org/apache/catalina/connector/MapperListener.java
        Transmitting file data .
        Committed revision 46591.

        Show
        Shing Wai Chan added a comment - fix in trunk Sending web-core/src/main/java/org/apache/catalina/connector/MapperListener.java Transmitting file data . Committed revision 46591.
        Hide
        Shing Wai Chan added a comment -

        Why fix this issue in 3.1.1?
        Better error handling

        Which is the targeted build of 3.1.1 for this fix?
        Build 4.

        Do regression tests exist for this issue?
        No.

        Which tests should QA (re)run to verify the fix did not destabilize GlassFish?
        SQE webtier tests

        Show
        Shing Wai Chan added a comment - Why fix this issue in 3.1.1? Better error handling Which is the targeted build of 3.1.1 for this fix? Build 4. Do regression tests exist for this issue? No. Which tests should QA (re)run to verify the fix did not destabilize GlassFish? SQE webtier tests
        Hide
        scatari added a comment -

        Approved.

        Show
        scatari added a comment - Approved.
        Hide
        Shing Wai Chan added a comment -

        fix in 3.1.1, commit version 46635

        Show
        Shing Wai Chan added a comment - fix in 3.1.1, commit version 46635

          People

          • Assignee:
            Shing Wai Chan
            Reporter:
            Sanjeeb Sahoo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: