glassfish
  1. glassfish
  2. GLASSFISH-17417

Embedded Glassfish is hard-coded to print reporting output to stdout

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.2_b01
    • Fix Version/s: 3.1.2, 4.0
    • Component/s: embedded
    • Labels:
      None
    • Environment:

      Java 6u27

      Description

      Original forum thread: http://www.java.net/forum/topic/glassfish/glassfish/disabling-reporting-output-when-running-embedded-glassfish

      Starting with 3.1.1-b07, the embedded container always prints reporting output to stdout, which interferes with applications that print data to stdout to be consumed by other programs (e.g. in a pipeline). This is a regression from 3.1, where no such output was emitted.

      A test case is attached, with profiles for 3.1.1 (the final release), 3.1.1-b07 (the initial build exhibiting the issue), 3.1.1-b06 (the latest build not exhibiting the issue), and 3.1. Running 'mvn package' with the appropriate profile executes the test case. The expected output is a single line with "Hello!" during the execution of the exec:exec goal.

        Activity

        Hide
        Tom Mueller added a comment -

        The output is coming from the following line in DeployerImpl.java (line
        134):

        actionReport.writeReport(System.out);

        The reason that this started showing up in 3.1.1-b07 is probably due to revision 47307 in which the EJBContainerImpl was modified to use a different embedded API, specifically, the embedded API that uses DeployerImpl. So even though the output to System.out was there all along, it only started getting used with this revision.

        Show
        Tom Mueller added a comment - The output is coming from the following line in DeployerImpl.java (line 134): actionReport.writeReport(System.out); The reason that this started showing up in 3.1.1-b07 is probably due to revision 47307 in which the EJBContainerImpl was modified to use a different embedded API, specifically, the embedded API that uses DeployerImpl. So even though the output to System.out was there all along, it only started getting used with this revision.
        Hide
        scatari added a comment -

        Please review this for potential inclusion into 3.1.2.

        Show
        scatari added a comment - Please review this for potential inclusion into 3.1.2.
        Hide
        Bhavanishankar added a comment -

        Assigning to Sakshi

        Show
        Bhavanishankar added a comment - Assigning to Sakshi
        Hide
        atomicknight added a comment -

        Sorry for the extremely delayed feedback, but it looks like the fix committed as r51062 only partially resolves the issue. DeployerImpl contains another print statement in the #undeploy method (line 158 in trunk at r56366), which causes the same problem.

        Can this issue be re-opened? Thanks.

        Show
        atomicknight added a comment - Sorry for the extremely delayed feedback, but it looks like the fix committed as r51062 only partially resolves the issue. DeployerImpl contains another print statement in the #undeploy method (line 158 in trunk at r56366), which causes the same problem. Can this issue be re-opened? Thanks.

          People

          • Assignee:
            sakshi.jain
            Reporter:
            atomicknight
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: