开发者

Embeddable databases and toplink

开发者 https://www.devze.com 2023-01-08 06:25 出处:网络
I\'m trying to get toplink and jsqlite to work. But I get a similar error like this thread: JPA+SQLite problem

I'm trying to get toplink and jsqlite to work. But I get a similar error like this thread: JPA+SQLite problem

Exception Description: SEQ_GEN_SEQUENCE: platform DatabasePlatform doesn't support NativeSequence.

I'm not sure it jsqlite even works with toplink, since I couldn't find a description somewhere.. I just need an embeddable database, so alternative suggestions are available, as long as they are easy to set up.

Here is the persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.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_1_0.xsd">
  <persistence-unit name="myPU" transaction-type="RESOURCE_LOCAL">

    <provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
    <class>..</class>
    <properties>
      <property name="toplink.jdbc.url" value="jdbc:sqlite:blah.db"/>
      <property name="toplink.jdbc.driver" value="org.sqlite.JDBC"/>
开发者_运维百科      <property name="toplink.ddl-generation" value="create-tables"/>
    </properties>

  </persistence-unit>
</persistence>


From

Exception Description: SEQ_GEN_SEQUENCE: platform DatabasePlatform doesn't support NativeSequence

Did you try to use table sequencing instead?

For more information see:

  • http://wiki.eclipse.org/Introduction_to_Relational_Projects_%28ELUG%29#Table_Sequencing
  • http://wiki.eclipse.org/Introduction_to_EclipseLink_JPA_(ELUG)#Configuring_Sequence_Generation
0

精彩评论

暂无评论...
验证码 换一张
取 消