After taking the following steps to try and rectify the problem I had to manually edit the presistence.xml file and change the needed fields.

1. Create a new Java web project
2. Create a new database
3. Connect to database
4. Create a new "Entities" package
5. Add a new Entity class
6. Create persistence unit
7. Select provider and data source ( or create new data source)

xml Code:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <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">
  3.   <persistence-unit name="WebApplication2PU" transaction-type="JTA">
  4.     <provider>oracle.toplink.essentials.PersistenceProvider</provider>
  5.     <jta-data-source>jdbc/test</jta-data-source>
  6.     <properties>
  7.       <property name="toplink.ddl-generation" value="create-tables"/>
  8.     </properties>
  9.   </persistence-unit>
  10. </persistence>

I think in more cases the above steps will still work. Although, I'm still at a loss as to why the problem occurs.