Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 457C51337C84 for ; Mon, 2 May 2011 12:19:32 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 20827-02-4 for ; Mon, 2 May 2011 15:19:13 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-vx0-f174.google.com (mail-vx0-f174.google.com [209.85.220.174]) by mail.postgresql.org (Postfix) with ESMTP id C05E61337B9C for ; Mon, 2 May 2011 12:17:43 -0300 (ADT) Received: by vxi39 with SMTP id 39so4307153vxi.19 for ; Mon, 02 May 2011 08:17:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=6USP2yg84e3RYsvqa3w4NOpisaivaKjxi+B36Rr34KE=; b=ZdDNSsWUg/v8yZCHyiOtghXfVOHz1St+F+oU1MjRkQko0eRVimavJWyDI1zxsdW/Sk ro7O5aDgPnXeTE81dnn2K179AWmkmwDliEzwAYe18eNcoNkgX7ZWuivCzCXvMAxAkS+9 uwuaJ1UtENRttkDsGuwuVxhAnMicRiFnfelS8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=n1YKnzi0G3v7VnGZIznYZIZOlnbahB3ZrIcFjZTZuUdAEC/0FNUqsx2SvcSnl+spix 2GewnculglM/aK02S6Jy2GI+Udkjh35Qvx1DN2ev5y/b55L34+qLofIZKfcfGapp/9in OdsuOWHM6Bx+cIdDE0StXC3CMHXO61ZCLQRz0= MIME-Version: 1.0 Received: by 10.220.206.196 with SMTP id fv4mr2250751vcb.15.1304349463121; Mon, 02 May 2011 08:17:43 -0700 (PDT) Received: by 10.220.176.203 with HTTP; Mon, 2 May 2011 08:17:43 -0700 (PDT) Date: Mon, 2 May 2011 09:17:43 -0600 Message-ID: Subject: getting PSQLException Can't infer the SQL type to use with Native Query call From: Steven Dahlin To: pgsql-sql@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.888 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201105/5 X-Sequence-Number: 35289 In trying to call a postgresql 8.4 stored function I am passing a class as well as a List (I have to save a master record as well as the detail records). This is being done with a native query using EclipseLink 2.1. However, I am getting back a message for the first item: PSQLException: Can't infer the SQL type to use for an instance of com.hwcs.veri.shared.dto.MyClass. Use setObject() with an explicit Types value to specify the type to use. I am calling the query setting up the parameter with: query.setParameter( 1, myClass ); The receiving stored function has the following: FUNCTION perform_schema.saveInfo( newrec boolean, myClass , myDtl [] ) I am unclear how to setup the pass fromm eclipselink to postgresql. Does anyone have any suggestions or can point to docs which speak to this specifically? Thanks