title: Is the file persistence.xml required?
body: <p>My development environment (IBM RAD 8 + WAS 8) is complaining that my project does not have a persistence.xml file. Still it seems that I can build and run my project. Is that file required and if a add one such file to make my project pass validation, what should be in that file?</p>
  
  <p>The project is a web project that uses session beans and entity beans from other projects and this persistence.xml error is the only error in the project so I'd be glad to get rid of it. </p>
  
  <p>Thanks for any help</p>
  
  <h2>Update</h2>
  
  <p>I searched my files for persistence.xml and it showed up in src/ and bin/ of the EJB project while the web project with servlets and jsp does not have a persistence.xml, according to my colleague the web project is using the persistence.xml from the EJB project i.e:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"&gt;
  
      &lt;persistence-unit name="PandoraArendeWeb" transaction-type="JTA"&gt;
  
          &lt;jta-data-source&gt;jdbc/Mainframe_TEST_ADBUTV2&lt;/jta-data-source&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.PRVNummer&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.Ansokan&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.NatAnsokan&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.PctAnsokan&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.ArendePerson&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.Nyregistrering&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.Anstalld&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.Handlaggare&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.OrgElement&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.FysiskHandlaggare&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.AnsvarigHandlaggare&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.AnsvarigFysiskHandlaggare&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.TeknikOmrade&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.Person&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.PRVNummerPerson&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.Notering&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.Lock&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.LandKod&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.ArbetsMomentLog&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.SystemTypDel&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.ArbetsMoment&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.UnderStatus&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.PatPers&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.PrvLandP&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.PkaPerln&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.PctnPerl&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.PersonToPatPersKoppl&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.PRVNummerPersonKoppl&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.Region&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.Historik&lt;/class&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.Egenskap&lt;/class&gt;
          &lt;exclude-unlisted-classes&gt;true&lt;/exclude-unlisted-classes&gt;
  
      &lt;/persistence-unit&gt;
  
  &lt;!-- &lt;persistence-unit name="PandoraArendeWeb_MSSQL" transaction-type="JTA"&gt;
  
          &lt;jta-data-source&gt;jdbc/MSSQL_TEST_XA&lt;/jta-data-source&gt;
          &lt;class&gt;se.prv.pandora.arendeprocess.entity.PersonSearch&lt;/class&gt;
          &lt;exclude-unlisted-classes&gt;true&lt;/exclude-unlisted-classes&gt;
  
      &lt;/persistence-unit&gt;
   --&gt;    
  &lt;/persistence&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/QXH3z.png" alt="enter image description here"></p>