title: OpenJPA and Derby not finding sequence table
body: <p>I am using openJPA 2.2.3 embedded in WebSphere App Server 8.5.5.2 and Derby 10.8.  I am trying to get a sequence for a simple transaction, but openJPA is not finding the sequence table.</p>
  
  <pre><code>Caused by: &lt;openjpa-2.2.3-SNAPSHOT-r422266:1564471 fatal general error&gt; org.apache.openjpa.persistence.PersistenceException: SEQUENCE 'EMPLOYEE_SEQ' does not exist. {VALUES NEXT VALUE FOR EMPLOYEE_SEQ} [code=20000, state=42X94]
  </code></pre>
  
  <p>Here is my DDL:</p>
  
  <pre><code>CREATE SEQUENCE EMPLOYEE_SEQ AS INTEGER START WITH 1 INCREMENT BY 1;
  
  CREATE TABLE EMPLOYEE (
      EMPLOYEEID INT PRIMARY KEY,
      FIRSTNAME  VARCHAR(30),
      LASTNAME   VARCHAR(30),
      SALARY     DOUBLE
  );
  </code></pre>
  
  <p>And my JPA code:</p>
  
  <pre><code>@Id
  @SequenceGenerator(name="EMPLOYEE_EMPLOYEEID_GENERATOR", sequenceName="EMPLOYEE_SEQ", allocationSize=1)
  @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="EMPLOYEE_EMPLOYEEID_GENERATOR")
  private int employeeid;
  </code></pre>
  
  <p>And my persistence.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence version="2.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_2_0.xsd"&gt;
      &lt;persistence-unit name="DWGenExJPA" transaction-type="JTA"&gt;
          &lt;jta-data-source&gt;jdbc/employee&lt;/jta-data-source&gt;
          &lt;class&gt;com.xxx.xxx.model.Employee&lt;/class&gt;
           &lt;properties&gt;
              &lt;property name="openjpa.jdbc.DBDictionary" value="derby(NextSequenceQuery=VALUES NEXT VALUE FOR {0})"/&gt;
              &lt;property name="openjpa.Log" value="File=/tmp/org.apache.openjpa.log,DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>Anyone have experience with sequences with derby and openJPA that can help me out would be appreciated.</p>
  
  <p>Thanks, Brian</p>