Hi,
First off I'm not sure if the database is corrupted, but I cannot delete
entries from its tables, and it keeps throwing
ArrayIndexOutOfBoundsException errors like:
03-20 10:38:02 jdbc[2]:
/**/stat19.execute("DELETE FROM LOCATORARP WHERE TMSTAMP < '2013-12-12
03:00:04.009'");
03-20 10:38:02 lock: 2 exclusive write lock requesting for LOCATORARP
03-20 10:38:02 lock: 2 exclusive write lock added for LOCATORARP
03-20 10:39:27 jdbc[2]:
/**/Statement stat20 = conn5.createStatement(1004, 1008);
03-20 10:39:29 jdbc[2]:
/**/Statement stat21 = conn5.createStatement(1004, 1008);
03-20 10:39:29 jdbc[2]:
/**/stat21.setMaxRows(1000);
03-20 10:39:29 jdbc[2]:
/**/stat21.execute("SELECT * FROM LOCATORARP");
03-20 10:41:18 lock: 2 exclusive write lock unlock LOCATORARP
03-20 10:41:18 command: slow query: 195,337 ms
03-20 10:41:18 jdbc[2]: exception
org.h2.jdbc.JdbcSQLException: General error:
"java.lang.ArrayIndexOutOfBoundsException: 0"; SQL statement:
DELETE FROM LOCATORARP WHERE TMSTAMP < '2013-12-12 03:00:04.009'
[50000-172]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329)
at org.h2.message.DbException.get(DbException.java:158)
at org.h2.message.DbException.convert(DbException.java:281)
at org.h2.command.Command.executeUpdate(Command.java:239)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:180)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:155)
at org.h2.server.web.WebApp.getResult(WebApp.java:1316)
at org.h2.server.web.WebApp.query(WebApp.java:1005)
at org.h2.server.web.WebApp$1.next(WebApp.java:967)
at org.h2.server.web.WebApp$1.next(WebApp.java:954)
at org.h2.server.web.WebThread.process(WebThread.java:167)
at org.h2.server.web.WebThread.run(WebThread.java:94)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
at org.h2.index.PageDataLeaf.getRowAt(PageDataLeaf.java:329)
at org.h2.index.PageDataCursor.nextRow(PageDataCursor.java:100)
at org.h2.index.PageDataCursor.next(PageDataCursor.java:52)
at org.h2.index.IndexCursor.next(IndexCursor.java:241)
at org.h2.table.TableFilter.next(TableFilter.java:359)
at org.h2.command.dml.Delete.update(Delete.java:71)
at org.h2.command.CommandContainer.update(CommandContainer.java:79)
at org.h2.command.Command.executeUpdate(Command.java:235)
... 9 more
I tried to execute delete single entry, all entries queries but same
ArrayIndexOutOfBoundsException error is thrown.
I had decided to export the database as script using Script tool of
H2Console, yet again same ArrayIndexOutOfBoundsException error was throw.
Next I tried to use the Recover tool, and got a SQL Script file, but wasn't
able to restore the database from that script because of below error:
CREATE UNIQUE INDEX PUBLIC.ARPUNIQUE ON PUBLIC.LOCATORARP(IPADDRESS,
MACADDRESS) [23505-172]
<http://192.168.70.90:8082/tools.do?jsessionid=56abb504016782231f566428dec6e747#>
23505/23505
org.h2.jdbc.JdbcSQLException: Unique index or primary key violation:
"ARPUNIQUE ON PUBLIC.LOCATORARP(IPADDRESS, MACADDRESS)"; SQL statement:
CREATE UNIQUE INDEX PUBLIC.ARPUNIQUE ON PUBLIC.LOCATORARP(IPADDRESS,
MACADDRESS) [23505-172]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:329
<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=329&build=172>
)
at org.h2.message.DbException.get(DbException.java:169
<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=169&build=172>
)
at org.h2.message.DbException.get(DbException.java:146
<http://h2database.com/html/source.html?file=org/h2/message/DbException.java&line=146&build=172>
)
at org.h2.index.BaseIndex.getDuplicateKeyException(BaseIndex.java:83
<http://h2database.com/html/source.html?file=org/h2/index/BaseIndex.java&line=83&build=172>
)
at org.h2.index.PageBtree.find(PageBtree.java:121
<http://h2database.com/html/source.html?file=org/h2/index/PageBtree.java&line=121&build=172>
)
at org.h2.index.PageBtreeLeaf.addRow(PageBtreeLeaf.java:148
<http://h2database.com/html/source.html?file=org/h2/index/PageBtreeLeaf.java&line=148&build=172>
)
at org.h2.index.PageBtreeLeaf.addRowTry(PageBtreeLeaf.java:101
<http://h2database.com/html/source.html?file=org/h2/index/PageBtreeLeaf.java&line=101&build=172>
)
at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:201
<http://h2database.com/html/source.html?file=org/h2/index/PageBtreeNode.java&line=201&build=172>
)
at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:201
<http://h2database.com/html/source.html?file=org/h2/index/PageBtreeNode.java&line=201&build=172>
)
at org.h2.index.PageBtreeNode.addRowTry(PageBtreeNode.java:201
<http://h2database.com/html/source.html?file=org/h2/index/PageBtreeNode.java&line=201&build=172>
)
at org.h2.index.PageBtreeIndex.addRow(PageBtreeIndex.java:104
<http://h2database.com/html/source.html?file=org/h2/index/PageBtreeIndex.java&line=104&build=172>
)
at org.h2.index.PageBtreeIndex.add(PageBtreeIndex.java:95
<http://h2database.com/html/source.html?file=org/h2/index/PageBtreeIndex.java&line=95&build=172>
)
at org.h2.table.RegularTable.addRowsToIndex(RegularTable.java:337
<http://h2database.com/html/source.html?file=org/h2/table/RegularTable.java&line=337&build=172>
)
at org.h2.table.RegularTable.addIndex(RegularTable.java:264
<http://h2database.com/html/source.html?file=org/h2/table/RegularTable.java&line=264&build=172>
)
at org.h2.command.ddl.CreateIndex.update(CreateIndex.java:93
<http://h2database.com/html/source.html?file=org/h2/command/ddl/CreateIndex.java&line=93&build=172>
)
at org.h2.command.CommandContainer.update(CommandContainer.java:79
<http://h2database.com/html/source.html?file=org/h2/command/CommandContainer.java&line=79&build=172>
)
at org.h2.command.Command.executeUpdate(Command.java:235
<http://h2database.com/html/source.html?file=org/h2/command/Command.java&line=235&build=172>
)
at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:180
<http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcStatement.java&line=180&build=172>
)
at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:155
<http://h2database.com/html/source.html?file=org/h2/jdbc/JdbcStatement.java&line=155&build=172>
)
at org.h2.tools.RunScript.process(RunScript.java:255
<http://h2database.com/html/source.html?file=org/h2/tools/RunScript.java&line=255&build=172>
)
at org.h2.tools.RunScript.process(RunScript.java:188
<http://h2database.com/html/source.html?file=org/h2/tools/RunScript.java&line=188&build=172>
)
at org.h2.tools.RunScript.process(RunScript.java:319
<http://h2database.com/html/source.html?file=org/h2/tools/RunScript.java&line=319&build=172>
)
at org.h2.tools.RunScript.runTool(RunScript.java:142
<http://h2database.com/html/source.html?file=org/h2/tools/RunScript.java&line=142&build=172>
)
at org.h2.server.web.WebApp.tools(WebApp.java:390
<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=390&build=172>
)
at org.h2.server.web.WebApp.process(WebApp.java:235
<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=235&build=172>
)
at org.h2.server.web.WebApp.processRequest(WebApp.java:164
<http://h2database.com/html/source.html?file=org/h2/server/web/WebApp.java&line=164&build=172>
)
at org.h2.server.web.WebThread.process(WebThread.java:138
<http://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=138&build=172>
)
at org.h2.server.web.WebThread.run(WebThread.java:94
<http://h2database.com/html/source.html?file=org/h2/server/web/WebThread.java&line=94&build=172>
)
at java.lang.Thread.run(Unknown Source)
So now I'm quite clueless, don't find any other way to cure the database.
Any suggestion would be highly appreciated. Thanks.
P/S: I can send the database but it's pretty big (550MB compressed) so If
you need it then let me know, I'll upload it to an external host so that
you can download.
--
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.