title: Eclipse Glassfish 3.1 adapter - SEQUENCE already exists error
body: <p>I have some problems with Eclipse server adapter for Glassfish 3.1. I am using the JPA auto generated identifiers. If the server is running and I have a create-and-drop policy for JPA, than each time the hot redeploy occurs I've got a big fat Eclipse error message thrown in my face:</p>
  <blockquote>
  <p>cannot Deploy MyWebApp Deployment Error for module: MyWebApp:</p>
  <p>PER01003: Deployment encountered SQL Exceptions:
  PER01000: Got SQLException executing statement &quot;CREATE TABLE SEQUENCE (SEQ_NAME
  VARCHAR(50) NOT NULL, SEQ_COUNT DECIMAL(38), PRIMARY KEY (SEQ_NAME))&quot;:</p>
  <p>org.postgresql.util.PSQLException: ERROR: relation &quot;sequence&quot; already exists</p>
  </blockquote>
  <p>I am aware that this is just a Glassfish warning (damn old...: <a href="http://java.net/projects/glassfish/lists/persistence/archive/2006-11/message/221" rel="nofollow noreferrer">http://java.net/projects/glassfish/lists/persistence/archive/2006-11/message/221</a>) and is not dangerous (it's because the drop.ddl is deleting just one sequence-table row instead of the whole table).</p>
  <p>It's just a PITA to see this error popup each time I save a resource. Any ideas how to get rid of it without loosing create-and-drop functionality? At least to make it not disturbing while developing...</p>
  <p>My persistence.xml</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;persistence version=&quot;2.0&quot;&gt;
      &lt;persistence-unit name=&quot;JPATestsCascadePU&quot; transaction-type=&quot;JTA&quot;&gt;
          &lt;jta-data-source&gt;jdbc/myDB&lt;/jta-data-source&gt;
          &lt;properties&gt;
              &lt;property name=&quot;eclipselink.ddl-generation&quot; 
                                value=&quot;drop-and-create-tables&quot; /&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  <p>Exemplary entity using auto generated ID:</p>
  <pre><code>@Entity
  public class Website {
  
      @Id
      @GeneratedValue
      private long id;
  
      private String value;
  
      public String getValue() {
          return value;
      }
  
      public void setValue(String value) {
          this.value = value;
      }    
  }
  </code></pre>