1 Reply Latest reply on Oct 31, 2011 3:40 PM by John Sulik

    Change context root?

    John Sulik Newbie

      I currently have a JSP page called registration.jsp in bsm.war that I call using localhost/bsm/registration.jsp.

       

      I want to access it using localhost/jboss/bsm/registration.jsp instead.

       

      I tried configuring this from the maven side by changing <finalName>bsm</finalName> to <finalName>/jboss/bsm</finalName>.  This seemed to compile correctly but would not deploy automatically.

       

      Is this something that should be done from the JBoss configuration or should it be done within Maven?

       

      JBoss version jboss-as-7.0.0.Final

      Maven version 3.0.3

       

      Thanks.

        • 1. Re: Change context root?
          John Sulik Newbie

          When the deployment fails, I get the following in my JBoss logs:

           

          15:33:02,252 INFO  [org.jboss.as.server.deployment] (pool-1-thread-7) Content added at location /apps/sulikj/jboss/jboss-as-7.0.0.Final/standalone/data/content/2f/d57013a4d748b495844bf330f9109702314aa4/content

          15:33:02,255 ERROR [org.jboss.as.controller] (pool-1-thread-7) Operation ("deploy") failed - address: ([("deployment" => "jboss/bsm.war")]): java.util.NoSuchElementException: No child 'runtime-name' exists

                  at org.jboss.dmr.ModelValue.requireChild(ModelValue.java:362)

                  at org.jboss.dmr.ObjectModelValue.requireChild(ObjectModelValue.java:298)

                  at org.jboss.dmr.ModelNode.require(ModelNode.java:703)

                  at org.jboss.as.server.deployment.DeploymentDeployHandler.execute(DeploymentDeployHandler.java:65)

                  at org.jboss.as.controller.OperationContextImpl.executeStep(OperationContextImpl.java:351)

                  at org.jboss.as.controller.OperationContextImpl.doCompleteStep(OperationContextImpl.java:298)

                  at org.jboss.as.controller.OperationContextImpl.completeStep(OperationContextImpl.java:223)

                  at org.jboss.as.server.deployment.DeploymentAddHandler.execute(DeploymentAddHandler.java:181)

                  at org.jboss.as.controller.OperationContextImpl.executeStep(OperationContextImpl.java:351)

                  at org.jboss.as.controller.OperationContextImpl.doCompleteStep(OperationContextImpl.java:298)

                  at org.jboss.as.controller.OperationContextImpl.completeStep(OperationContextImpl.java:223)

                  at org.jboss.as.controller.CompositeOperationHandler.execute(CompositeOperationHandler.java:83)

                  at org.jboss.as.controller.OperationContextImpl.executeStep(OperationContextImpl.java:351)

                  at org.jboss.as.controller.OperationContextImpl.doCompleteStep(OperationContextImpl.java:298)

                  at org.jboss.as.controller.OperationContextImpl.completeStep(OperationContextImpl.java:223)

                  at org.jboss.as.controller.ModelControllerImpl$DefaultPrepareStepHandler.execute(ModelControllerImpl.java:350)

                  at org.jboss.as.controller.OperationContextImpl.executeStep(OperationContextImpl.java:351)

                  at org.jboss.as.controller.OperationContextImpl.doCompleteStep(OperationContextImpl.java:298)

                  at org.jboss.as.controller.OperationContextImpl.completeStep(OperationContextImpl.java:223)

                  at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:119)

                  at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doProcessRequest(ModelControllerClientOperationHandler.java:154)

                  at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$100(ModelControllerClientOperationHandler.java:85)

                  at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.call(ModelControllerClientOperationHandler.java:114)

                  at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.call(ModelControllerClientOperationHandler.java:112)

                  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_26]

                  at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_26]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]

                  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]

                  at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

           

          I haven't been able to find any documentation on the runtime-name element.  I've tried various locations within the pom.xml but can't seem to find the right spot.  Any thoughts?