glassfish
  1. glassfish
  2. GLASSFISH-3767

deploydir --force doesn't clean up completely

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Won't Fix
    • Affects Version/s: 9.1pe
    • Fix Version/s: 9.1peur1
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

    • Issuezilla Id:
      3,767

      Description

      this is related to http://www.netbeans.org/issues/show_bug.cgi?id=118164... but
      removes NB from the picture.

      What you need.

      0. A windows box.
      1. GF V2 b58g configured to execute under JDK 6 – very important
      2. JDK 6 probably needs to be your default jdk....

      here are the steps.

      1. start your 58g build (developer profile) domain
      1.5 make sure you do not have a web app named web deployed in this domain.
      2. unjar the attached file.. in a directory...c:\testroot or some-such
      3. cd c:\testroot\NetBeansProjects\WebApplication1
      4. asant demo-bug -Dj2ee.platform.classpath=<GFinstalldir>\lib\javaee.jar

      You will see a build failure when one of the <get> tasks fires. [look inside the
      build.xml too see what demo-bug does... basically simulates the steps reported
      in the nb issue using as ant tasks

      1. NewServlet.java
        6 kB
        jluehe
      2. NewServlet.java
        6 kB
        jluehe
      3. NewServlet.java
        4 kB
        jluehe
      4. NewServlet.java.diffs
        2 kB
        jluehe
      5. server.log
        19 kB
        vince kraemer
      6. server.log
        25 kB
        vince kraemer
      7. server.log
        135 kB
        vince kraemer
      8. ServerLog.txt
        3 kB
        cwebster

        Activity

        Hide
        jluehe added a comment -

        Vince,

        I'm attaching a last (and hopefully final) version of NewServlet.java,
        which differs from the previous version as follows:

        diff -u ~/NewServlet.java .
        — /home/luehe/NewServlet.java Tue Oct 30 09:15:22 2007
        +++ ./NewServlet.java Tue Oct 30 09:10:57 2007
        @@ -105,7 +105,9 @@
        BufferedReader r = null;
        ArrayList<String> names = new ArrayList<String>();
        try {

        • in = url.openStream();
          + URLConnection uc = u.openConnection();
          + uc.setUseCaches(false);
          + in = uc.getInputStream();
          r = new BufferedReader(new InputStreamReader(
          in, "utf-8"));
          int lc = 1;

        This is the same fix I had recommended in Bugster's 6587593 for the runtime's
        sun.misc.Service, but java.util.ServiceLoader (from which the original
        url.openStream() was copied) seems to have the same issue.

        Can you please ask the Netbeans forum user to use this version of the
        servlet? He/she seems to be the only one who can reproduce the issue
        reliably.

        Thanks,

        Jan

        Show
        jluehe added a comment - Vince, I'm attaching a last (and hopefully final) version of NewServlet.java, which differs from the previous version as follows: diff -u ~/NewServlet.java . — /home/luehe/NewServlet.java Tue Oct 30 09:15:22 2007 +++ ./NewServlet.java Tue Oct 30 09:10:57 2007 @@ -105,7 +105,9 @@ BufferedReader r = null; ArrayList<String> names = new ArrayList<String>(); try { in = url.openStream(); + URLConnection uc = u.openConnection(); + uc.setUseCaches(false); + in = uc.getInputStream(); r = new BufferedReader(new InputStreamReader( in, "utf-8")); int lc = 1; This is the same fix I had recommended in Bugster's 6587593 for the runtime's sun.misc.Service, but java.util.ServiceLoader (from which the original url.openStream() was copied) seems to have the same issue. Can you please ask the Netbeans forum user to use this version of the servlet? He/she seems to be the only one who can reproduce the issue reliably. Thanks, Jan
        Hide
        jluehe added a comment -

        Created an attachment (id=1240)
        New version of NewServlet.java that avoids the use of URL.openStream()

        Show
        jluehe added a comment - Created an attachment (id=1240) New version of NewServlet.java that avoids the use of URL.openStream()
        Hide
        vince kraemer added a comment -

        the newest NewServlet.java is effective for me. I have asked Chris to try it
        out in his context.

        Show
        vince kraemer added a comment - the newest NewServlet.java is effective for me. I have asked Chris to try it out in his context.
        Hide
        jluehe added a comment -

        Christopher Webster has confirmed that the latest NewServlet.java is also
        working for him.

        To summarize, the root cause of the problem lies in the JDK's
        java.util.ServiceLoader: Instead of acquiring an InputStream from a URL like this:

        InputStream in = url.openStream();

        it should acquire it like this:

        URLConnection uc = url.openConnection();
        uc.setUseCaches(false);
        InputStream in = uc.getInputStream();

        I'm downgrading this IssueTracker issue to a P4. The related Bugster issue
        (6587593) already is a P2.

        Thanks,

        Jan

        Show
        jluehe added a comment - Christopher Webster has confirmed that the latest NewServlet.java is also working for him. To summarize, the root cause of the problem lies in the JDK's java.util.ServiceLoader: Instead of acquiring an InputStream from a URL like this: InputStream in = url.openStream(); it should acquire it like this: URLConnection uc = url.openConnection(); uc.setUseCaches(false); InputStream in = uc.getInputStream(); I'm downgrading this IssueTracker issue to a P4. The related Bugster issue (6587593) already is a P2. Thanks, Jan
        Hide
        jluehe added a comment -

        Closing as WONTFIX, since there is nothing we can from GlassFish. The problem is
        rooted in the JDK, against which a P2 bug (6587593) has been filed.

        Show
        jluehe added a comment - Closing as WONTFIX, since there is nothing we can from GlassFish. The problem is rooted in the JDK, against which a P2 bug (6587593) has been filed.

          People

          • Assignee:
            jluehe
            Reporter:
            vince kraemer
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: