You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Rick Curtis (JIRA)" <ji...@apache.org> on 2011/03/02 17:24:36 UTC

[jira] Created: (OPENJPA-1954) ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass

ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass
---------------------------------------------------------------------------------------------

                 Key: OPENJPA-1954
                 URL: https://issues.apache.org/jira/browse/OPENJPA-1954
             Project: OpenJPA
          Issue Type: Bug
          Components: kernel
    Affects Versions: 2.1.0, 2.0.0, 1.2.2, 2.2.0
            Reporter: Rick Curtis
            Assignee: Rick Curtis
             Fix For: 2.2.0


This is a problem that was reported on the users mailing list[1].

[1] http://openjpa.markmail.org/thread/qvcducd52vgrhone

<openjpa-2.2.0-SNAPSHOT-r422266:1061583M nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Failed to execute query "SELECT s FROM TimestampedEntity s WHERE s.version < :endDate". Check the query syntax for correctness. See nested exception for details.
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:872)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:305)
	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:321)
	at org.apache.openjpa.persistence.jdbc.update.TestTimestampVersion.test(TestTimestampVersion.java:50)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:600)
	at junit.framework.TestCase.runTest(TestCase.java:154)
	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runTest(AbstractPersistenceTestCase.java:579)
	at junit.framework.TestCase.runBare(TestCase.java:127)
	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:566)
	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:542)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:118)
	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:206)
	at junit.framework.TestSuite.runTest(TestSuite.java:208)
	at junit.framework.TestSuite.run(TestSuite.java:203)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
	at org.apache.openjpa.jdbc.kernel.exps.PCPath.appendTo(PCPath.java:995)
	at org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(FilterValueImpl.java:63)
	at org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(FilterValueImpl.java:59)
	at org.apache.openjpa.jdbc.sql.DBDictionary.comparison(DBDictionary.java:2910)
	at org.apache.openjpa.jdbc.kernel.exps.CompareExpression.appendTo(CompareExpression.java:75)
	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.buildWhere(SelectConstructor.java:312)
	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:94)
	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:361)
	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:193)
	at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:782)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1005)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
	... 27 more



-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (OPENJPA-1954) ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-1954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001631#comment-13001631 ] 

Rick Curtis commented on OPENJPA-1954:
--------------------------------------

Fixed FieldMapping and DBDictionary to use defining metadata rather than declared metadata to get the version.

> ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass
> ---------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1954
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1954
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.2, 2.0.0, 2.1.0, 2.2.0
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.2.0
>
>         Attachments: openjpa-1954.jar, openjpa-1954.jar
>
>
> This is a problem that was reported on the users mailing list[1].
> [1] http://openjpa.markmail.org/thread/qvcducd52vgrhone
> <openjpa-2.2.0-SNAPSHOT-r422266:1061583M nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Failed to execute query "SELECT s FROM TimestampedEntity s WHERE s.version < :endDate". Check the query syntax for correctness. See nested exception for details.
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:872)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
> 	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
> 	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:305)
> 	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:321)
> 	at org.apache.openjpa.persistence.jdbc.update.TestTimestampVersion.test(TestTimestampVersion.java:50)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:600)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runTest(AbstractPersistenceTestCase.java:579)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:566)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:542)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:206)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
> 	at org.apache.openjpa.jdbc.kernel.exps.PCPath.appendTo(PCPath.java:995)
> 	at org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(FilterValueImpl.java:63)
> 	at org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(FilterValueImpl.java:59)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.comparison(DBDictionary.java:2910)
> 	at org.apache.openjpa.jdbc.kernel.exps.CompareExpression.appendTo(CompareExpression.java:75)
> 	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.buildWhere(SelectConstructor.java:312)
> 	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:94)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:361)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:193)
> 	at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:782)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1005)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
> 	... 27 more

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OPENJPA-1954) ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Curtis updated OPENJPA-1954:
---------------------------------

    Attachment: openjpa-1954.jar

Attaching a jar with the required change.

> ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass
> ---------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1954
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1954
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.2, 2.0.0, 2.1.0, 2.2.0
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.2.0
>
>         Attachments: openjpa-1954.jar, openjpa-1954.jar
>
>
> This is a problem that was reported on the users mailing list[1].
> [1] http://openjpa.markmail.org/thread/qvcducd52vgrhone
> <openjpa-2.2.0-SNAPSHOT-r422266:1061583M nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Failed to execute query "SELECT s FROM TimestampedEntity s WHERE s.version < :endDate". Check the query syntax for correctness. See nested exception for details.
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:872)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
> 	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
> 	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:305)
> 	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:321)
> 	at org.apache.openjpa.persistence.jdbc.update.TestTimestampVersion.test(TestTimestampVersion.java:50)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:600)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runTest(AbstractPersistenceTestCase.java:579)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:566)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:542)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:206)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
> 	at org.apache.openjpa.jdbc.kernel.exps.PCPath.appendTo(PCPath.java:995)
> 	at org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(FilterValueImpl.java:63)
> 	at org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(FilterValueImpl.java:59)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.comparison(DBDictionary.java:2910)
> 	at org.apache.openjpa.jdbc.kernel.exps.CompareExpression.appendTo(CompareExpression.java:75)
> 	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.buildWhere(SelectConstructor.java:312)
> 	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:94)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:361)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:193)
> 	at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:782)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1005)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
> 	... 27 more

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (OPENJPA-1954) ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Curtis updated OPENJPA-1954:
---------------------------------

    Attachment: openjpa-1954.jar

Uploading patch.

> ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass
> ---------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1954
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1954
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.2, 2.0.0, 2.1.0, 2.2.0
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.2.0
>
>         Attachments: openjpa-1954.jar, openjpa-1954.jar
>
>
> This is a problem that was reported on the users mailing list[1].
> [1] http://openjpa.markmail.org/thread/qvcducd52vgrhone
> <openjpa-2.2.0-SNAPSHOT-r422266:1061583M nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Failed to execute query "SELECT s FROM TimestampedEntity s WHERE s.version < :endDate". Check the query syntax for correctness. See nested exception for details.
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:872)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
> 	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
> 	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:305)
> 	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:321)
> 	at org.apache.openjpa.persistence.jdbc.update.TestTimestampVersion.test(TestTimestampVersion.java:50)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:600)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runTest(AbstractPersistenceTestCase.java:579)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:566)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:542)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:206)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
> 	at org.apache.openjpa.jdbc.kernel.exps.PCPath.appendTo(PCPath.java:995)
> 	at org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(FilterValueImpl.java:63)
> 	at org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(FilterValueImpl.java:59)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.comparison(DBDictionary.java:2910)
> 	at org.apache.openjpa.jdbc.kernel.exps.CompareExpression.appendTo(CompareExpression.java:75)
> 	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.buildWhere(SelectConstructor.java:312)
> 	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:94)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:361)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:193)
> 	at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:782)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1005)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
> 	... 27 more

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (OPENJPA-1954) ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Curtis resolved OPENJPA-1954.
----------------------------------

    Resolution: Fixed

Committed revision 1076370 to trunk.

> ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass
> ---------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1954
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1954
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.2, 2.0.0, 2.1.0, 2.2.0
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.2.0
>
>         Attachments: openjpa-1954.jar, openjpa-1954.jar
>
>
> This is a problem that was reported on the users mailing list[1].
> [1] http://openjpa.markmail.org/thread/qvcducd52vgrhone
> <openjpa-2.2.0-SNAPSHOT-r422266:1061583M nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Failed to execute query "SELECT s FROM TimestampedEntity s WHERE s.version < :endDate". Check the query syntax for correctness. See nested exception for details.
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:872)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
> 	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
> 	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:305)
> 	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:321)
> 	at org.apache.openjpa.persistence.jdbc.update.TestTimestampVersion.test(TestTimestampVersion.java:50)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:600)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runTest(AbstractPersistenceTestCase.java:579)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:566)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:542)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:206)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
> 	at org.apache.openjpa.jdbc.kernel.exps.PCPath.appendTo(PCPath.java:995)
> 	at org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(FilterValueImpl.java:63)
> 	at org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(FilterValueImpl.java:59)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.comparison(DBDictionary.java:2910)
> 	at org.apache.openjpa.jdbc.kernel.exps.CompareExpression.appendTo(CompareExpression.java:75)
> 	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.buildWhere(SelectConstructor.java:312)
> 	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:94)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:361)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:193)
> 	at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:782)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1005)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
> 	... 27 more

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (OPENJPA-1954) ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass

Posted by "Rick Curtis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-1954?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rick Curtis closed OPENJPA-1954.
--------------------------------


Closing resolved issues.

> ArrayIndexOutOfBoundsException when querying on a version field that is in a MappedSuperclass
> ---------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1954
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1954
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.2.2, 2.0.0, 2.1.0, 2.2.0
>            Reporter: Rick Curtis
>            Assignee: Rick Curtis
>             Fix For: 2.2.0
>
>         Attachments: openjpa-1954.jar, openjpa-1954.jar
>
>
> This is a problem that was reported on the users mailing list[1].
> [1] http://openjpa.markmail.org/thread/qvcducd52vgrhone
> <openjpa-2.2.0-SNAPSHOT-r422266:1061583M nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Failed to execute query "SELECT s FROM TimestampedEntity s WHERE s.version < :endDate". Check the query syntax for correctness. See nested exception for details.
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:872)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:794)
> 	at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
> 	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:305)
> 	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:321)
> 	at org.apache.openjpa.persistence.jdbc.update.TestTimestampVersion.test(TestTimestampVersion.java:50)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:600)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runTest(AbstractPersistenceTestCase.java:579)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:566)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.runBare(AbstractPersistenceTestCase.java:542)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at org.apache.openjpa.persistence.test.AbstractPersistenceTestCase.run(AbstractPersistenceTestCase.java:206)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> 	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 0
> 	at org.apache.openjpa.jdbc.kernel.exps.PCPath.appendTo(PCPath.java:995)
> 	at org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(FilterValueImpl.java:63)
> 	at org.apache.openjpa.jdbc.kernel.exps.FilterValueImpl.appendTo(FilterValueImpl.java:59)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.comparison(DBDictionary.java:2910)
> 	at org.apache.openjpa.jdbc.kernel.exps.CompareExpression.appendTo(CompareExpression.java:75)
> 	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.buildWhere(SelectConstructor.java:312)
> 	at org.apache.openjpa.jdbc.kernel.exps.SelectConstructor.evaluate(SelectConstructor.java:94)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.createWhereSelects(JDBCStoreQuery.java:361)
> 	at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeQuery(JDBCStoreQuery.java:193)
> 	at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeQuery(ExpressionStoreQuery.java:782)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1005)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
> 	... 27 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira