title: Missing Dependencies JBoss 5.1
body: <p>I've just started a Java project, using JBoss, having EAR, ejb and war projects. My team mate has developed an Datas.java servlet class, which injects using @EJB notation an ejb session bean called Autocomplete.java that collects data from a mysql db.</p>
  
  <p>He can successfully deploy the application (he's on Linux Debian) while my deployment fails :(, here's the stack trace (I'm on Mac OSX Snow Leopard)</p>
  
  <pre><code> 14:12:50,905 INFO  [TomcatDeployment] deploy, ctxPath=/UnrealProject-war
  14:12:50,953 WARN  [HDScanner] Failed to process changes
  org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
  
  DEPLOYMENTS MISSING DEPENDENCIES:
    Deployment "jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3" is missing the following dependencies:
      Dependency "&lt;UNKNOWN jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3&gt;" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=UnrealProject.ear/UnrealProject-ejb.jar#mph-db' **")
    Deployment "jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3_endpoint" is missing the following dependencies:
      Dependency "jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")
    Deployment "persistence.unit:unitName=UnrealProject.ear/UnrealProject-ejb.jar#mph-db" is missing the following dependencies:
      Dependency "jboss.jca:name=UnrealProjectDS,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=UnrealProjectDS,service=DataSourceBinding' **")
  
  DEPLOYMENTS IN ERROR:
    Deployment "jboss.jca:name=UnrealProjectDS,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=UnrealProjectDS,service=DataSourceBinding' **
    Deployment "&lt;UNKNOWN jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3&gt;" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=UnrealProject.ear/UnrealProject-ejb.jar#mph-db' **
  </code></pre>
  
  <p>Please help! It's getting kinda frustrating =(</p>
  
  <hr>
  
  <p>Ok, here's a larger log</p>
  
  <pre><code>2011-12-14 14:44:00,897 INFO  [org.apache.catalina.core.StandardService] (main) Starting service jboss.web
  2011-12-14 14:44:00,909 INFO  [org.apache.catalina.core.StandardEngine] (main) Starting Servlet Engine: JBoss Web/2.1.3.GA
  2011-12-14 14:44:00,979 INFO  [org.apache.catalina.startup.Catalina] (main) Server startup in 114 ms
  2011-12-14 14:44:01,008 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/web-console
  2011-12-14 14:44:01,707 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/invoker
  2011-12-14 14:44:01,749 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/jbossws
  2011-12-14 14:44:01,853 INFO  [org.jboss.resource.deployers.RARDeployment] (main) Required license terms exist, view vfszip:/Users/edolaptop/jboss-5.1.0.GA/server/default/deploy/jboss-local-jdbc.rar/META-INF/ra.xml
  2011-12-14 14:44:01,882 INFO  [org.jboss.resource.deployers.RARDeployment] (main) Required license terms exist, view vfszip:/Users/edolaptop/jboss-5.1.0.GA/server/default/deploy/jboss-xa-jdbc.rar/META-INF/ra.xml
  2011-12-14 14:44:01,902 INFO  [org.jboss.resource.deployers.RARDeployment] (main) Required license terms exist, view vfszip:/Users/edolaptop/jboss-5.1.0.GA/server/default/deploy/jms-ra.rar/META-INF/ra.xml
  2011-12-14 14:44:01,921 INFO  [org.jboss.resource.deployers.RARDeployment] (main) Required license terms exist, view vfszip:/Users/edolaptop/jboss-5.1.0.GA/server/default/deploy/mail-ra.rar/META-INF/ra.xml
  2011-12-14 14:44:01,938 INFO  [org.jboss.resource.deployers.RARDeployment] (main) Required license terms exist, view vfszip:/Users/edolaptop/jboss-5.1.0.GA/server/default/deploy/quartz-ra.rar/META-INF/ra.xml
  2011-12-14 14:44:02,008 INFO  [org.quartz.simpl.SimpleThreadPool] (main) Job execution threads will use class loader of thread: main
  2011-12-14 14:44:02,040 INFO  [org.quartz.core.QuartzScheduler] (main) Quartz Scheduler v.1.5.2 created.
  2011-12-14 14:44:02,043 INFO  [org.quartz.simpl.RAMJobStore] (main) RAMJobStore initialized.
  2011-12-14 14:44:02,043 INFO  [org.quartz.impl.StdSchedulerFactory] (main) Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
  2011-12-14 14:44:02,044 INFO  [org.quartz.impl.StdSchedulerFactory] (main) Quartz scheduler version: 1.5.2
  2011-12-14 14:44:02,044 INFO  [org.quartz.core.QuartzScheduler] (main) Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
  2011-12-14 14:44:02,454 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main) Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
  2011-12-14 14:44:02,880 INFO  [org.jboss.jms.server.ServerPeer] (main) JBoss Messaging 1.4.3.GA server [0] started
  2011-12-14 14:44:02,994 INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactoryJNDIMapper] (main) supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover
  2011-12-14 14:44:02,994 INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactoryJNDIMapper] (main) supportsLoadBalancing attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support load balancing
  2011-12-14 14:44:03,040 INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main) Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
  2011-12-14 14:44:03,040 INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main) org.jboss.jms.server.connectionfactory.ConnectionFactory@3695149e started
  2011-12-14 14:44:03,041 INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main) Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
  2011-12-14 14:44:03,041 INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main) org.jboss.jms.server.connectionfactory.ConnectionFactory@4b5a8874 started
  2011-12-14 14:44:03,056 INFO  [org.jboss.jms.server.destination.QueueService] (main) Queue[/queue/DLQ] started, fullSize=200000, pageSize=2000, downCacheSize=2000
  2011-12-14 14:44:03,058 INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main) Connector bisocket://127.0.0.1:4457 has leasing enabled, lease period 10000 milliseconds
  2011-12-14 14:44:03,059 INFO  [org.jboss.jms.server.connectionfactory.ConnectionFactory] (main) org.jboss.jms.server.connectionfactory.ConnectionFactory@461384f2 started
  2011-12-14 14:44:03,060 INFO  [org.jboss.jms.server.destination.QueueService] (main) Queue[/queue/ExpiryQueue] started, fullSize=200000, pageSize=2000, downCacheSize=2000
  2011-12-14 14:44:03,177 INFO  [org.jboss.resource.connectionmanager.ConnectionFactoryBindingService] (main) Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
  2011-12-14 14:44:03,563 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main) Created KernelDeployment for: profileservice-secured.jar
  2011-12-14 14:44:03,566 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main) installing bean: jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3
  2011-12-14 14:44:03,566 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   with dependencies:
  2011-12-14 14:44:03,566 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   and demands:
  2011-12-14 14:44:03,566 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jndi:SecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView
  2011-12-14 14:44:03,566 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jboss.ejb:service=EJBTimerService
  2011-12-14 14:44:03,566 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   and supplies:
  2011-12-14 14:44:03,567 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   Class:org.jboss.profileservice.spi.ProfileService
  2011-12-14 14:44:03,567 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jndi:SecureProfileService/remote
  2011-12-14 14:44:03,567 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jndi:SecureProfileService/remote-org.jboss.profileservice.spi.ProfileService
  2011-12-14 14:44:03,567 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main) Added bean(jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3) to KernelDeployment of: profileservice-secured.jar
  2011-12-14 14:44:03,568 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main) installing bean: jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3
  2011-12-14 14:44:03,568 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   with dependencies:
  2011-12-14 14:44:03,568 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   and demands:
  2011-12-14 14:44:03,568 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jboss.ejb:service=EJBTimerService
  2011-12-14 14:44:03,568 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   and supplies:
  2011-12-14 14:44:03,568 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jndi:SecureDeploymentManager/remote-org.jboss.deployers.spi.management.deploy.DeploymentManager
  2011-12-14 14:44:03,568 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   Class:org.jboss.deployers.spi.management.deploy.DeploymentManager
  2011-12-14 14:44:03,568 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jndi:SecureDeploymentManager/remote
  2011-12-14 14:44:03,568 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main) Added bean(jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3) to KernelDeployment of: profileservice-secured.jar
  2011-12-14 14:44:03,569 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main) installing bean: jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3
  2011-12-14 14:44:03,569 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   with dependencies:
  2011-12-14 14:44:03,569 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   and demands:
  2011-12-14 14:44:03,569 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jboss.ejb:service=EJBTimerService
  2011-12-14 14:44:03,569 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   and supplies:
  2011-12-14 14:44:03,569 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jndi:SecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView
  2011-12-14 14:44:03,569 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   Class:org.jboss.deployers.spi.management.ManagementView
  2011-12-14 14:44:03,569 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jndi:SecureManagementView/remote
  2011-12-14 14:44:03,569 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main) Added bean(jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3) to KernelDeployment of: profileservice-secured.jar
  2011-12-14 14:44:03,575 INFO  [org.jboss.ejb3.endpoint.deployers.EJB3EndpointDeployer] (main) Deploy AbstractBeanMetaData@52c64a78{name=jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
  2011-12-14 14:44:03,575 INFO  [org.jboss.ejb3.endpoint.deployers.EJB3EndpointDeployer] (main) Deploy AbstractBeanMetaData@24be9de9{name=jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
  2011-12-14 14:44:03,575 INFO  [org.jboss.ejb3.endpoint.deployers.EJB3EndpointDeployer] (main) Deploy AbstractBeanMetaData@5cd4c5b1{name=jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
  2011-12-14 14:44:03,848 INFO  [org.jboss.ejb3.session.SessionSpecContainer] (main) Starting jboss.j2ee:jar=profileservice-secured.jar,name=SecureDeploymentManager,service=EJB3
  2011-12-14 14:44:03,885 INFO  [org.jboss.ejb3.EJBContainer] (main) STARTED EJB: org.jboss.profileservice.ejb.SecureDeploymentManager ejbName: SecureDeploymentManager
  2011-12-14 14:44:03,945 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] (main) Binding the following Entries in Global JNDI:
  
      SecureDeploymentManager/remote - EJB3.x Default Remote Business Interface
      SecureDeploymentManager/remote-org.jboss.deployers.spi.management.deploy.DeploymentManager - EJB3.x Remote Business Interface
  
  2011-12-14 14:44:04,036 INFO  [org.jboss.ejb3.session.SessionSpecContainer] (main) Starting jboss.j2ee:jar=profileservice-secured.jar,name=SecureManagementView,service=EJB3
  2011-12-14 14:44:04,047 INFO  [org.jboss.ejb3.EJBContainer] (main) STARTED EJB: org.jboss.profileservice.ejb.SecureManagementView ejbName: SecureManagementView
  2011-12-14 14:44:04,068 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] (main) Binding the following Entries in Global JNDI:
  
      SecureManagementView/remote - EJB3.x Default Remote Business Interface
      SecureManagementView/remote-org.jboss.deployers.spi.management.ManagementView - EJB3.x Remote Business Interface
  
  2011-12-14 14:44:04,152 INFO  [org.jboss.ejb3.session.SessionSpecContainer] (main) Starting jboss.j2ee:jar=profileservice-secured.jar,name=SecureProfileService,service=EJB3
  2011-12-14 14:44:04,153 INFO  [org.jboss.ejb3.EJBContainer] (main) STARTED EJB: org.jboss.profileservice.ejb.SecureProfileServiceBean ejbName: SecureProfileService
  2011-12-14 14:44:04,163 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] (main) Binding the following Entries in Global JNDI:
  
      SecureProfileService/remote - EJB3.x Default Remote Business Interface
      SecureProfileService/remote-org.jboss.profileservice.spi.ProfileService - EJB3.x Remote Business Interface
  
  2011-12-14 14:44:04,320 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/admin-console
  2011-12-14 14:44:04,392 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (main) Initializing Mojarra (1.2_12-b01-FCS) for context '/admin-console'
  2011-12-14 14:44:07,268 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/
  2011-12-14 14:44:07,406 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/jmx-console
  2011-12-14 14:44:07,634 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main) Created KernelDeployment for: UnrealProject-ejb.jar
  2011-12-14 14:44:07,634 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main) installing bean: jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3
  2011-12-14 14:44:07,634 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   with dependencies:
  2011-12-14 14:44:07,634 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   and demands:
  2011-12-14 14:44:07,634 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   persistence.unit:unitName=UnrealProject.ear/UnrealProject-ejb.jar#mph-db
  2011-12-14 14:44:07,634 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jboss.ejb:service=EJBTimerService
  2011-12-14 14:44:07,634 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   and supplies:
  2011-12-14 14:44:07,635 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jndi:UnrealProject/Autocomplete/remote
  2011-12-14 14:44:07,635 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   jndi:UnrealProject/Autocomplete/remote-org.unrealmph.session.AutocompleteRemote
  2011-12-14 14:44:07,635 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main)   Class:org.unrealmph.session.AutocompleteRemote
  2011-12-14 14:44:07,635 INFO  [org.jboss.ejb3.deployers.JBossASKernel] (main) Added bean(jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3) to KernelDeployment of: UnrealProject-ejb.jar
  2011-12-14 14:44:07,651 INFO  [org.jboss.ejb3.endpoint.deployers.EJB3EndpointDeployer] (main) Deploy AbstractBeanMetaData@a93df59{name=jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3_endpoint bean=org.jboss.ejb3.endpoint.deployers.impl.EndpointImpl properties=[container] constructor=null autowireCandidate=true}
  2011-12-14 14:44:07,811 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (main) deploy, ctxPath=/UnrealProject-war
  2011-12-14 14:44:07,968 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
  
  DEPLOYMENTS MISSING DEPENDENCIES:
    Deployment "jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3" is missing the following dependencies:
      Dependency "&lt;UNKNOWN jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3&gt;" (should be in state "Described", but is actually in state "** UNRESOLVED Demands 'persistence.unit:unitName=UnrealProject.ear/UnrealProject-ejb.jar#mph-db' **")
    Deployment "jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3_endpoint" is missing the following dependencies:
      Dependency "jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3" (should be in state "Configured", but is actually in state "PreInstall")
    Deployment "persistence.unit:unitName=UnrealProject.ear/UnrealProject-ejb.jar#mph-db" is missing the following dependencies:
      Dependency "jboss.jca:name=UnrealProjectDS,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=UnrealProjectDS,service=DataSourceBinding' **")
  
  DEPLOYMENTS IN ERROR:
    Deployment "jboss.jca:name=UnrealProjectDS,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=UnrealProjectDS,service=DataSourceBinding' **
    Deployment "&lt;UNKNOWN jboss.j2ee:ear=UnrealProject.ear,jar=UnrealProject-ejb.jar,name=Autocomplete,service=EJB3&gt;" is in error due to the following reason(s): ** UNRESOLVED Demands 'persistence.unit:unitName=UnrealProject.ear/UnrealProject-ejb.jar#mph-db' **
  </code></pre>