嵌入式数据库和toplink
我正在尝试让 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从
您是否尝试改用表排序?
有关详细信息,请参阅:
From
Did you try to use table sequencing instead?
For more information see: