6 Replies Latest reply on May 26, 2011 3:26 AM by Wolfgang Knauf

    Deployments Missing Dependencies

    Steve Friesen Newbie

      Hi,

       

      There are some similar posts with answers, but I'm still having issues. I am deploying a JSF app that has a bean with the following:

       

      @Resource (name="jdbc/fisdb_dev")

      private DataSource ds;

       

      I have created a datasource xml file in my server\default\deploy directory. Initially I created it through the admin console, but then updated the file directly. The file is named jdbc_fisdb_dev-ds.xml and the datasource connects to an Oracle database. I test this through the admin console and it works correctly. I have added the ojdbc14.jar to the server\default\lib directory.

       

      When I try to start the war file through the admin console, it fails with the following error. Any help understanding this is greatly appreciated.

       

      java.lang.RuntimeException: org.jboss.deployers.client.spi.IncompleteDeploymentException:
      Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      DEPLOYMENTS MISSING DEPENDENCIES:
      Deployment "jboss-switchboard:appName=sfRichFaces1,module=sfRichFaces1" is missing the following dependencies:
      Dependency "jboss.jca:name=internal/sfRichFaces1/sfRichFaces1/env/jdbc/fisdb_dev,service=DataSourceBinding"
      (should be in state "Installed", but is actually in state "** NOT FOUND
      Depends on 'jboss.jca:name=internal/sfRichFaces1/sfRichFaces1/env/jdbc/fisdb_dev,service=DataSourceBinding',
      whenRequired=MapControllerStateModel$ControllerStateWrapper@19f2abf{Installed},
      dependentState=MapControllerStateModel$ControllerStateWrapper@19f2abf{Installed} **")
      Deployment "jboss.web.deployment:war=/sfRichFaces1" is missing the following dependencies:
      Dependency "jboss-switchboard:appName=sfRichFaces1,module=sfRichFaces1"
      (should be in state "Installed", but is actually in state "Deploy")
      DEPLOYMENTS IN ERROR:
      Deployment "jboss.jca:name=internal/sfRichFaces1/sfRichFaces1/env/jdbc/fisdb_dev,service=DataSourceBinding"
      is in error due to the following reason(s): ** NOT FOUND Depends on
      'jboss.jca:name=internal/sfRichFaces1/sfRichFaces1/env/jdbc/fisdb_dev,service=DataSourceBinding',
      whenRequired=MapControllerStateModel$ControllerStateWrapper@19f2abf{Installed},
      dependentState=MapControllerStateModel$ControllerStateWrapper@19f2abf{Installed} **
      at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:320)
      at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.start(StreamingDeploymentTarget.java:197)
      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:155)
      at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.invokeOperation(AbstractManagedDeploymentComponent.java:162)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
      Caused by: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      DEPLOYMENTS MISSING DEPENDENCIES:
      Deployment "jboss-switchboard:appName=sfRichFaces1,module=sfRichFaces1" is missing the following dependencies:
      Dependency "jboss.jca:name=internal/sfRichFaces1/sfRichFaces1/env/jdbc/fisdb_dev,service=DataSourceBinding"
      (should be in state "Installed", but is actually in state "** NOT FOUND Depends on
      'jboss.jca:name=internal/sfRichFaces1/sfRichFaces1/env/jdbc/fisdb_dev,service=DataSourceBinding',
      whenRequired=MapControllerStateModel$ControllerStateWrapper@19f2abf{Installed},
      dependentState=MapControllerStateModel$ControllerStateWrapper@19f2abf{Installed} **")
      Deployment "jboss.web.deployment:war=/sfRichFaces1" is missing the following dependencies:
      Dependency "jboss-switchboard:appName=sfRichFaces1,module=sfRichFaces1" (should be in state "Installed", but is actually in state "Deploy")

      DEPLOYMENTS IN ERROR:
      Deployment "jboss.jca:name=internal/sfRichFaces1/sfRichFaces1/env/jdbc/fisdb_dev,service=DataSourceBinding"
      is in error due to the following reason(s): ** NOT FOUND Depends on
      'jboss.jca:name=internal/sfRichFaces1/sfRichFaces1/env/jdbc/fisdb_dev,service=DataSourceBinding',
      whenRequired=MapControllerStateModel$ControllerStateWrapper@19f2abf{Installed},
      dependentState=MapControllerStateModel$ControllerStateWrapper@19f2abf{Installed} **

      at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968)
      at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82)
      at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138)
      at org.jboss.profileservice.plugins.deploy.actions.DeploymentStartAction.doPrepare(DeploymentStartAction.java:104)
      at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:101)
      at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87)
      at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234)
      at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213)
      at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150)
      at org.jboss.profileservice.plugins.deploy.AbstractDeployHandler.startDeployments(AbstractDeployHandler.java:168)
      at org.jboss.profileservice.management.upload.remoting.DeployHandlerDelegate.startDeployments(DeployHandlerDelegate.java:74)
      at org.jboss.profileservice.management.upload.remoting.DeployHandler.invoke(DeployHandler.java:156)
      at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898)
      at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)
      at org.jboss.remoting.Client.invoke(Client.java:1961)
      at org.jboss.remoting.Client.invoke(Client.java:804)
      at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:312)
      ... 15 more

       

      Thanks in advance.

       

      -Steve

        • 1. Re: Deployments Missing Dependencies
          Wolfgang Knauf Master

          Hi,

           

          which JBoss version?

           

          Is your database bound to the global name "DefaultDS", or does it have a different name?

          If the name is different, I think your "@Resource" annotation should be:

           

          @Resource(mappedName="java:MyDS")

          private DataSource ds;

           

          As far as I know, the "name" attribut declares a JNDI name in the ENC, which could be used if you have to perform a lookup later - but in most cases you don't need it.

           

          Best regards

           

          Wolfgang

          • 2. Re: Deployments Missing Dependencies
            Steve Friesen Newbie

            Thanks for the reply Wolfgang.

             

            I am using JBoss 6.0.0.Final. I am porting code over from Netbeans using Glassfish where I specified the exact name of the JNDI created as a resource on the app server. I am unfamiliar with the ENC. I created a datasource that has the same name as the JNDI--see the image below (I've circled the datasource in red).  This is how I have the datasource set up in the jdbc_fisdb_dev-ds.xml file. The connection works using the admin console.

            ds.bmp

             

            <datasources>
                <local-tx-datasource>
                    <jndi-name>jdbc/fisdb_dev</jndi-name>
                    <rar-name>jboss-local-jdbc.rar</rar-name>
                    <use-java-context>true</use-java-context>
                    <connection-definition>javax.sql.DataSource</connection-definition>
                    <jmx-invoker-name>jboss:service=invoker,type=unified</jmx-invoker-name>
                    <min-pool-size>0</min-pool-size>
                    <max-pool-size>10</max-pool-size>
                    <blocking-timeout-millis>30000</blocking-timeout-millis>
                    <idle-timeout-minutes>30</idle-timeout-minutes>
                    <prefill>false</prefill>
                    <background-validation>false</background-validation>
                    <background-validation-millis>0</background-validation-millis>
                    <validate-on-match>true</validate-on-match>
                    <statistics-formatter>org.jboss.resource.statistic.pool.JBossDefaultSubPoolStatisticFormatter</statistics-formatter>
                    <isSameRM-override-value>false</isSameRM-override-value>
                    <allocation-retry>0</allocation-retry>
                    <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
                    <security-domain-and-application xsi:type="securityMetaData" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
                    <metadata/>
                    <local-transaction/>
                    <check-valid-connection-sql>SELECT * FROM DUAL</check-valid-connection-sql>
                    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
                    <prepared-statement-cache-size>0</prepared-statement-cache-size>
                    <share-prepared-statements>false</share-prepared-statements>
                    <set-tx-query-timeout>false</set-tx-query-timeout>
                    <query-timeout>0</query-timeout>
                    <use-try-lock>60000</use-try-lock>
                    <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
                    <connection-url>jdbc:oracle:thin:@fis05:1521:FAMOUS</connection-url>

            ...

             

            Regards,

             

            Steve

            • 3. Re: Deployments Missing Dependencies
              Wolfgang Knauf Master

              Hi,

               

              I would suggest to remove the "jdbc/" from the DS JNDI name:

               

              <jndi-name>fisdb_dev</jndi-name>

               

              Then the @Resource annotation would look like this:

              @Resource(mappedName="java:fisdb_dev")

              private DataSource ds;

               

              Hope this helps, I never changed a datasource myself ;-).

               

              Best regards

               

              Wolfgang

              • 4. Re: Deployments Missing Dependencies
                Steve Friesen Newbie

                I created a new datasource that does not include the "jdbc/", but continue to have the missing dependency problem:

                 

                DEPLOYMENTS MISSING DEPENDENCIES:
                  Deployment "jboss-switchboard:appName=sfRichFaces1,module=sfRichFaces1" is missing the following dependencies:
                    Dependency "jboss.jca:name=internal/sfRichFaces1/sfRichFaces1/env/fisdbdev,service=DataSourceBinding" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=internal/sfRichFaces1/sfRichFaces1/env/fisdbdev,service=DataSourceBinding',whenRequired=MapControllerStateModel$ControllerStateWrapper@19f2abf{Installed},dependentState=MapControllerStateModel$ControllerStateWrapper@19f2abf{Installed} **")
                  Deployment "jboss.web.deployment:war=/sfRichFaces1" is missing the following dependencies:
                    Dependency "jboss-switchboard:appName=sfRichFaces1,module=sfRichFaces1" (should be in state "Installed", but is actually in state "Deploy")

                DEPLOYMENTS IN ERROR:
                  Deployment "jboss.jca:name=internal/sfRichFaces1/sfRichFaces1/env/fisdbdev,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=internal/sfRichFaces1/sfRichFaces1/env/fisdbdev,service=DataSourceBinding',whenRequired=MapControllerStateModel$ControllerStateWrapper@19f2abf{Installed},dependentState=MapControllerStateModel$ControllerStateWrapper@19f2abf{Installed} **

                My gut is telling me that there is some configuration with JBoss that is different than what I have done in Netbeans that I have not done. Any other ideas?

                 

                Also Eclipse does not like "mappedName" as an attribute of @Resource. I've tried both

                @Resource(name="java:fisdbdev")

                and

                @Resource(name="fisdbdev")

                and I get the same missing dependency error.

                Thanks,

                Steve

                • 5. Re: Deployments Missing Dependencies
                  jaikiran pai Master

                  @Resource(name="....") isn't correct. Like Wolfgang mentioned you should be using either the "mappedName" or the "lookup" attribute of @Resource to specify the value.

                  • 6. Re: Deployments Missing Dependencies
                    Wolfgang Knauf Master

                    Hi Steve,

                     

                    >> Also Eclipse does not like "mappedName" as an attribute of @Resource

                     

                    This worked fine for me, and I also don't see a typo in your attribute value. Which package does it come from? It should be "javax.annotation.Resource".

                     

                    Best regards

                     

                    Wolfgang