openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (OPENJPA-2493) SQLException while processing a query result
Date Fri, 11 Apr 2014 20:56:14 GMT

     [ https://issues.apache.org/jira/browse/OPENJPA-2493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rick Curtis updated OPENJPA-2493:
---------------------------------

    Attachment: OPENJPA-2493.ut.patch

> SQLException while processing a query result
> --------------------------------------------
>
>                 Key: OPENJPA-2493
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2493
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel, query
>    Affects Versions: 2.2.2, 2.3.0
>            Reporter: Rick Curtis
>         Attachments: OPENJPA-2493.ut.patch
>
>
> I encountered a bug in a test environment that I wanted to open so I don't forget about
it. 
> My best guess is that this bug is somewhere in one of the query / sql caches. It looks
very similar to OPENJPA-2482, but it is indeed different. Attached below is a multithreaded
test that is able to recreate the stacktrace below 75% of the time.
> <openjpa-0.0.0-rnull nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
org.apache.openjpa.jdbc.kernel.exps.Count@336eb7fc
> FailedObject: SELECT b.oid, COUNT(b) FROM Book b where b.dueDate BETWEEN :start AND :end
GROUP BY b.oid [java.lang.String]
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:5008)
> 	at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4968)
> 	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:135)
> 	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:116)
> 	at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:68)
> 	at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:155)
> 	at org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.handleCheckedException(QueryImpl.java:2111)
> 	at org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:40)
> 	at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1251)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:1007)
> 	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:863)
> 	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:275)
> 	at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:291)
> 	at org.apache.openjpa.persistence.jdbc.sqlcache.TestMultiThreadedQuery$Worker.run(TestMultiThreadedQuery.java:94)
> Caused by: java.sql.SQLException: org.apache.openjpa.jdbc.kernel.exps.Count@336eb7fc
> 	at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.findObject(SelectImpl.java:2512)
> 	at org.apache.openjpa.jdbc.sql.ResultSetResult.translate(ResultSetResult.java:497)
> 	at org.apache.openjpa.jdbc.sql.ResultSetResult.getObjectInternal(ResultSetResult.java:362)
> 	at org.apache.openjpa.jdbc.sql.AbstractResult.getObject(AbstractResult.java:691)
> 	at org.apache.openjpa.jdbc.kernel.exps.UnaryOp.load(UnaryOp.java:120)
> 	at org.apache.openjpa.jdbc.kernel.ProjectionResultObjectProvider.getResultObject(ProjectionResultObjectProvider.java:78)
> 	at org.apache.openjpa.kernel.QueryImpl$PackingResultObjectProvider.getResultObject(QueryImpl.java:2075)
> 	at org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:36)
> 	... 8 more



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message