4 Replies Latest reply on Jun 10, 2004 5:17 PM by monocongo

    Exception at startup: nested throwable DeploymentException

    monocongo

      I'm having an exception come up when I start JBoss, the exception trace is listed below. This started happening after I copied a SAR file into my deployment directory. The SAR contains an MBean and a jboss-service.xml. I can't find anything about this using Google, maybe someone here can shed some light on this. Thanks in advance !


      -James



      14:58:41,058 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.2.3/server/default/deploy/UserManager.sar

      org.jboss.deployment.DeploymentException: create operation failed for package file:/C:/jboss-3.2.3/server/default/deploy/UserManager.sar; - nested throwable: (org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.reflect.UndeclaredThrowableException))
      at org.jboss.deployment.SARDeployer.create(SARDeployer.java:202)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
      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:324)
      at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)

      ....

      14:58:47,407 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean ope
      ration 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:
      [org.jboss.deployment.DeploymentInfo@9c6ddfd3 { url=file:/C:/jboss-3.2.3/server/default/deploy/UserManager.sar }
      deployer: org.jboss.deployment.SARDeployer@12a0f6c
      status: Deployment FAILED reason: create operation failed for package file:/C:/jboss-3.2.3/server/default/deploy/UserManager.sar; - nested throwable: (org.jboss.deployment.DeploymentException: - nested throwable: (java.lang.reflect.UndeclaredThrowableException))
      state: FAILED
      watch: file:/C:/jboss-3.2.3/server/default/deploy/UserManager.sar
      lastDeployed: 1086893921038
      lastModified: 1086893921028
      mbeans:
      ]MBeans waiting for classes:

      MBeans waiting for other MBeans:

        • 1. Re: Exception at startup: nested throwable DeploymentExcepti
          monocongo

          Something interesting I have noticed -- the exception doesn't occcur when the SAR file is not in the deployment directory. I can load the SAR into the deployment directory after JBoss has already started and everything goes well. So it seems that it is a problem with the SAR being present when JBoss is starting up -- if it is absent and added after startup then everything works as advertised, but if the SAR is already deployed then I get the exception.

          Does any of this make sense ? Is there a workaround ?


          -James

          • 2. Re: Exception at startup: nested throwable DeploymentExcepti

            Look into using "depends" in your jboss-service.xml. Your SAR is dependent on something that isn't fully started when JBoss is first started.

            • 3. Re: Exception at startup: nested throwable DeploymentExcepti
              monocongo

              I have been able to workaround this by changing to the PrefixDeploymentSorter and prefixing my SAR file name with "1000" -- now the services are sorted with those starting with digits being deployed later, when 1000UserManager.sar is deployed all other services have already been deployed.

              I modified the JBOSS/server/default/conf/jboss-service.xml entry for the URLComparator:

              
               <!--
               <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute>
               -->
               <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute>
              
              


              If there are better ways of going about this then please follow up this thread with pertinent info. Thanks in advance.


              -James

              • 4. Re: Exception at startup: nested throwable DeploymentExcepti
                monocongo

                I have tried using several depends in the jboss-service.xml of the SAR file but none have worked so far - is there a way to do something like depends=all ?

                -James