OPENJPA_SEQUENCE_TABLE Problem When Using OpenJPA in WebLogic (Doc ID 1275356.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle Weblogic Server - Version 10.0 to 10.3.6
Information in this document applies to any platform.
***Checked for relevance on 7-Aug-2013***

Symptoms

In an EJB 3 application, an entity has the following annotation: 
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "BID_ID")
    public Long getBidId() {
        return bidId;
    }
OpenJPA comes with WebLogic server 10 and 11g by default as the JPA 1 implementation.

When attempting to persist the entity by  running an EJB3 application using OpenJPA, the below error occurs.

<openjpa-1.1.1-SNAPSHOT-r422266:891341 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Attempt to update the sequence table "OPENJPA_SEQUENCE_TABLE" failed. The sequence table is typically created when you run the mappingtool's refresh action on any datastore identity class. If you have not run the mappingtool but want to create the sequence table, run: java org.apache.openjpa.jdbc.kernel.TableJDBCSeq -action add; nested exception is: <openjpa-1.1.1-SNAPSHOT-r422266:891341 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Attempt to update the sequence table "OPENJPA_SEQUENCE_TABLE" failed. The sequence table is typically created when you run the mappingtool's refresh action on any datastore identity class. If you have not run the mappingtool but want to create the sequence table, run:
java org.apache.openjpa.jdbc.kernel.TableJDBCSeq -action add

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms