If Cubrid doesn't support the "for update" clause, that's kind of limiting from a locking viewpoint. If you want to try to make more progress, you could try using this command to tell the database dictionary that the "for update" is not supported:
<property name="openjpa.jdbc.DBDictionary" value="SupportsSelectForUpdate=false"/> Eventually, if you are interested, you could define your own "CubridDictionary" with the appropriate default settings and submit that back to OpenJPA as a new dictionary... Thanks, Kevin On Thu, Dec 20, 2012 at 2:11 AM, Michael Szalay <michael.sza...@basis06.ch>wrote: > I tried without generating the schema, but with an existing database > schema I wrote by hand. > I did not configure anything openjpa-specific in persistence.xml, so the > default DBDictionary is used > (I see this in the log). > > I tested the same application with MySQL, that works. > > It seems that its just the "SELECT SEQUENCE_VALUE FROM > OPENJPA_SEQUENCE_TABLE WHERE ID = ? FOR UPDATE" > is the problem, as the "select for update" construct is not supported in > cubrid. > > Regards Michael > > ----- Ursprüngliche Mail ----- > Von: "Kevin Sutter" <kwsut...@gmail.com> > An: users@openjpa.apache.org > Gesendet: Mittwoch, 19. Dezember 2012 16:48:09 > Betreff: Re: Cubrid DB Dictionary? > > Hi Michael, > From what I know, Cubrid is supposed to be SQL-92 compatible and should > work (for the most part) with the default DBDictionary. Looking through > their documentation, they claim to provide some additional features that > may cause some hiccups with any JPA implementation (connection pooling, > object id generation, etc). But, the basic support should be very similar. > > What configuration are you running with in your persistence.xml? > > What kind of testcase(s) are you attempting? Are you pre-defining your > tables, or are you letting OpenJPA generate them? Do these testcases work > with other "supported" open-source databases like MySQL or Postgres? > > On the surface, supporting cubrid doesn't seem out of the question. But, I > don't know much about it. > > Kevin > > On Tue, Dec 11, 2012 at 7:25 AM, Michael Szalay > <michael.sza...@basis06.ch>wrote: > > > Hi all > > > > has anyone managed to use OpenJPA with the Cubrid database? > > I tried it using the default Db Dictionary but I get the following error > > > > Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Syntax: > > syntax error, unexpected $end, expecting OF {SELECT SEQUENCE_VALUE FROM > > OPENJPA_SEQUENCE_TABLE WHERE ID = ? FOR UPDATE} [code=-493, state=null] > > at > > > org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:219) > > at > > > org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:199) > > at > > > org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$000(LoggingConnectionDecorator.java:59) > > at > > > org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:251) > > at > > > org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:133) > > at > > > org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.prepareStatement(ConfiguringConnectionDecorator.java:140) > > at > > > org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:122) > > at > > > org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:449) > > at > > > org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:429) > > at > > > org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:418) > > at > > > org.apache.openjpa.jdbc.kernel.TableJDBCSeq.prepareStatement(TableJDBCSeq.java:807) > > at > > > org.apache.openjpa.jdbc.kernel.TableJDBCSeq.getSequence(TableJDBCSeq.java:546) > > at > > > org.apache.openjpa.jdbc.kernel.TableJDBCSeq.setSequence(TableJDBCSeq.java:588) > > at > > > org.apache.openjpa.jdbc.kernel.TableJDBCSeq$AllocateSequenceRunnable.run(TableJDBCSeq.java:893) > > at > > > org.apache.openjpa.ee.AbstractManagedRuntime.doNonTransactionalWork(AbstractManagedRuntime.java:89) > > at > > > org.apache.openjpa.ee.AutomaticManagedRuntime.doNonTransactionalWork(AutomaticManagedRuntime.java:315) > > at > > > org.apache.openjpa.jdbc.kernel.TableJDBCSeq.allocateSequence(TableJDBCSeq.java:445) > > at > > > org.apache.openjpa.jdbc.kernel.TableJDBCSeq.nextInternal(TableJDBCSeq.java:300) > > at > > > org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.next(AbstractJDBCSeq.java:60) > > ... 83 more > > NestedThrowables: > > cubrid.jdbc.driver.CUBRIDException: Syntax: syntax error, unexpected > $end, > > expecting OF > > at > > > cubrid.jdbc.driver.CUBRIDConnection.createCUBRIDException(CUBRIDConnection.java:829) > > at > > cubrid.jdbc.driver.CUBRIDConnection.prepare(CUBRIDConnection.java:583) > > at > > cubrid.jdbc.driver.CUBRIDConnection.prepare(CUBRIDConnection.java:714) > > at > > > cubrid.jdbc.driver.CUBRIDConnection.prepareStatement(CUBRIDConnection.java:394) > > at > > > org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:135) > > at > > > org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:248) > > at > > > org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:133) > > at > > > org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.prepareStatement(ConfiguringConnectionDecorator.java:140) > > at > > > org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:122) > > at > > > org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:449) > > at > > > org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:429) > > at > > > org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:418) > > at > > > org.apache.openjpa.jdbc.kernel.TableJDBCSeq.prepareStatement(TableJDBCSeq.java:807) > > at > > > org.apache.openjpa.jdbc.kernel.TableJDBCSeq.getSequence(TableJDBCSeq.java:546) > > at > > > org.apache.openjpa.jdbc.kernel.TableJDBCSeq.setSequence(TableJDBCSeq.java:588) > > at > > > org.apache.openjpa.jdbc.kernel.TableJDBCSeq$AllocateSequenceRunnable.run(TableJDBCSeq.java:893) > > at > > > org.apache.openjpa.ee.AbstractManagedRuntime.doNonTransactionalWork(AbstractManagedRuntime.java:89) > > at > > > org.apache.openjpa.ee.AutomaticManagedRuntime.doNonTransactionalWork(AutomaticManagedRuntime.java:315) > > at > > > org.apache.openjpa.jdbc.kernel.TableJDBCSeq.allocateSequence(TableJDBCSeq.java:445) > > at > > > org.apache.openjpa.jdbc.kernel.TableJDBCSeq.nextInternal(TableJDBCSeq.java:300) > > at > > > org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.next(AbstractJDBCSeq.java:60) > > 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:778) > > at > > org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:493) > > at > > org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:469) > > at > > > org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:762) > > at > > > org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:135) > > at > > > org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:600) > > at > > > org.apache.openjpa.kernel.StateManagerImpl.preFlush(StateManagerImpl.java:3023) > > at > > org.apache.openjpa.kernel.PNewState.beforeFlush(PNewState.java:44) > > at > > > org.apache.openjpa.kernel.StateManagerImpl.beforeFlush(StateManagerImpl.java:1042) > > at > org.apache.openjpa.kernel.BrokerImpl.flush(BrokerImpl.java:2114) > > at > > org.apache.openjpa.kernel.BrokerImpl.flushSafe(BrokerImpl.java:2074) > > at > > > org.apache.openjpa.kernel.BrokerImpl.beforeCompletion(BrokerImpl.java:1992) > > at > > > org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:520) > > at > > > org.apache.geronimo.transaction.manager.TransactionImpl.beforeCompletion(TransactionImpl.java:504) > > at > > > org.apache.geronimo.transaction.manager.TransactionImpl.beforePrepare(TransactionImpl.java:407) > > at > > > org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:255) > > at > > > org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252) > > > > Anyone has a hint? > > > > Regards Michael > > >