openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <>
Subject [jira] Created: (OPENJPA-1810) ClassCastException when using QueryCache and Criteria API
Date Tue, 21 Sep 2010 16:43:32 GMT
ClassCastException when using QueryCache and Criteria API

                 Key: OPENJPA-1810
             Project: OpenJPA
          Issue Type: Bug
          Components: datacache
    Affects Versions: 2.0.1, 2.1.0
            Reporter: Rick Curtis
         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(
	at org.apache.openjpa.kernel.QueryImpl.execute(
	at org.apache.openjpa.kernel.DelegatingQuery.execute(
	at org.apache.openjpa.persistence.QueryImpl.execute(
	at org.apache.openjpa.persistence.QueryImpl.getResultList(
	at org.apache.openjpa.persistence.QueryImpl.getSingleResult(
	at org.apache.openjpa.persistence.criteria.TestCriteria.testCount(
Caused by: java.lang.ClassCastException: org.apache.openjpa.util.IntId incompatible with [Ljava.lang.Object;
	at org.apache.openjpa.datacache.QueryCacheStoreQuery$CachedList.get(
	at org.apache.openjpa.lib.rop.ListResultObjectProvider.getResultObject(
	at org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.getResultObject(
	at org.apache.openjpa.kernel.QueryImpl.singleResult(
	at org.apache.openjpa.kernel.QueryImpl.toResult(
	at org.apache.openjpa.kernel.QueryImpl.execute(
	at org.apache.openjpa.kernel.QueryImpl.execute(
	... 28 more

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message