Hi,

I am using MySQL with SnapShot OpenJPA and would like to create my own Sequence Generator. I am implemented interface "Seq" and when start the application I have the following error:
<openjpa-1.1.0-SNAPSHOT-r420667:603666M fatal store error> org.apache.openjpa.persistence.RollbackException: Error instantiating named sequence "test.DataObjectsGenerator": Your database dictionary does not support native sequences.  To tell the dictionary how to select sequence values, use:
openjpa.jdbc.DBDictionary: NextSequenceQuery="SELECT NEXT VALUE FOR {0}"
Where the above string is replaced with the proper SQL for your database.
        at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:490)
        at test.DesktopApplication7View.<init>(DesktopApplication7View.java:124)
        at test.DesktopApplication7.startup(DesktopApplication7.java:21)
        at org.jdesktop.application.Application$1.run(Application.java:171)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: <openjpa-1.1.0-SNAPSHOT-r420667:603666M fatal user error> org.apache.openjpa.persistence.ArgumentException: Error instantiating named sequence "test.DataObjectsGenerator": Your database dictionary does not support native sequences.  To tell the dictionary how to select sequence values, use:
openjpa.jdbc.DBDictionary: NextSequenceQuery="SELECT NEXT VALUE FOR {0}"
Where the above string is replaced with the proper SQL for your database.
        at org.apache.openjpa.jdbc.kernel.NativeJDBCSeq.endConfiguration(NativeJDBCSeq.java:196)
        at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:505)
        at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:430)
        at org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:410)
        at org.apache.openjpa.meta.SequenceMetaData.instantiate(SequenceMetaData.java:271)
        at org.apache.openjpa.meta.SequenceMetaData.getInstance(SequenceMetaData.java:241)
        at org.apache.openjpa.util.ImplHelper.generateValue(ImplHelper.java:160)
        at org.apache.openjpa.util.ImplHelper.generateFieldValue(ImplHelper.java:144)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignField(JDBCStoreManager.java:557)
        at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:466)
        at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:442)
        at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:541)
        at org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134)
        at org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:519)
        at org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2796)
        at org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39)
        at org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:958)
        at org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1923)
        at org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1883)
        at org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1801)
        at org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)
        at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1325)
        at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:861)
        at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:479)
        ... 11 more
2007-12-15 18:33:12 org.jdesktop.application.Application$1 run
SEVERE: Application class test.DesktopApplication7 failed to launch
<openjpa-1.1.0-SNAPSHOT-r420667:603666M nonfatal user error> org.apache.openjpa.persistence.InvalidStateException: Can only perform operation while a transaction is active.
        at org.apache.openjpa.kernel.BrokerImpl.assertTransactionOperation(BrokerImpl.java:4348)
        at org.apache.openjpa.kernel.BrokerImpl.rollback(BrokerImpl.java:1342)
        at org.apache.openjpa.kernel.DelegatingBroker.rollback(DelegatingBroker.java:869)
        at org.apache.openjpa.persistence.EntityManagerImpl.rollback(EntityManagerImpl.java:495)
        at test.DesktopApplication7View.<init>(DesktopApplication7View.java:129)
        at test.DesktopApplication7.startup(DesktopApplication7.java:21)
        at org.jdesktop.application.Application$1.run(Application.java:171)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Exception in thread "AWT-EventQueue-0" java.lang.Error: Application class test.DesktopApplication7 failed to launch
        at org.jdesktop.application.Application$1.run(Application.java:177)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
Caused by: <openjpa-1.1.0-SNAPSHOT-r420667:603666M nonfatal user error> org.apache.openjpa.persistence.InvalidStateException: Can only perform operation while a transaction is active.
        at org.apache.openjpa.kernel.BrokerImpl.assertTransactionOperation(BrokerImpl.java:4348)
        at org.apache.openjpa.kernel.BrokerImpl.rollback(BrokerImpl.java:1342)
        at org.apache.openjpa.kernel.DelegatingBroker.rollback(DelegatingBroker.java:869)
        at org.apache.openjpa.persistence.EntityManagerImpl.rollback(EntityManagerImpl.java:495)
        at test.DesktopApplication7View.<init>(DesktopApplication7View.java:129)
        at test.DesktopApplication7.startup(DesktopApplication7.java:21)
        at org.jdesktop.application.Application$1.run(Application.java:171)
        ... 8 more


Any suggestions now to solve that?


Regards,
Miro.