Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 24F8610FBA for ; Fri, 11 Apr 2014 20:56:18 +0000 (UTC) Received: (qmail 29295 invoked by uid 500); 11 Apr 2014 20:56:17 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 29199 invoked by uid 500); 11 Apr 2014 20:56:15 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 29189 invoked by uid 99); 11 Apr 2014 20:56:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Apr 2014 20:56:15 +0000 Date: Fri, 11 Apr 2014 20:56:14 +0000 (UTC) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (OPENJPA-2493) SQLException while processing a query result MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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. > 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.(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.(EagerResultList.java:36) > ... 8 more -- This message was sent by Atlassian JIRA (v6.2#6252)