title: Can't create JPA tables into derby with glassfish3
body: <p>I am trying to create clone database(s) with JPA (2.0) into derby from a legacy database. The JPA entities were generated from an existing database (by JDidea tools I think), and now I am using Eclipse + GlassFish3 + EclipseLink + Derby + JDK 6 to clone that database for secure development (and testing).</p>
  
  <p>However I am getting into glassfish log these messages:</p>
  
  <pre><code>INFO: EclipseLink, version: Eclipse Persistence Services - 2.3.2.v20111125-r10461
  INFO: file:/C:/siilo/glassfish3/glassfish/domains/domain1/eclipseApps/omaasiointi-web/WEB-INF/classes/PU_NAME login successful
  WARNING: Multiple [2] JMX MBeanServer instances exist, we will use the server at index [0] : [com.sun.enterprise.v3.admin.DynamicInterceptor@22beebcd].
  WARNING: JMX MBeanServer in use: [com.sun.enterprise.v3.admin.DynamicInterceptor@22beebcd] from index [0] 
  WARNING: JMX MBeanServer in use: [com.sun.jmx.mbeanserver.JmxMBeanServer@62ccf439] from index [1] 
  
  WARNING: PER01000: Got SQLException executing statement "CREATE TABLE "postikoodi" ("lrivino" BIGINT NOT NULL, "szkielikoodi" VARCHAR(255), "szkuntakoodi" VARCHAR(255), "szpostinumero" VARCHAR(255), "szpostitoimipaikka" VARCHAR(255), "sztimestamp" VARCHAR(255), "szuserid" VARCHAR(255), PRIMARY KEY ("lrivino"))": java.sql.SQLException: Table/View 'postikoodi' already exists in Schema 'APP'.
  ...
  </code></pre>
  
  <p>And there is a lot of these messages. There is multiple databases used, which are identical and the EclipseLink assumably tries to create all the tables in all the databases (for what reason I suppose I get enormous amounts of these errors => they seem to be about the same).</p>
  
  <p>I created couple of database connections in Eclipse and checked that the 'APP' schema was empty in these, so I do not quite understand the error.</p>
  
  <p>In persistence.xml I have the following defined:</p>
  
  <pre><code>&lt;persistence-unit name="PU_NAME" transaction-type="JTA"&gt;
      &lt;jta-data-source&gt;jdbc/__default&lt;/jta-data-source&gt;
      &lt;properties&gt;
          &lt;property name="eclipselink.target-database" value="org.eclipse.persistence.platform.database.DerbyPlatform"/&gt;
          &lt;property name="eclipselink.ddl-generation" value="drop-and-create-tables"/&gt;
          &lt;property name="eclipselink.ddl-generation.output-mode" value="database"/&gt;
      &lt;/properties&gt;
  &lt;/persistence-unit&gt;
  </code></pre>
  
  <p>Any advice?</p>