Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-6754

profile service: the ManagedDeployment for an EAR or WAR that has failed to start, due to one or missing dependencies in jboss-web.xml, incorrectly reports a deployment state of STARTED

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Critical
    • TBD EAP 5
    • EAP_EWP 5.1.0
    • Profile Service
    • None
    • EAP 5.1.0

    • NEW

    Description

      I deploy a simple war foo.war, which defines a missing dep in jboss-web.xml, using DeploymentManager.distribute(). I then attempt to start the webapp using DeploymentManager.start(). This fails due to the missing dep, with the following error:

      java.lang.RuntimeException: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      DEPLOYMENTS MISSING DEPENDENCIES:
      Deployment "jboss.web.deployment:war=/missingdep4" is missing the following dependencies:
      Dependency "example:dependency=A" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'example:dependency=A' **")

      DEPLOYMENTS IN ERROR:
      Deployment "example:dependency=A" is in error due to the following reason(s): ** NOT FOUND Depends on 'example:dependency=A' **

      at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:312)
      at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.start(StreamingDeploymentTarget.java:189)
      at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.start(DeploymentProgressImpl.java:233)
      at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:89)
      at org.rhq.plugins.jbossas5.util.DeploymentUtils.run(DeploymentUtils.java:134)
      at org.rhq.plugins.jbossas5.util.DeploymentUtils.deployArchive(DeploymentUtils.java:116)
      at org.rhq.plugins.jbossas5.deploy.ManagedComponentDeployer.deploy(ManagedComponentDeployer.java:125)
      at org.rhq.plugins.jbossas5.helper.CreateChildResourceFacetDelegate.createContentBasedResource(CreateChildResourceFacetDelegate.java:130)
      at org.rhq.plugins.jbossas5.helper.CreateChildResourceFacetDelegate.createResource(CreateChildResourceFacetDelegate.java:61)
      at org.rhq.plugins.jbossas5.ApplicationServerComponent.createResource(ApplicationServerComponent.java:305)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:139)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:909)
      at java.lang.Thread.run(Thread.java:662)
      Caused by: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      DEPLOYMENTS MISSING DEPENDENCIES:
      Deployment "jboss.web.deployment:war=/missingdep4" is missing the following dependencies:
      Dependency "example:dependency=A" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'example:dependency=A' **")

      DEPLOYMENTS IN ERROR:
      Deployment "example:dependency=A" is in error due to the following reason(s): ** NOT FOUND Depends on 'example:dependency=A' **

      at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1008)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:954)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:870)
      at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.checkComplete(MainDeployerAdapter.java:128)
      at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.start(AbstractDeployHandler.java:326)
      at org.jboss.profileservice.management.upload.remoting.AbstractDeployHandler.invoke(AbstractDeployHandler.java:238)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:930)
      at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:791)
      at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:745)
      at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:548)
      at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:234)
      at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:216)
      at org.jboss.remoting.Client.invoke(Client.java:2034)
      at org.jboss.remoting.Client.invoke(Client.java:877)
      at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:304)
      at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.start(StreamingDeploymentTarget.java:189)
      at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.start(DeploymentProgressImpl.java:232)
      at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:89)
      at org.rhq.plugins.jbossas5.util.DeploymentUtils.run(DeploymentUtils.java:134)
      at org.rhq.plugins.jbossas5.util.DeploymentUtils.deployArchive(DeploymentUtils.java:116)
      at org.rhq.plugins.jbossas5.deploy.ManagedComponentDeployer.deploy(ManagedComponentDeployer.java:125)
      at org.rhq.plugins.jbossas5.helper.CreateChildResourceFacetDelegate.createContentBasedResource(CreateChildResourceFacetDelegate.java:129)
      at org.rhq.plugins.jbossas5.helper.CreateChildResourceFacetDelegate.createResource(CreateChildResourceFacetDelegate.java:61)
      at org.rhq.plugins.jbossas5.ApplicationServerComponent.createResource(ApplicationServerComponent.java:305)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      ... 1 more

      I then run call ManagementView.load() to pick up the new ManagedDeployment for foo.war. I then call ManagementView.getDeployment(fooWarDeploymentName) to get the ManagedDeployment and then call ManagedDeployment.getDeploymentState() to get its state. This incorrectly returns a state of STARTED. I assume the state should be either STOPPED or FAILED. I believe in AS 4.x, the MBean for a WAR in this this state would have a deployment state of INCOMPLETE.

      This is a pretty serious issue, because the RHQ/JON as5 plugin uses:

      boolean isAvailable = (ManagedDeployment.getDeploymentState() == STARTED);

      to determine an EAR or WAR's availability. So, due to this bug, the user would get a false UP in RHQ/JON for EARs or WARs that failed to start due to missing deps or possibly other reasons.

      Attachments

        Activity

          People

            rhn-support-loleary Larry O'Leary
            ips_jira Ian Springer (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: