Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 98870 invoked from network); 22 Sep 2009 19:52:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Sep 2009 19:52:45 -0000 Received: (qmail 30238 invoked by uid 500); 22 Sep 2009 19:52:45 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 30204 invoked by uid 500); 22 Sep 2009 19:52:44 -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 30194 invoked by uid 99); 22 Sep 2009 19:52:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Sep 2009 19:52:44 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Sep 2009 19:52:41 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5A6C7234C4A7 for ; Tue, 22 Sep 2009 12:52:16 -0700 (PDT) Message-ID: <640334279.1253649136369.JavaMail.jira@brutus> Date: Tue, 22 Sep 2009 12:52:16 -0700 (PDT) From: "Donald Woods (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Updated: (OPENJPA-1217) Ensure comparisons do not contain two parameters with Derby (ie SELECT ... WHERE ? = ?) In-Reply-To: <726560251.1249048334841.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Donald Woods updated OPENJPA-1217: ---------------------------------- Affects Version/s: 2.0.0-M2 Fix Version/s: (was: 2.0.0-M4) (was: 2.0.0) > Ensure comparisons do not contain two parameters with Derby (ie SELECT ... WHERE ? = ?) > --------------------------------------------------------------------------------------- > > Key: OPENJPA-1217 > URL: https://issues.apache.org/jira/browse/OPENJPA-1217 > Project: OpenJPA > Issue Type: Bug > Components: jdbc > Affects Versions: 2.0.0-M2 > Environment: Derby Embedded > Reporter: Michael Dick > Assignee: Pinaki Poddar > Fix For: 2.0.0-M3 > > Original Estimate: 0h > Remaining Estimate: 0h > > The problem appears to be Derby specific and can be seen by running o.a.o.p.c.TestTypesafeCriteria.testTrue() and testFalse(). > It's not related to criteria - the problem exists in the JPQL query. I believe I've seen this issue before but couldn't find it in JIRA. The relevant stack traces follow: > Caused by: org.apache.openjpa.persistence.PersistenceException: It is not allowed for both operands of '=' to be ? parameters. {SELECT t0.id, t0.DTYPE, t0.name FROM CR_PSN t0 WHERE (? = ?)} [code=30000, state=42X35] > at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4554) > at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4507) > at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102) > at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:88) > at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:64) > at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedException(SelectResultObjectProvider.java:155) > at org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:40) > at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1232) > at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:993) > at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:849) > at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:780) > at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:525) > at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:287) > at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:299) > at org.apache.openjpa.persistence.criteria.CriteriaTest.executeQueryAndCollectSQL(CriteriaTest.java:379) > ... 23 more > Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: It is not allowed for both operands of '=' to be ? parameters. {SELECT t0.id, t0.DTYPE, t0.name FROM CR_PSN t0 WHERE (? = ?)} [code=30000, state=42X35] > at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:245) > at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$000(LoggingConnectionDecorator.java:69) > at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection.prepareStatement(LoggingConnectionDecorator.java:279) > at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:188) > at org.apache.openjpa.lib.jdbc.ConfiguringConnectionDecorator$ConfiguringConnection.prepareStatement(ConfiguringConnectionDecorator.java:156) > at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:188) > at org.apache.openjpa.jdbc.kernel.JDBCStoreManager$RefCountConnection.prepareStatement(JDBCStoreManager.java:1519) > at org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:177) > at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:530) > at org.apache.openjpa.jdbc.sql.SQLBuffer.prepareStatement(SQLBuffer.java:510) > at org.apache.openjpa.jdbc.sql.SelectImpl.prepareStatement(SelectImpl.java:450) > at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:391) > at org.apache.openjpa.jdbc.sql.SelectImpl.execute(SelectImpl.java:363) > at org.apache.openjpa.jdbc.sql.LogicalUnion$UnionSelect.execute(LogicalUnion.java:427) > at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:230) > at org.apache.openjpa.jdbc.sql.LogicalUnion.execute(LogicalUnion.java:220) > at org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open(SelectResultObjectProvider.java:94) > at org.apache.openjpa.lib.rop.EagerResultList.(EagerResultList.java:34) > ... 31 more -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.