title: Cannot acquire Data Source in EclipseLink
body: <p>I have a Web Application (Netbeans + Maven) in Java EE backed with a local installation of Tomcat 8, My application runs Jersey for a web service. I'm trying to add EclipseLink for persistence (the database I'm accessing is a remote OracleDB), but I can't configure it right and I'm always greeted by a lot of exceptions every time I'm trying to create entities.</p>
  
  <p>This is my code:</p>
  
  <pre><code>EntityManagerFactory factory = Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME);
  EntityManager entityManager = factory.createEntityManager();
  entityManager.getTransaction().begin();
  </code></pre>
  
  <p>it throws</p>
  
  <blockquote>
    <p>Exception [EclipseLink-7060] (Eclipse Persistence Services - 2.5.0.v20130507-3faac2b): org.eclipse.persistence.exceptions.ValidationException
    Exception Description: Cannot acquire data source [jdbc/oracle].
    Internal Exception: javax.naming.NameNotFoundException: Name [jdbc/oracle] is not bound in this Context. Unable to find [jdbc].</p>
  </blockquote>
  
  <p>I've been spending the better part of the day configuring web.xml, context.xml and persistence.xml and nothing works</p>
  
  <p>EDIT:
  When I add </p>
  
  <pre><code>&lt;properties&gt;
    &lt;property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@11.22.333.444:5555:XE"/&gt;
    &lt;property name="javax.persistence.jdbc.user" value="xxxx"/&gt;
    &lt;property name="javax.persistence.jdbc.password" value="xxxx"/&gt;--&gt;
    &lt;property name="javax.persistence.jdbc.driver" value="oracle.jdbc.OracleDriver"/&gt;
  
    &lt;property name="eclipselink.logging.level" value="WARNING"/&gt;
    &lt;property name="javax.persistence.schema-generation.database.action" value="create"/&gt;
  &lt;/properties&gt;
  </code></pre>
  
  <p>to the persistence.xml, I get the following</p>
  
  <blockquote>
    <p>javax.persistence.PersistenceException: java.lang.UnsupportedOperationException: Not supported by BasicDataSource
        org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:762)
        org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:204)
        org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:182)
        org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getDatabaseSession(EntityManagerFactoryImpl.java:527)
        org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactoryImpl(PersistenceProvider.java:140)
        org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:177)
        javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:79)
        javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)</p>
  </blockquote>
  
  <p>What am I doing wrong ?</p>