glassfish
  1. glassfish
  2. GLASSFISH-18507

Exceptions aren't logged during deployment in some cases.

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.1.2_b23
    • Fix Version/s: None
    • Component/s: deployment
    • Labels:
      None

      Description

      When there are problems deploying an ear, there are times when the exception is not otherwise logged, and com.sun.enterprise.v3.server.ApplicationLifecycle is not logging the exception either.

      I propose this change (line 457 and 476 in 3.1.2 b23:
      pass exception into report object instead of null

      public ApplicationInfo deploy(Collection<Sniffer> sniffers, final ExtendedDeploymentContext context) {
      ...
      if (loadOnCurrentInstance(context)) {
      appInfo.setLibraries(commandParams.libraries());
      try

      { appInfo.load(context, tracker); appInfo.start(context, tracker); }

      catch(Throwable loadException)

      { report.failure(logger, "Exception while loading the app", loadException); //******** or this could be logged at something like FINE level report.setFailureCause(loadException); tracker.actOn(logger); return null; }

      }
      return appInfo;
      } finally

      { context.postDeployClean(false /* not final clean-up yet */); Thread.currentThread().setContextClassLoader(currentCL); }

      } catch (Throwable e) {
      report.failure(logger, localStrings.getLocalString("error.deploying.app", "Exception while deploying the app [

      {0}

      ]", appName), e); //******** or this could be logged at something like FINE level
      report.setFailureCause(e);
      logger.log(Level.SEVERE, e.getMessage(), e);
      tracker.actOn(logger);
      return null;
      ...

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Hong Zhang
            Reporter:
            Jim Cullison
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: