I've encountered same issue.

Exception in thread "main" org.h2.jdbc.JdbcSQLException: General error: 
"java.lang.RuntimeException: rowCount expected 17483 got 93586 T65.I140" 
[50000-175]

How do I recover out of this?

On Friday, November 6, 2009 at 11:26:31 PM UTC-8, Thomas Mueller wrote:
>
> Hi, 
>
> What is the database URL? What options do you use? Is this using the 
> page store file format? 
>
> Regards, 
> Thomas 
>
>
>
> On Wed, Nov 4, 2009 at 10:31 AM, Carl Sayres <[email protected] 
> <javascript:>> wrote: 
> > 
> > I deleted a few thousand rows, then tried to insert one. Got the 
> > following exception: 
> > 
> > 11-04 04:17:11 jdbc[2]: SQLException 
> > org.h2.jdbc.JdbcSQLException: General error: 
> > java.lang.RuntimeException: rowCount expected 30845 got 31428 
> > PLAYERSEASON.FK_PLAYERSEASON_1_INDEX_B; SQL statement: 
> > insert into public.PlayerSeason (Id, PlayerId, SeasonId, TeamId, 
> > Active, Number, Position, Salary) values (null, ?, ?, ?, ?, ?, ?, ?) 
> > [50000-122] 
> >        at org.h2.message.Message.getSQLException(Message.java:106) 
> >        at org.h2.message.Message.convert(Message.java:283) 
> >        at org.h2.table.TableData.addRow(TableData.java:149) 
> >        at org.h2.command.dml.Insert.insertRows(Insert.java:119) 
> >        at org.h2.command.dml.Insert.update(Insert.java:82) 
> >        at 
> org.h2.command.CommandContainer.update(CommandContainer.java:72) 
> >        at org.h2.command.Command.executeUpdate(Command.java:209) 
> >        at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal 
> > (JdbcPreparedStatement.java:139) 
> >        at org.h2.jdbc.JdbcPreparedStatement.executeUpdate 
> > (JdbcPreparedStatement.java:128) 
> >        at org.hibernate.id.IdentityGenerator 
> > $GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94) 
> >        at 
> org.hibernate.id.insert.AbstractReturningDelegate.performInsert 
> > (AbstractReturningDelegate.java:57) 
> >        at org.hibernate.persister.entity.AbstractEntityPersister.insert 
> > (AbstractEntityPersister.java:2186) 
> >        at org.hibernate.persister.entity.AbstractEntityPersister.insert 
> > (AbstractEntityPersister.java:2666) 
> >        at org.hibernate.action.EntityIdentityInsertAction.execute 
> > (EntityIdentityInsertAction.java:71) 
> >        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279) 
> >        at 
> > org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate 
> > (AbstractSaveEventListener.java:321) 
> >        at org.hibernate.event.def.AbstractSaveEventListener.performSave 
> > (AbstractSaveEventListener.java:204) 
> >        at 
> > org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId 
> > (AbstractSaveEventListener.java:130) 
> >        at 
> > 
> org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId
>  
>
> > (DefaultSaveOrUpdateEventListener.java:210) 
> >        at 
> > 
> org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient 
> > (DefaultSaveOrUpdateEventListener.java:195) 
> >        at 
> > 
> org.hibernate.event.def.DefaultSaveOrUpdateEventListener.performSaveOrUpdate 
>
> > (DefaultSaveOrUpdateEventListener.java:117) 
> >        at 
> > org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate 
> > (DefaultSaveOrUpdateEventListener.java:93) 
> >        at 
> org.hibernate.impl.SessionImpl.fireSaveOrUpdate(SessionImpl.java: 
> > 534) 
> >        at 
> org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:526) 
> >        at 
> org.hibernate.impl.SessionImpl.saveOrUpdate(SessionImpl.java:522) 
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> >        at sun.reflect.NativeMethodAccessorImpl.invoke 
> > (NativeMethodAccessorImpl.java:39) 
> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke 
> > (DelegatingMethodAccessorImpl.java:25) 
> >        at java.lang.reflect.Method.invoke(Method.java:597) 
> >        at org.hibernate.context.ThreadLocalSessionContext 
> > $TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java: 
> > 342) 
> >        at $Proxy0.saveOrUpdate(Unknown Source) 
> >        at 
> com.fastmodel.fastscout.stats.Stats.updatePlayerInfo(Stats.java: 
> > 731) 
> >        at com.fastmodel.fastscout.stats.Stats.updateTeamAndPlayerInfo 
> > (Stats.java:667) 
> >        at com.fastmodel.fastscout.stats.Stats.main(Stats.java:71) 
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
> >        at sun.reflect.NativeMethodAccessorImpl.invoke 
> > (NativeMethodAccessorImpl.java:39) 
> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke 
> > (DelegatingMethodAccessorImpl.java:25) 
> >        at java.lang.reflect.Method.invoke(Method.java:597) 
> >        at 
> com.intellij.rt.execution.application.AppMain.main(AppMain.java: 
> > 90) 
> > Caused by: java.lang.RuntimeException: rowCount expected 30845 got 
> > 31428 PLAYERSEASON.FK_PLAYERSEASON_1_INDEX_B 
> >        at org.h2.message.Message.throwInternalError(Message.java:186) 
> >        at org.h2.table.TableData.checkRowCount(TableData.java:160) 
> >        at org.h2.table.TableData.addRow(TableData.java:131) 
> >        ... 36 more 
> > 
> > > 
> > 
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to