You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Fay Wang (JIRA)" <ji...@apache.org> on 2010/11/04 19:26:42 UTC
[jira] Assigned: (OPENJPA-1810) ClassCastException when using
QueryCache and Criteria API
[ https://issues.apache.org/jira/browse/OPENJPA-1810?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fay Wang reassigned OPENJPA-1810:
---------------------------------
Assignee: Fay Wang
> ClassCastException when using QueryCache and Criteria API
> ---------------------------------------------------------
>
> Key: OPENJPA-1810
> URL: https://issues.apache.org/jira/browse/OPENJPA-1810
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache
> Affects Versions: 2.0.1, 2.1.0
> Reporter: Rick Curtis
> Assignee: Fay Wang
> Attachments: OPENJPA-1810.test.patch
>
>
> I found a ClassCastException when using the COUNT function, the criteria API, and the QueryCache is enabled. I'll post a simple unit test shortly.
> <openjpa-2.1.0-SNAPSHOT-r422266:984243 nonfatal user error> org.apache.openjpa.persistence.ArgumentException: Failed to execute query "null". Check the query syntax for correctness. See nested exception for details.
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:870)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:792)
> at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:542)
> at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:288)
> at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:302)
> at org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:326)
> at org.apache.openjpa.persistence.criteria.TestCriteria.testCount(TestCriteria.java:267)
> ....
> Caused by: java.lang.ClassCastException: org.apache.openjpa.util.IntId incompatible with [Ljava.lang.Object;
> at org.apache.openjpa.datacache.QueryCacheStoreQuery$CachedList.get(QueryCacheStoreQuery.java:509)
> at org.apache.openjpa.lib.rop.ListResultObjectProvider.getResultObject(ListResultObjectProvider.java:55)
> at org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.getResultObject(QueryImpl.java:2073)
> at org.apache.openjpa.kernel.QueryImpl.singleResult(QueryImpl.java:1325)
> at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1237)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1005)
> at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:861)
> ... 28 more
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.