Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4458

wicket-core-1.5.5.jar not closed when Application is undeployed from directory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5.5
    • 1.5.6, 6.0.0-beta2
    • wicket
    • None
    • java version "1.6.0_30"
      Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
      Java HotSpot(TM) Client VM (build 20.5-b03, mixed mode, sharing)

    Description

      How to reproduce:

      • Create a 1.5.5 quickstart
      • deploy it on the GlassFish server with directory deployment (I use NetBeans which is easy)
      • open the application in the browser
      • undeploy the application
      • try to execute the maven clean goal or try to delete the target dir

      Error in GlassFish log:
      Unable to delete file WEB-INF\lib\wicket-core-1.5.5.jar

      I first thought that this was a GlassFish issue such as:

      http://java.net/jira/browse/GLASSFISH-17339

      To eliminate that, I added glassfish\modules\war-util.jar to the project and wrote code to let GlassFish close all jar files:

      In the Application class:

      @Override
      public void onDestroy() {
      super.onDestroy();
      ClassLoader parentClassLoader = this.getClass().getClassLoader();
      ClassLoader classLoader;
      do{
      classLoader = parentClassLoader;
      if(classLoader instanceof WebappClassLoader)

      { WebappClassLoader glassFishLoader = (WebappClassLoader)classLoader; glassFishLoader.closeJARs(true); break; }

      parentClassLoader = classLoader.getParent();
      }while(parentClassLoader != classLoader && parentClassLoader != null);

      }

      but this did not fix the problem.

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              bht@actrix.gen.nz bernard
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: