I wanted to run a debugger over the H2 source today but haven't been
able to reproduce this bug. Seems like something undeterministic is
going on. This is also corroborated by the fact that the problem last
week occurred with different selections for different database
instances. So, Last week I had the problem three times in a row, each
time starting a DB from scratch and now I can't reproduce it. I
realise this is probably to vague for anyone in the group to says
something useful about, nevertheless, I want to ask if anyone has any
input?

regards, Vasco


On Sat, Mar 17, 2012 at 8:23 PM, Vasco Visser <[email protected]> wrote:
> Hi,
>
> I'm getting an ArrayIndexOutOfBoundsException in both 1.3.162 and 1.3.164:
>
> 03-17 19:33:32 jdbc[2]: exception
> org.h2.jdbc.JdbcSQLException: General error:
> "java.lang.ArrayIndexOutOfBoundsException: 0"; SQL statement:
> SELECT * FROM "SYS_2003652629_mc" ORDER BY "p_T1_ORG_NAME_edi" DESC 
> [50000-164]
>        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.executeQuery(Command.java:191)
>        at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:173)
>        at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:152)
>        at org.h2.server.web.WebApp.getResult(WebApp.java:1311)
>        at org.h2.server.web.WebApp.query(WebApp.java:1001)
>        at org.h2.server.web.WebApp$1.next(WebApp.java:964)
>        at org.h2.server.web.WebApp$1.next(WebApp.java:967)
>        at org.h2.server.web.WebThread.process(WebThread.java:166)
>        at org.h2.server.web.WebThread.run(WebThread.java:93)
>        at java.lang.Thread.run(Thread.java:662)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
>        at org.h2.index.PageDataLeaf.getRowAt(PageDataLeaf.java:327)
>        at org.h2.index.PageDataCursor.nextRow(PageDataCursor.java:97)
>        at org.h2.index.PageDataCursor.next(PageDataCursor.java:49)
>        at org.h2.index.IndexCursor.next(IndexCursor.java:238)
>        at org.h2.table.TableFilter.next(TableFilter.java:353)
>        at org.h2.command.dml.Select.queryFlat(Select.java:513)
>        at org.h2.command.dml.Select.queryWithoutCache(Select.java:618)
>        at org.h2.command.dml.Query.query(Query.java:297)
>        at org.h2.command.dml.Query.query(Query.java:267)
>        at org.h2.command.dml.Query.query(Query.java:36)
>        at org.h2.command.CommandContainer.query(CommandContainer.java:82)
>        at org.h2.command.Command.executeQuery(Command.java:187)
>        ... 9 more
>
>
> I haven't been able to reproduce on simple data. The table has 1
> million rows and about 160 cols. About fifty cols are varchar(255), 10
> cols Integer and the rest is tinyint (at this point all null values).
> There is a one field auto increment primary key.
>
> I noticed that the reducing the size of the selection enough makes
> that the problem does not occur. I also noticed that the actual size
> of the selection starting from which the problem occurs various for
> different instances of the database (building the table multiple
> times, each time with the same content). Also important is that the
> order by seems not relevant at all, that is, the problem also occurs
> when selecting without ordering (I used a query with an order by
> because the web interface has an implicit limit which makes the
> problem not occur without the order by). The data I use cannot be
> posted in the group. If this is a bug in H2 and you need anything from
> me wrt the data used, then please contact me directly.
>
> Kind regards,
>
> Vasco Visser

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to