title: Deploying datasource.xml on Jboss 7.1
body: <p>I am trying to add a datasource xml file, named <code>oracle-ds.xml</code>, to my JBoss 7.1 folder so projects that I deploy on that server could use that data source.</p>
  
  <p>As it is explained on <a href="https://community.jboss.org/en/tools/blog/2012/02/28/excited-about-jboss-as-71-part-i-deployable-datasources">jboss.org</a>, I need to put that file in the deployments folder.</p>
  
  <p>Which is what I did. But unlike what they said in the link above, I have my Orcale driver jar in my local maven repository. Anyway, maven is able to build the project.</p>
  
  <p>Now when I restart Jboss, it seems like it regards <code>oracle-ds.xml</code> as a project (jar) that needs to be deployed, not as an xml setting file...</p>
  
  <p>Here is some of the console output during Jboss' restart:</p>
  
  <pre><code>15:58:16,666 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "oracle-ds.xml"
  15:58:16,728 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00001: Failed to start service jboss.deployment.unit."oracle-ds.xml".PARSE: org.jboss.msc.se
  rvice.StartException in service jboss.deployment.unit."oracle-ds.xml".PARSE: Failed to process phase PARSE of deployment "oracle-ds.xml"
          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
          at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_29]
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_29]
          at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_29]
  Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: IJ010061: Unexpected element: local-tx-datasource
          at org.jboss.as.connector.deployers.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:85)
          at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
          ... 5 more
  Caused by: org.jboss.jca.common.metadata.ParserException: IJ010061: Unexpected element: local-tx-datasource
          at org.jboss.jca.common.metadata.ds.DsParser.parseDataSources(DsParser.java:183)
          at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:119)
          at org.jboss.jca.common.metadata.ds.DsParser.parse(DsParser.java:82)
          at org.jboss.as.connector.deployers.processors.DsXmlDeploymentParsingProcessor.deploy(DsXmlDeploymentParsingProcessor.java:80)
          ... 6 more
  </code></pre>
  
  <p>Why does it happen and what should I do to correct this behavior?</p>