嵌入式数据库和toplink

发布于 2024-09-10 18:50:43 字数 1242 浏览 8 评论 0原文

我正在尝试让 toplink 和 jsqlite 工作。但我收到类似的错误,如下线程: JPA+SQLite 问题

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

我不确定 jsqlite 是否可以与顶部链接,因为我在某处找不到描述..我只需要一个可嵌入的数据库,因此可以使用替代建议,只要它们易于设置即可。

这是 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>

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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

花开雨落又逢春i 2024-09-17 18:50:43

异常描述:
SEQ_GEN_SEQUENCE:平台
数据库平台不支持
本机序列

您是否尝试改用表排序?

有关详细信息,请参阅:

From

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

Did you try to use table sequencing instead?

For more information see:

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文