Re: Re: Inputs Appreciated - Calling pgsql stored proc with user defined sql types from java using pgsql-jdbc

Поиск
Список
Период
Сортировка
От Venkateswar Reddy Melachervu
Тема Re: Re: Inputs Appreciated - Calling pgsql stored proc with user defined sql types from java using pgsql-jdbc
Дата
Msg-id CAFbMEWVzC55yCYpYKNx4HGRXCgKzUq_XqFu3iayWuHORAGcphw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Re: Inputs Appreciated - Calling pgsql stored proc with user defined sql types from java using pgsql-jdbc  (Venkateswar Reddy Melachervu <vmelachervu@gmail.com>)
Список pgsql-jdbc
It appears I resolved it... driver classname and driver name were wrongly populated earlier.


On Fri, Mar 28, 2014 at 12:01 PM, Venkateswar Reddy Melachervu <vmelachervu@gmail.com> wrote:
ok. Thanks for the quick response Dave.

This post provides a for achieving what my solution requires - passing user defined data types to stored procedures. I followed this post ( of course, adapted it to suit for jdbc41 pgsql driver). Per this to add the data type, the jdbc connection needs to be cast to pgconnection and this casting is resulting in a run time exception -  (java.lang.ClassCastException) java.lang.ClassCastException: org.postgresql.jdbc4.Jdbc4Connection cannot be cast to org.postgresql.PGConnection. 

This was not the case with pgsql8.3 with jdbc3/4 pgsql driver. 

Any pointer/inputs to resolve this are highly appreciated.

V


On Fri, Mar 28, 2014 at 10:52 AM, David Johnston <polobo@yahoo.com> wrote:
Venkateswar Reddy Melachervu wrote
> Hello All,
> Any inputs/pointers for the below are highly appreciated.
>
> Problem
> When trying to conn.registerOutParameter(2,
> Types.STRUCT,"type_customer_details_for_subscription") for a pgsql stored
> proc with user defined type from java1.7 using jdbc41 pgsql driver to
> pgsql9.3 is resulting in error when type maps are used -
> SQLFeatureNotSupportedException: Method
> org.postgresql.jdbc4.Jdbc4CallableStatement.registerOutParameter(int,int,String)
> is not yet implemented.
>
> Somehow I was under the impression that struct for sql is base type and
> pgsql jdbc driver can support it. But going by above exception message, it
> it not. am I doing something wrong (have to create some struct pointers
> etc. before registering the type) or it is the way pgsql jdbc driver is
> built. Is there any way out  - any pointer?
>
> --
> Regards,
> Venkateswar Reddy Melachervu
> "...dare to dream, care to win..."
> www.linkedin.com/in/vmelachervu

registerOutParameter(...) is not implemented - it doesn't matter what the
actual argument values are.

 Sorry, no help on the solution.

David J.





--
View this message in context: http://postgresql.1045698.n5.nabble.com/Inputs-Appreciated-Calling-pgsql-stored-proc-with-user-defined-sql-types-from-java-using-pgsql-jdbc-tp5797743p5797744.html
Sent from the PostgreSQL - jdbc mailing list archive at Nabble.com.


--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



--
Regards,
Venkateswar Reddy Melachervu
"...dare to dream, care to win..."



--
Regards,
Venkateswar Reddy Melachervu
"...dare to dream, care to win..."

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Kevin Wooten
Дата:
Сообщение: Re: Re: Inputs Appreciated - Calling pgsql stored proc with user defined sql types from java using pgsql-jdbc
Следующее
От: Mike Fowler
Дата:
Сообщение: JDBC Buildfarm upgraded (Re: link to file bug against Postgres JDBC driver)