title: java.sql.SQLException: Table/View 'SEQUENCE' already exists in Schema 'ADMIN'
body: <p>My application throws this Exception.
  I am using Java DB as the back end and i am using JPA</p>
  
  <blockquote>
    <p>Internal Exception:
    java.sql.SQLException: Table/View
    'POCKETMONEY' already exists in Schema
    'APP'. Error Code: 30000 Call: CREATE
    TABLE APP.POCKETMONEY (ID INTEGER NOT
    NULL, DateofSpending DATE, DESCRIPTION
    VARCHAR(255), AMOUNT INTEGER, PRIMARY
    KEY (ID)) Query: DataModifyQuery()</p>
    
    <p>Internal Exception:
    java.sql.SQLException: Table/View
    'SEQUENCE' already exists in Schema
    'ADMIN'. Error Code: 30000 Call:
    CREATE TABLE SEQUENCE (SEQ_NAME
    VARCHAR(50) NOT NULL, SEQ_COUNT
    DECIMAL, PRIMARY KEY (SEQ_NAME))
    Query: DataModifyQuery()</p>
  </blockquote>
  
  <p>Here is my JPA code</p>
  
  <pre><code>/*
   * To change this template, choose Tools | Templates
   * and open the template in the editor.
   */
  package mymoney;
  
  import java.io.Serializable;
  import java.util.Date;
  import javax.persistence.Column;
  import javax.persistence.Entity;
  import javax.persistence.GeneratedValue;
  import javax.persistence.GenerationType;
  import javax.persistence.Id;
  import javax.persistence.Table;
  import javax.persistence.Temporal;
  import javax.persistence.TemporalType;
  
  /**
   *
   * @author sugan
   */
  @Entity
  @Table(schema = "APP")
  public class pocketMoney implements Serializable {
  
      private static final long serialVersionUID = 1L;
      @Id
      @GeneratedValue(strategy=GenerationType.TABLE)
      private int id;
      @Temporal(TemporalType.DATE)
      @Column(name = "DateofSpending")
      private Date dos;
      private String description;
      private int amount;
  
      public int getAmount() {
          return amount;
      }
  
      public void setAmount(int amount) {
          this.amount = amount;
      }
  
      public String getDescription() {
          return description;
      }
  
      public void setDescription(String description) {
          this.description = description;
      }
  
      public Date getDos() {
          return dos;
      }
  
      public void setDos(Date dos) {
          this.dos = dos;
      }
  
      public int getId() {
          return id;
      }
  
      public void setId(int id) {
          this.id = id;
      }
  
      @Override
      public int hashCode() {
          int hash = 0;
          hash += (int) id;
          return hash;
      }
  
      @Override
      public boolean equals(Object object) {
          // TODO: Warning - this method won't work in the case the id fields are not set
          if (!(object instanceof pocketMoney)) {
              return false;
          }
          pocketMoney other = (pocketMoney) object;
          if (this.id != other.id) {
              return false;
          }
          return true;
      }
  
      @Override
      public String toString() {
          return "mymoney.pocketMoney[id=" + id + "]";
      }
  }
  </code></pre>
  
  <p>Persistence.xml</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="myMoneyPU" transaction-type="RESOURCE_LOCAL"&gt;
      &lt;provider&gt;org.eclipse.persistence.jpa.PersistenceProvider&lt;/provider&gt;
      &lt;class&gt;mymoney.pocketMoney&lt;/class&gt;
      &lt;properties&gt;
        &lt;property name="eclipselink.jdbc.password" value="adminadmin"/&gt;
        &lt;property name="eclipselink.jdbc.user" value="admin"/&gt;
        &lt;property name="eclipselink.jdbc.driver" value="org.apache.derby.jdbc.EmbeddedDriver"/&gt;
        &lt;property name="eclipselink.jdbc.url" value="jdbc:derby:pocketmoney;create=true"/&gt;
        &lt;property name="eclipselink.ddl-generation" value="drop-and-create-tables"/&gt;
      &lt;/properties&gt;
    &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>