Can you make this error occur in a new database, one which hasn't already exhausted the ranges of its identity columns and sequence generators? If you can, then I recommend the following next steps:

1) Open a JIRA issue for this problem.

2) Run your application. Make sure that you boot the JVM with the following system properties so that Derby will snapshot statements and errors to derby.log:


3) After you have tripped the problem, attach derby.log to the JIRA issue so that we can examine it.


On 4/9/18 7:08 AM, palo.liska wrote:
Rick Hillegas-3 wrote
Technically, Hibernate should not be calling getGeneratedKeys() because
Derby's DatabaseMetaData says that the method is not supported. But
whoever wrote the porting layer on top of Derby must have cribbed the
code from another database which does support that method. Derby should
raise an exception when that method is called, or Derby should fix the
implementation of getGeneratedKeys(). So you are caught between bugs in
two layers: Hibernate and Derby.
hibernate has property hibernate.jdbc.use_get_generated_keys, which for
DerbyTenSevenDialect is false (that my case). Hibernate is therefor
generating insert like this:
"insert into Table (id, value) values (default, 'value')". So I would not
blame hibernate.

Sent from:

Reply via email to