Geronimo
  1. Geronimo
  2. GERONIMO-1905

Confirm deploy/undeploy/redeploy for WARs with no configId

    Details

    • Type: Test Test
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.1
    • Component/s: deployment
    • Security Level: public (Regular issues)
    • Labels:
      None

      Description

      Make sure it all works for WAR with no geronimo-web.xml and also WAR with geronimo-web.xml with environment with no configId. Reports seem to indicate that it doesn't work right now.

        Issue Links

          Activity

          Hide
          Aaron Mulder added a comment -

          If you deploy a web app with no moduleId, you can redeploy it and the settings are migrated to the new version. However, the entry for the new version in config.xml is marked with load="false" so it is not started on the next boot.

          Show
          Aaron Mulder added a comment - If you deploy a web app with no moduleId, you can redeploy it and the settings are migrated to the new version. However, the entry for the new version in config.xml is marked with load="false" so it is not started on the next boot.
          Hide
          Aaron Mulder added a comment -

          Previous behavior fixed.

          Next problem: if you redeploy with a plan that has an environment with no module ID, the deploy tool calculates a module ID of "///" and dies.

          Show
          Aaron Mulder added a comment - Previous behavior fixed. Next problem: if you redeploy with a plan that has an environment with no module ID, the deploy tool calculates a module ID of "///" and dies.
          Hide
          Christopher M. Cardona added a comment -

          I experienced the same problem as Aaron's. Here is my geronimo-web.xml and the results of my test:

          --------------------------
          geronimo-web.xml:
          --------------------------

          <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1" xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1">
          <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1">
          <dep:dependencies>
          <dep:dependency>
          <dep:groupId>commons-modeler</dep:groupId>
          <dep:artifactId>commons-modeler</dep:artifactId>
          <dep:version>1.2-GERONIMO-SNAPSHOT</dep:version>
          <dep:type>jar</dep:type>
          </dep:dependency>
          </dep:dependencies>
          </dep:environment>
          <context-root>testwebapp1</context-root>
          </web-app>

          • With G Plan
          • With Environment
          • W/O moduleId

          -------------------
          1. Deploy: OK
          -------------------

          C:\G1.1\assemblies\j2ee-tomcat-server\target\geronimo-1.1-SNAPSHOT\bin\
          test\WebApp>java -jar ../../deployer.jar --user system --pas
          sword manager deploy webapp.war geronimo-web.xml
          Deployed default/testwebapp1/1147761067251/war @
          http://CCARDONA:8080/testwebapp1

          -----------------------------------------------------------
          2. Redeploy no plan, no module ID: Not OK
          -----------------------------------------------------------

          C:\G1.1\assemblies\j2ee-tomcat-server\target\geronimo-1.1-SNAPSHOT\bin\
          test\WebApp>java -jar ../../deployer.jar --user system --pas
          sword manager redeploy webapp.war
          No ModuleID or TargetModuleID provided. Attempting to guess based
          on the content of the archive.
          Unable to locate Geronimo deployment plan in archive. Calculating
          default ModuleID from archive name.
          Attempting to use ModuleID 'default/webappwplan//'
          Error: default/webappwplan// does not appear to be a the name of a
          module available on the selected server. Perhaps it has already been
          stopped or undeployed? If you're trying to specify a
          TargetModuleID, use the syntax TargetName|ModuleName instead. If
          you're not sure what's running, try the list-modules command.

          -------------------------------------------------------------
          2. Redeploy no plan, with module ID: Not OK
          -------------------------------------------------------------

          • Note: Resulted to webapp being deployed but not started

          C:\G1.1\assemblies\j2ee-tomcat-server\target\geronimo-1.1-SNAPSHOT\bin\
          test\WebApp>java -jar ../../deployer.jar --user system --pas
          sword manager redeploy webapp.war default/testwebapp1/1147761067251/war
          Redeployed default/WebApp_ID1/1147761311042/war
          Error: Operation failed: reload of
          default/testwebapp1/1147761067251/war failed

          default/testwebapp1/1147761311042/war

          ---------------------------------------------------------------
          2. Redeploy with plan, with module ID: Not OK
          ---------------------------------------------------------------

          C:\G1.1\assemblies\j2ee-tomcat-server\target\geronimo-1.1-SNAPSHOT\bin\
          test\WebApp>java -jar ../../deployer.jar --user system --pas
          sword manager redeploy webapp.war geronimo-web.xml default/testwebapp1/1
          147761067251/war
          Error: Operation failed: artifactId is null

          ----------------------
          3. Undeploy: OK
          ----------------------

          C:\G1.1\assemblies\j2ee-tomcat-server\target\geronimo-1.1-SNAPSHOT\bin\
          test\WebApp>java -jar ../../deployer.jar --user system --pas
          sword manager undeploy default/testwebapp1/1147761067251/war
          Module default/testwebapp1/1147761067251/war unloaded.
          Module default/testwebapp1/1147761067251/war uninstalled.

          Undeployed default/testwebapp1/1147761067251/war

          Show
          Christopher M. Cardona added a comment - I experienced the same problem as Aaron's. Here is my geronimo-web.xml and the results of my test: -------------------------- geronimo-web.xml: -------------------------- <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1" xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.1"> <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.1"> <dep:dependencies> <dep:dependency> <dep:groupId>commons-modeler</dep:groupId> <dep:artifactId>commons-modeler</dep:artifactId> <dep:version>1.2-GERONIMO-SNAPSHOT</dep:version> <dep:type>jar</dep:type> </dep:dependency> </dep:dependencies> </dep:environment> <context-root>testwebapp1</context-root> </web-app> With G Plan With Environment W/O moduleId ------------------- 1. Deploy: OK ------------------- C:\G1.1\assemblies\j2ee-tomcat-server\target\geronimo-1.1-SNAPSHOT\bin\ test\WebApp>java -jar ../../deployer.jar --user system --pas sword manager deploy webapp.war geronimo-web.xml Deployed default/testwebapp1/1147761067251/war @ http://CCARDONA:8080/testwebapp1 ----------------------------------------------------------- 2. Redeploy no plan, no module ID: Not OK ----------------------------------------------------------- C:\G1.1\assemblies\j2ee-tomcat-server\target\geronimo-1.1-SNAPSHOT\bin\ test\WebApp>java -jar ../../deployer.jar --user system --pas sword manager redeploy webapp.war No ModuleID or TargetModuleID provided. Attempting to guess based on the content of the archive. Unable to locate Geronimo deployment plan in archive. Calculating default ModuleID from archive name. Attempting to use ModuleID 'default/webappwplan//' Error: default/webappwplan// does not appear to be a the name of a module available on the selected server. Perhaps it has already been stopped or undeployed? If you're trying to specify a TargetModuleID, use the syntax TargetName|ModuleName instead. If you're not sure what's running, try the list-modules command. ------------------------------------------------------------- 2. Redeploy no plan, with module ID: Not OK ------------------------------------------------------------- Note: Resulted to webapp being deployed but not started C:\G1.1\assemblies\j2ee-tomcat-server\target\geronimo-1.1-SNAPSHOT\bin\ test\WebApp>java -jar ../../deployer.jar --user system --pas sword manager redeploy webapp.war default/testwebapp1/1147761067251/war Redeployed default/WebApp_ID1/1147761311042/war Error: Operation failed: reload of default/testwebapp1/1147761067251/war failed default/testwebapp1/1147761311042/war --------------------------------------------------------------- 2. Redeploy with plan, with module ID: Not OK --------------------------------------------------------------- C:\G1.1\assemblies\j2ee-tomcat-server\target\geronimo-1.1-SNAPSHOT\bin\ test\WebApp>java -jar ../../deployer.jar --user system --pas sword manager redeploy webapp.war geronimo-web.xml default/testwebapp1/1 147761067251/war Error: Operation failed: artifactId is null ---------------------- 3. Undeploy: OK ---------------------- C:\G1.1\assemblies\j2ee-tomcat-server\target\geronimo-1.1-SNAPSHOT\bin\ test\WebApp>java -jar ../../deployer.jar --user system --pas sword manager undeploy default/testwebapp1/1147761067251/war Module default/testwebapp1/1147761067251/war unloaded. Module default/testwebapp1/1147761067251/war uninstalled. Undeployed default/testwebapp1/1147761067251/war
          Hide
          Christopher M. Cardona added a comment -

          I forgot this...

          -------------------------------------------------------------
          2. Redeploy with plan, no module ID: Not OK
          -------------------------------------------------------------

          C:\G1.1\assemblies\j2ee-tomcat-server\target\geronimo-1.1-SNAPSHOT\bin\
          test\WebApp>java -jar ../../deployer.jar --user system --pas
          sword manager redeploy webapp.war geronimo-web.xml
          No ModuleID or TargetModuleID provided. Attempting to guess based
          on the content of the plan.
          Attempting to use ModuleID '///'
          Exception in thread "main" java.lang.NullPointerException: artifactId is null
          at org.apache.geronimo.kernel.repository.Artifact.<init>(Artifact.java:3
          9)
          at org.apache.geronimo.kernel.repository.Artifact.<init>(Artifact.java:3
          5)
          at org.apache.geronimo.kernel.repository.Artifact.create(Artifact.java:5
          6)
          at org.apache.geronimo.deployment.plugin.ConfigIDExtractor.identifyTarge
          tModuleIDs(ConfigIDExtractor.java:176)
          at org.apache.geronimo.deployment.cli.CommandRedeploy.execute(CommandRed
          eploy.java:130)
          at org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java
          :158)
          at org.apache.geronimo.deployment.cli.DeployTool.main(DeployTool.java:31
          2)

          Show
          Christopher M. Cardona added a comment - I forgot this... ------------------------------------------------------------- 2. Redeploy with plan, no module ID: Not OK ------------------------------------------------------------- C:\G1.1\assemblies\j2ee-tomcat-server\target\geronimo-1.1-SNAPSHOT\bin\ test\WebApp>java -jar ../../deployer.jar --user system --pas sword manager redeploy webapp.war geronimo-web.xml No ModuleID or TargetModuleID provided. Attempting to guess based on the content of the plan. Attempting to use ModuleID '///' Exception in thread "main" java.lang.NullPointerException: artifactId is null at org.apache.geronimo.kernel.repository.Artifact.<init>(Artifact.java:3 9) at org.apache.geronimo.kernel.repository.Artifact.<init>(Artifact.java:3 5) at org.apache.geronimo.kernel.repository.Artifact.create(Artifact.java:5 6) at org.apache.geronimo.deployment.plugin.ConfigIDExtractor.identifyTarge tModuleIDs(ConfigIDExtractor.java:176) at org.apache.geronimo.deployment.cli.CommandRedeploy.execute(CommandRed eploy.java:130) at org.apache.geronimo.deployment.cli.DeployTool.execute(DeployTool.java :158) at org.apache.geronimo.deployment.cli.DeployTool.main(DeployTool.java:31 2)

            People

            • Assignee:
              Aaron Mulder
              Reporter:
              Aaron Mulder
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development