glassfish
  1. glassfish
  2. GLASSFISH-13262

Locked jar files in <domain>/applications after undeploy

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: v3.0.1
    • Fix Version/s: 3.1_b20
    • Component/s: web_container
    • Labels:
      None
    • Environment:

      Operating System: Windows XP
      Platform: PC

    • Issuezilla Id:
      13,262

      Description

      When a web application contains in WEB-INF/lib directory jar files which
      register ServletContainerInitializer, those jars are not deleted from
      <domain>/application/<app> directory after undeploy. Moreover they are locked
      and can prevent successfull redeployment of the application.

      Steps to reproduce:

      • build attached sample project with maven
      • create new domain: asadmin create-domain test
      • start domain: asadmin start-domain test
      • deploy web application asadmin --port 4848 --host localhost --user admin
        deploy war\target\container-initializer-test-war.war
      • undeploy web application asadmin --port 4848 --host localhost --user admin
        undeploy container-initializer-test-war

      The file
      <domain>\application\container-initializer-test-war\WEB-INF\lib\container-initializer-test-lib-1.0.0-SNAPSHOT.jar
      should be locked and cannot be deleted until the domain is stopped.

        Activity

        Hide
        titmus added a comment -

        You need to add GlassFish repository to main pom.xml (I use Nexus proxy, so
        didn't notice it was missing).

        <repository>
        <id>glassfish</id>
        <name>Java.net Repository for Glassfish</name>
        <url>http://download.java.net/maven/glassfish/</url>
        </repository>

        Show
        titmus added a comment - You need to add GlassFish repository to main pom.xml (I use Nexus proxy, so didn't notice it was missing). <repository> <id>glassfish</id> <name>Java.net Repository for Glassfish</name> <url> http://download.java.net/maven/glassfish/ </url> </repository>
        Hide
        Shing Wai Chan added a comment -

        After updating the pom.xml, I get another error:
        Missing:
        ----------
        1) test:container-initializer-test-lib:jar:1.0.0-SNAPSHOT

        Try downloading the file manually from the project website.

        Then, install it using the command:
        mvn install:install-file -DgroupId=test
        -DartifactId=container-initializer-test-lib -Dversion=1.0.0-SNAPSHOT
        -Dpackaging=jar -Dfile=/path/to/file

        Alternatively, if you host your own repository you can deploy the file there:
        mvn deploy:deploy-file -DgroupId=test
        -DartifactId=container-initializer-test-lib -Dversion=1.0.0-SNAPSHOT
        -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

        Path to dependency:
        1) test:container-initializer-test-war:war:1.0.0-SNAPSHOT
        2) test:container-initializer-test-lib:jar:1.0.0-SNAPSHOT

        ----------
        1 required artifact is missing.

        for artifact:
        test:container-initializer-test-war:war:1.0.0-SNAPSHOT

        from the specified remote repositories:
        glassfish (http://download.java.net/maven/glassfish/),
        central (http://repo1.maven.org/maven2)

        Can you attach a complete pom.xml?

        Show
        Shing Wai Chan added a comment - After updating the pom.xml, I get another error: Missing: ---------- 1) test:container-initializer-test-lib:jar:1.0.0-SNAPSHOT Try downloading the file manually from the project website. Then, install it using the command: mvn install:install-file -DgroupId=test -DartifactId=container-initializer-test-lib -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file Alternatively, if you host your own repository you can deploy the file there: mvn deploy:deploy-file -DgroupId=test -DartifactId=container-initializer-test-lib -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl= [url] -DrepositoryId= [id] Path to dependency: 1) test:container-initializer-test-war:war:1.0.0-SNAPSHOT 2) test:container-initializer-test-lib:jar:1.0.0-SNAPSHOT ---------- 1 required artifact is missing. for artifact: test:container-initializer-test-war:war:1.0.0-SNAPSHOT from the specified remote repositories: glassfish ( http://download.java.net/maven/glassfish/ ), central ( http://repo1.maven.org/maven2 ) Can you attach a complete pom.xml?
        Hide
        titmus added a comment -

        This is multimodule maven project. You should build the main project (in root
        directory) which will build all necessary modules.

        Show
        titmus added a comment - This is multimodule maven project. You should build the main project (in root directory) which will build all necessary modules.
        Hide
        Shing Wai Chan added a comment -

        I have verified that there is an issue in 3.0.1.
        It is working fine in 3.1. There is no locked jar in 3.1.
        Please upgrade to 3.1.

        Show
        Shing Wai Chan added a comment - I have verified that there is an issue in 3.0.1. It is working fine in 3.1. There is no locked jar in 3.1. Please upgrade to 3.1.
        Hide
        Shing Wai Chan added a comment -

        It has been verified that the issue is resolved in 3.1 b20.

        Show
        Shing Wai Chan added a comment - It has been verified that the issue is resolved in 3.1 b20.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: