openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miroslav Nachev <m...@space-comm.com>
Subject Error instantiating named sequence "test.DataObjectsGenerator"
Date Sat, 15 Dec 2007 16:40:53 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
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:<br>
&lt;openjpa-1.1.0-SNAPSHOT-r420667:603666M fatal store error&gt;
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:<br>
openjpa.jdbc.DBDictionary: NextSequenceQuery="SELECT NEXT VALUE FOR {0}"<br>
Where the above string is replaced with the proper SQL for your
database.<br>
        at
org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:490)<br>
        at
test.DesktopApplication7View.&lt;init&gt;(DesktopApplication7View.java:124)<br>
        at test.DesktopApplication7.startup(DesktopApplication7.java:21)<br>
        at
org.jdesktop.application.Application$1.run(Application.java:171)<br>
        at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)<br>
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)<br>
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)<br>
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)<br>
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)<br>
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)<br>
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)<br>
        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:121)<br>
Caused by: &lt;openjpa-1.1.0-SNAPSHOT-r420667:603666M fatal user
error&gt; 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:<br>
openjpa.jdbc.DBDictionary: NextSequenceQuery="SELECT NEXT VALUE FOR {0}"<br>
Where the above string is replaced with the proper SQL for your
database.<br>
        at
org.apache.openjpa.jdbc.kernel.NativeJDBCSeq.endConfiguration(NativeJDBCSeq.java:196)<br>
        at
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:505)<br>
        at
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:430)<br>
        at
org.apache.openjpa.lib.conf.Configurations.configureInstance(Configurations.java:410)<br>
        at
org.apache.openjpa.meta.SequenceMetaData.instantiate(SequenceMetaData.java:271)<br>
        at
org.apache.openjpa.meta.SequenceMetaData.getInstance(SequenceMetaData.java:241)<br>
        at
org.apache.openjpa.util.ImplHelper.generateValue(ImplHelper.java:160)<br>
        at
org.apache.openjpa.util.ImplHelper.generateFieldValue(ImplHelper.java:144)<br>
        at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignField(JDBCStoreManager.java:557)<br>
        at
org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:466)<br>
        at
org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:442)<br>
        at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:541)<br>
        at
org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134)<br>
        at
org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:519)<br>
        at
org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:2796)<br>
        at
org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:39)<br>
        at
org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:958)<br>
        at
org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:1923)<br>
        at
org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:1883)<br>
        at
org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1801)<br>
        at
org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:81)<br>
        at
org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1325)<br>
        at
org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:861)<br>
        at
org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:479)<br>
        ... 11 more<br>
2007-12-15 18:33:12 org.jdesktop.application.Application$1 run<br>
SEVERE: Application class test.DesktopApplication7 failed to launch<br>
&lt;openjpa-1.1.0-SNAPSHOT-r420667:603666M nonfatal user error&gt;
org.apache.openjpa.persistence.InvalidStateException: Can only perform
operation while a transaction is active.<br>
        at
org.apache.openjpa.kernel.BrokerImpl.assertTransactionOperation(BrokerImpl.java:4348)<br>
        at
org.apache.openjpa.kernel.BrokerImpl.rollback(BrokerImpl.java:1342)<br>
        at
org.apache.openjpa.kernel.DelegatingBroker.rollback(DelegatingBroker.java:869)<br>
        at
org.apache.openjpa.persistence.EntityManagerImpl.rollback(EntityManagerImpl.java:495)<br>
        at
test.DesktopApplication7View.&lt;init&gt;(DesktopApplication7View.java:129)<br>
        at test.DesktopApplication7.startup(DesktopApplication7.java:21)<br>
        at
org.jdesktop.application.Application$1.run(Application.java:171)<br>
        at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)<br>
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)<br>
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)<br>
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)<br>
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)<br>
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)<br>
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)<br>
        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:121)<br>
Exception in thread "AWT-EventQueue-0" java.lang.Error: Application
class test.DesktopApplication7 failed to launch<br>
        at
org.jdesktop.application.Application$1.run(Application.java:177)<br>
        at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)<br>
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)<br>
        at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)<br>
        at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)<br>
        at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)<br>
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)<br>
        at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)<br>
        at
java.awt.EventDispatchThread.run(EventDispatchThread.java:121)<br>
Caused by: &lt;openjpa-1.1.0-SNAPSHOT-r420667:603666M nonfatal user
error&gt; org.apache.openjpa.persistence.InvalidStateException: Can
only perform operation while a transaction is active.<br>
        at
org.apache.openjpa.kernel.BrokerImpl.assertTransactionOperation(BrokerImpl.java:4348)<br>
        at
org.apache.openjpa.kernel.BrokerImpl.rollback(BrokerImpl.java:1342)<br>
        at
org.apache.openjpa.kernel.DelegatingBroker.rollback(DelegatingBroker.java:869)<br>
        at
org.apache.openjpa.persistence.EntityManagerImpl.rollback(EntityManagerImpl.java:495)<br>
        at
test.DesktopApplication7View.&lt;init&gt;(DesktopApplication7View.java:129)<br>
        at test.DesktopApplication7.startup(DesktopApplication7.java:21)<br>
        at
org.jdesktop.application.Application$1.run(Application.java:171)<br>
        ... 8 more<br>
<br>
<br>
<b>Any suggestions now to solve that?</b><br>
<br>
<br>
Regards,<br>
Miro.<br>
</body>
</html>

Mime
View raw message