From dev-return-13434-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Thu Aug 27 22:11:23 2009 Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 78109 invoked from network); 27 Aug 2009 22:11:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Aug 2009 22:11:23 -0000 Received: (qmail 75196 invoked by uid 500); 27 Aug 2009 22:11:23 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 75146 invoked by uid 500); 27 Aug 2009 22:11:23 -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 75134 invoked by uid 99); 27 Aug 2009 22:11:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2009 22:11:23 +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; Thu, 27 Aug 2009 22:11:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 46B2C234C044 for ; Thu, 27 Aug 2009 15:10:59 -0700 (PDT) Message-ID: <897436046.1251411059273.JavaMail.jira@brutus> Date: Thu, 27 Aug 2009 15:10:59 -0700 (PDT) From: "Pinaki Poddar (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Closed: (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 ] Pinaki Poddar closed OPENJPA-1217. ---------------------------------- Resolution: Fixed Fix Version/s: 2.0.0 2.0.0-M4 2.0.0-M3 See OPENJPA-1013 > 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 > Environment: Derby Embedded > Reporter: Michael Dick > Assignee: Pinaki Poddar > Fix For: 2.0.0-M3, 2.0.0-M4, 2.0.0 > > 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.