Обсуждение: NullPointerException in AbstractJdbc2DatabaseMetaData.getUDTs

Поиск
Список
Период
Сортировка

NullPointerException in AbstractJdbc2DatabaseMetaData.getUDTs

От
Elizabeth Chatman
Дата:
I am encountering an intermittent NullPointerException when I call connection.getMetaData().getUDTs(). I traced it to a null key in TypeInfoCache._pgNameToSQLType, inserted by a previous call to connection.getMetaData().getTypeInfo(), as a result of a lingering temporary table.

I attached a basic reproducer. For me it usually fails on the second or third time through the loop.

I am using the latest driver (9.3-1101-jdbc41), and I get the same results running against 9.2 and 9.3 servers.

- Elizabeth Chatman
Вложения

Re: NullPointerException in AbstractJdbc2DatabaseMetaData.getUDTs

От
Elizabeth Chatman
Дата:
Proposed patch attached, to avoid adding null keys to the cache.
- Elizabeth Chatman

On 07/02/2014 01:09 PM, Elizabeth Chatman wrote:
I am encountering an intermittent NullPointerException when I call connection.getMetaData().getUDTs(). I traced it to a null key in TypeInfoCache._pgNameToSQLType, inserted by a previous call to connection.getMetaData().getTypeInfo(), as a result of a lingering temporary table.

I attached a basic reproducer. For me it usually fails on the second or third time through the loop.

I am using the latest driver (9.3-1101-jdbc41), and I get the same results running against 9.2 and 9.3 servers.

- Elizabeth Chatman

Вложения

Re: NullPointerException in AbstractJdbc2DatabaseMetaData.getUDTs

От
Dave Cramer
Дата:
Thanks !

Dave Cramer

dave.cramer(at)credativ(dot)ca
http://www.credativ.ca


On 2 July 2014 17:03, Elizabeth Chatman <elizabeth.a.chatman@gmail.com> wrote:
Proposed patch attached, to avoid adding null keys to the cache.
- Elizabeth Chatman


On 07/02/2014 01:09 PM, Elizabeth Chatman wrote:
I am encountering an intermittent NullPointerException when I call connection.getMetaData().getUDTs(). I traced it to a null key in TypeInfoCache._pgNameToSQLType, inserted by a previous call to connection.getMetaData().getTypeInfo(), as a result of a lingering temporary table.

I attached a basic reproducer. For me it usually fails on the second or third time through the loop.

I am using the latest driver (9.3-1101-jdbc41), and I get the same results running against 9.2 and 9.3 servers.

- Elizabeth Chatman



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