title: Getting error starting jboss server when datasource is configured through jndi
body: <p>I am trying to configure datasource through jndi in jboss.</p>
  
  <p>I get the following error while starting the server</p>
  
  <pre><code>    2013-01-06 00:18:01,078 ERROR [ProfileServiceBootstrap] (Thread-2) Failed to load profile:: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
  
      *** DEPLOYMENTS MISSING DEPLOYERS: Name
  
      vfs:///D:/downloads/jboss-6.1.0.Final/server/default/deploy/jboss-local-jdbc.rar
  
      DEPLOYMENTS MISSING DEPENDENCIES:
        Deployment "jboss-switchboard:appName=practice,module=practice" is missing the following dependencies:
          Dependency "java:/DefaultDS" (should be in state "Installed", but is actually in state "** NOT FOUND Depends on 'java:/DefaultDS' **")
        Deployment "jboss.web.deployment:war=/practice" is missing the following dependencies:
          Dependency "jboss-switchboard:appName=practice,module=practice" (should be in state "Installed", but is actually in state "Create")
        Deployment "jboss:service=KeyGeneratorFactory,type=HiLo" is missing the following dependencies:
          Dependency "jboss.jca:name=DefaultDS,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataSourceBinding' **")
  
      DEPLOYMENTS IN ERROR:
        Deployment "java:/DefaultDS" is in error due to the following reason(s): ** NOT FOUND Depends on 'java:/DefaultDS' **
        Deployment "jboss.jca:name=DefaultDS,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=DefaultDS,service=DataSourceBinding' **
        Deployment "vfs:///D:/downloads/jboss-6.1.0.Final/server/default/deploy/oracle-ds.xml" is in error due to the following reason(s): java.lang.IllegalStateException: No ConnectorMetaData found for mdf rarName: jboss-local-jdbc.rar
  
          at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1228) [:2.2.2.GA]
          at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:905) [:2.2.2.GA]
          at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:87) [:6.1.0.Final]
          at org.jboss.profileservice.deployment.ProfileDeployerPluginRegistry.checkAllComplete(ProfileDeployerPluginRegistry.java:107) [:0.2.2]
          at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:135) [:6.1.0.Final]
          at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]
          at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
          at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
          at java.lang.Thread.run(Thread.java:662) [:1.6.0_31]
  
      2013-01-06 00:18:01,156 INFO  [org.apache.coyote.http11.Http11Protocol] (Thread-2) Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
      2013-01-06 00:18:01,171 INFO  [org.apache.coyote.ajp.AjpProtocol] (Thread-2) Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
      2013-01-06 00:18:01,171 INFO  [org.jboss.bootstrap.impl.base.server.AbstractServer] (Thread-2) JBossAS [6.1.0.Final "Neo"] Started in 2m:57s:984ms
  </code></pre>
  
  <p>Following is the oracle-ds.xml file in $JBOSS_HOME\server\default\deploy directory</p>
  
  <p>oralce-ds.xml
  .................................................................................
          </p>
  
  <pre><code>    &lt;datasources&gt;
        &lt;local-tx-datasource&gt;
          &lt;jndi-name&gt;DefaultDS&lt;/jndi-name&gt;
          &lt;connection-url&gt;jdbc:oracle:thin:@localhost:1521:myDB&lt;/connection-url&gt;
          &lt;driver-class&gt;oracle.jdbc.driver.OracleDriver&lt;/driver-class&gt;
          &lt;user-name&gt;user_name&lt;/user-name&gt;
          &lt;password&gt;pwd&lt;/password&gt;
          &lt;min-pool-size&gt;5&lt;/min-pool-size&gt;
          &lt;max-pool-size&gt;20&lt;/max-pool-size&gt;
          &lt;!-- Checks the Oracle error codes and messages for fatal errors --&gt;
          &lt;exception-sorter-class-name&gt;org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter&lt;/exception-sorter-class-name&gt;
  
           &lt;metadata&gt;
               &lt;type-mapping&gt;Oracle9i&lt;/type-mapping&gt;
            &lt;/metadata&gt;
        &lt;/local-tx-datasource&gt;
  
      &lt;/datasources&gt;
  </code></pre>
  
  <p>Content of web.xml</p>
  
  <pre><code>    web.xml
      ....................................................
      &lt;resource-ref&gt;
            &lt;description&gt;Oracle DS&lt;/description&gt;
            &lt;res-ref-name&gt;jdbc/DefaultDS&lt;/res-ref-name&gt;
            &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
            &lt;res-auth&gt;Container&lt;/res-auth&gt;
      &lt;/resource-ref&gt;
  </code></pre>
  
  <p>Content of jboss-web.xml  </p>
  
  <pre><code>  jboss-web.xml
      ..................................................
      &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;jboss-web&gt;
          &lt;resource-ref&gt;
              &lt;res-ref-name&gt;jdbc/DefaultDS&lt;/res-ref-name&gt;
              &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
              &lt;jndi-name&gt;java:/DefaultDS&lt;/jndi-name&gt;
          &lt;/resource-ref&gt;
      &lt;/jboss-web&gt;
  
  
  Any help will be appreciated.
  </code></pre>