This was fixed in SVN a little while ago, so it'll be in the next release.
Please test with the nightly build to confirm.

On 2013-05-13 10:29, Flo Schwarz wrote:
Hi,

we are using EclipseLink 2.4.1 as ORM layer and H2 1.3.170 as database.

When we tried to update to the latest H2 version 1.3.171, we got a couple of failing unit tests.

This is the query that is executed by one of our tests:
SELECT DISTINCT t1.ID AS a1, ...
FROM CATEGORYEJB t0, TERMEJB_CATEGORYEJB t2, TERMEJB t1
WHERE (((t0.type = ?) AND (t0.ID = ?)) AND ((t2.TERMEJB_ID = t1.ID) AND (t0.ID = t2.CATEGORIES_ID)))
ORDER BY t1.ID ASC LIMIT ? OFFSET ?

This is the error message:
[EL Warning]: 2013-05-13 09:43:54.977--UnitOfWork(1493807900)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: org.h2.jdbc.JdbcSQLException: General error: "java.lang.IllegalArgumentException: fromIndex(1000) > toIndex(1)"; SQL statement: SELECT DISTINCT t1.ID AS a1,... FROM CATEGORYEJB t0, TERMEJB_CATEGORYEJB t2, TERMEJB t1 WHERE (((t0.type = ?) AND (t0.ID = ?)) AND ((t2.TERMEJB_ID = t1.ID) AND (t0.ID = t2.CATEGORIES_ID))) ORDER BY t1.ID ASC LIMIT ? OFFSET ? [50000-171]
Error Code: 50000
Call: SELECT DISTINCT t1.ID AS a1, ... FROM CATEGORYEJB t0, TERMEJB_CATEGORYEJB t2, TERMEJB t1 WHERE (((t0.type = ?) AND (t0.ID = ?)) AND ((t2.TERMEJB_ID = t1.ID) AND (t0.ID = t2.CATEGORIES_ID))) ORDER BY t1.ID ASC LIMIT ? OFFSET ?
    bind => [4 parameters bound]
Query: ReadAllQuery(referenceClass=TermEjb sql="SELECT DISTINCT t1.ID AS a1,... FROM CATEGORYEJB t0, TERMEJB_CATEGORYEJB t2, TERMEJB t1 WHERE (((t0.type = ?) AND (t0.ID = ?)) AND ((t2.TERMEJB_ID = t1.ID) AND (t0.ID = t2.CATEGORIES_ID))) ORDER BY t1.ID ASC LIMIT ? OFFSET ?")


I can reproduce that the tests fail with version 1.3.170 and succeed with version 1.3.171, without doing any other change to the code. We are using an in-memory database instance for the unit-tests. Meaning that there are not artifacts from previous versions/tests.

Sorry that I can't provide a minimal and executable example. But maybe this information already enables you to find the problem.

best regards,
Felix
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.



--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to