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 0D45BBFD2 for ; Wed, 4 Jan 2012 23:45:29 +0000 (UTC) Received: (qmail 22325 invoked by uid 500); 4 Jan 2012 23:45:28 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 22258 invoked by uid 500); 4 Jan 2012 23:45:28 -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 22076 invoked by uid 99); 4 Jan 2012 23:45:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2012 23:45:28 +0000 X-ASF-Spam-Status: No, hits=-2001.6 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Jan 2012 23:45:25 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 9148C138492 for ; Wed, 4 Jan 2012 23:44:40 +0000 (UTC) Date: Wed, 4 Jan 2012 23:44:40 +0000 (UTC) From: "Albert Lee (Assigned) (JIRA)" To: dev@openjpa.apache.org Message-ID: <1532943839.7116.1325720680596.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1161439723.6707.1325713179850.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Assigned] (OPENJPA-2104) BindParameter is not a valid query parameter as processed in DBDictionary's setUnknown() 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-2104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Albert Lee reassigned OPENJPA-2104: ----------------------------------- Assignee: Albert Lee > BindParameter is not a valid query parameter as processed in DBDictionary's setUnknown() > ---------------------------------------------------------------------------------------- > > Key: OPENJPA-2104 > URL: https://issues.apache.org/jira/browse/OPENJPA-2104 > Project: OpenJPA > Issue Type: Bug > Components: jdbc > Affects Versions: 2.2.0 > Reporter: Albert Lee > Assignee: Albert Lee > Fix For: 2.2.0 > > > After introduction of BindParameter, I am getting the following exception: > > org.apache.openjpa.persistence.ArgumentException: The specified parameter of type "class org.apache.openjpa.jdbc.sql.BindParameter" is not a valid query parameter. > at org.apache.openjpa.jdbc.sql.DBDictionary.setUnknown(DBDictionary.java:1458) > at com.ibm.ws.persistence.pdq.meta.PDQParameterHandler.handleSQLBuffer(PDQParameterHandler.java:59) > at com.ibm.ws.persistence.pdq.meta.PDQBaseData.update(PDQBaseData.java:239) > at com.ibm.ws.persistence.pdq.kernel.PDQJDBCStoreQuery.executeUpdate(PDQJDBCStoreQuery.java:61) > at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeBulkOperation(JDBCStoreQuery.java:577) > at org.apache.openjpa.jdbc.kernel.JDBCStoreQuery.executeDelete(JDBCStoreQuery.java:491) > at org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.executeDelete(ExpressionStoreQuery.java:789) > at org.apache.openjpa.kernel.QueryImpl.delete(QueryImpl.java:1025) > at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:865) > at org.apache.openjpa.kernel.QueryImpl.deleteAll(QueryImpl.java:892) > at org.apache.openjpa.kernel.DelegatingQuery.deleteAll(DelegatingQuery.java:574) > at org.apache.openjpa.persistence.QueryImpl.executeUpdate(QueryImpl.java:374) > Looks like the setUnknown method needs to recognize the new BindParameter type, like Sized and Calendard: > if (val instanceof Sized) { > sized = (Sized) val; > val = sized.value; > } else if (val instanceof Calendard) { > cald = (Calendard) val; > val = cald.value; > } > and extract its actual value before call out to the setters. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira