Sequence "SEQ_GEN_SEQUENCE" not found;

1,127 views
Skip to first unread message

Barton

unread,
Oct 24, 2010, 1:22:50 AM10/24/10
to H2 Database
I am in the process of replacing MySql with H2 and having problems
with IDENTITY column.


I am using H2 with Netbeans CRUD generation. I followed the advice
here:

http://h2database.com/html/tutorial.html#using_toplink

and used the updated version from

http://blog.marciowb.net/blog/2008_08_01_

I am *not* using GlassFish - this is a standalone desktop application.

When I try to create a NEW instance, my error is:

[TopLink Warning]: 2010.10.23 11:52:08.976--ClientSession(1099518668)--
Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build
b09d-fcs (12/06/2007))):
oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: org.h2.jdbc.JdbcSQLException: Sequence
"SEQ_GEN_SEQUENCE" not found; SQL statement:
CALL NEXT VALUE FOR SEQ_GEN_SEQUENCE [90036-144]
at
org.h2.message.DbException.getJdbcSQLException(DbException.java:327)

I assume SEQ_GEN_SEQUENCE needs to be created. Does anyone have DDL
for SEQ_GEN_SEQUENCE I could use?

Barton

Thomas Mueller

unread,
Oct 27, 2010, 1:12:38 AM10/27/10
to h2-da...@googlegroups.com
Hi,

I don't really know Netbeans or EclipseLink (you are using EclipseLink
right?). I guess you should try to find the solution to your problem
there (use Google and search for SEQ_GEN_SEQUENCE).

http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Basic_JPA_Development/Mapping/Entity/GeneratedValue

> I assume SEQ_GEN_SEQUENCE needs to be created. Does anyone have DDL
> for SEQ_GEN_SEQUENCE I could use?

You could try:
CREATE SEQUENCE SEQ_GEN_SEQUENCE.

but I guess it's a config error.

Regards,
Thomas

Thomas Mueller

unread,
Oct 27, 2010, 1:13:26 AM10/27/10
to h2-da...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages