Hi.

We have a situation with a corrupt database causing NullPointerException on 
select.
It's a very simple database with one table and one index. The database is 
written using version 1.4.185, and cannot be read by that version or 
1.4.191.
The database file was roughly 2.5 gb, but I deleted all records after the 
"problem record" and compacted the database. 
(The issue still exist in the compacted file.)
We are using single threaded access to this database.

The following query causes NPE:
"SELECT * FROM ParameterValue WHERE groupId = 4324074".

I'm attaching the database file.

Hopefully this can be fixed.

/Mikael

Stacktrace follows:
SELECT * FROM ParameterValue WHERE groupId = ? [50000-191]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:345)
at org.h2.message.DbException.get(DbException.java:168)
at org.h2.message.DbException.convert(DbException.java:295)
at org.h2.command.Command.executeQuery(Command.java:213)
at 
org.h2.jdbc.JdbcPreparedStatement.executeQuery(JdbcPreparedStatement.java:110)
at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at 
scalikejdbc.StatementExecutor$$anonfun$executeQuery$1.apply(StatementExecutor.scala:337)
at 
scalikejdbc.StatementExecutor$$anonfun$executeQuery$1.apply(StatementExecutor.scala:337)
at 
scalikejdbc.StatementExecutor$NakedExecutor.apply(StatementExecutor.scala:33)
at 
scalikejdbc.StatementExecutor$$anon$1.scalikejdbc$StatementExecutor$LoggingSQLAndTiming$$super$apply(StatementExecutor.scala:321)
at 
scalikejdbc.StatementExecutor$LoggingSQLAndTiming$class.apply(StatementExecutor.scala:265)
at 
scalikejdbc.StatementExecutor$$anon$1.scalikejdbc$StatementExecutor$LoggingSQLIfFailed$$super$apply(StatementExecutor.scala:321)
at 
scalikejdbc.StatementExecutor$LoggingSQLIfFailed$class.apply(StatementExecutor.scala:298)
at scalikejdbc.StatementExecutor$$anon$1.apply(StatementExecutor.scala:321)
at scalikejdbc.StatementExecutor.executeQuery(StatementExecutor.scala:337)
at scalikejdbc.DBSession$$anonfun$traversable$1.apply(DBSession.scala:295)
at scalikejdbc.DBSession$$anonfun$traversable$1.apply(DBSession.scala:295)
at scalikejdbc.LoanPattern$class.using(LoanPattern.scala:33)
at 
scalikejdbc.ActiveSession.scalikejdbc$DBSession$$super$using(DBSession.scala:546)
at scalikejdbc.DBSession$class.using(DBSession.scala:42)
at scalikejdbc.ActiveSession.using(DBSession.scala:546)
at scalikejdbc.DBSession$class.traversable(DBSession.scala:294)
at scalikejdbc.ActiveSession.traversable(DBSession.scala:546)
at scalikejdbc.DBSession$class.list(DBSession.scala:250)
at scalikejdbc.ActiveSession.list(DBSession.scala:546)
at scalikejdbc.SQLToList$class.apply(SQL.scala:618)
at scalikejdbc.SQLToListImpl.apply(SQL.scala:630)
at blueflow.connector.TestValoDB$$anonfun$1.apply(TestValoDB.scala:33)
at blueflow.connector.TestValoDB$$anonfun$1.apply(TestValoDB.scala:26)
at scalikejdbc.DBConnection$class.readOnly(DBConnection.scala:206)
at scalikejdbc.DB.readOnly(DB.scala:75)
at scalikejdbc.DB$$anonfun$readOnly$1.apply(DB.scala:188)
at scalikejdbc.DB$$anonfun$readOnly$1.apply(DB.scala:187)
at scalikejdbc.LoanPattern$class.using(LoanPattern.scala:33)
at scalikejdbc.DB$.using(DB.scala:153)
at scalikejdbc.DB$.readOnly(DB.scala:187)
at blueflow.connector.TestValoDB$.main(TestValoDB.scala:26)
at blueflow.connector.TestValoDB.main(TestValoDB.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.NullPointerException
at org.h2.mvstore.db.MVPrimaryIndex.getRow(MVPrimaryIndex.java:212)
at org.h2.mvstore.db.MVTable.getRow(MVTable.java:463)
at 
org.h2.mvstore.db.MVSecondaryIndex$MVStoreCursor.get(MVSecondaryIndex.java:487)
at org.h2.index.IndexCursor.get(IndexCursor.java:288)
at org.h2.table.TableFilter.getValue(TableFilter.java:1059)
at org.h2.expression.ExpressionColumn.getValue(ExpressionColumn.java:186)
at org.h2.command.dml.Select.queryFlat(Select.java:548)
at org.h2.command.dml.Select.queryWithoutCache(Select.java:654)
at org.h2.command.dml.Query.query(Query.java:341)
at org.h2.command.dml.Query.query(Query.java:309)
at org.h2.command.dml.Query.query(Query.java:36)
at org.h2.command.CommandContainer.query(CommandContainer.java:110)
at org.h2.command.Command.executeQuery(Command.java:201)
... 40 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 h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Attachment: parameter-store.mv.db
Description: Binary data

Reply via email to