From: Zachary Marshall <Zachary.Marshall@sas.com>
To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
Cc: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Re: NullPointerException in TypeInfoCache.getSQLType
Date: Wed, 17 Feb 2016 14:24:19 +0000
Message-ID: <4700e94871ad45c58d816158b1c068bb@MERCMBX35R.na.SAS.com> (raw)
In-Reply-To: <CAB=Je-FxjjzZ5f7rVZOjvmF9JZPf9Ca=NPCpHpfqmnAVv8++9A@mail.gmail.com>
References: <1455717036452.5353@sas.com>
<CAB=Je-FxjjzZ5f7rVZOjvmF9JZPf9Ca=NPCpHpfqmnAVv8++9A@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>
It will be hard to supply a reproducer since it seems to require lots of concurrent startups, but I will see if I can simplify the reproducible case.
Your explanation seems plausible. I will add the suggested logging and rebuild and test to log the oid and other information. It will probably be a few days before I have those results.
Thanks for your suggestions and time,
Zach Marshall
-----Original Message-----
From: Vladimir Sitnikov [mailto:sitnikov.vladimir@gmail.com]
Sent: Wednesday, February 17, 2016 9:20 AM
To: Zachary Marshall <Zachary.Marshall@sas.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] NullPointerException in TypeInfoCache.getSQLType
Do you have a reproducer?
Can you check if you have types with typname of null?
select * from pg_catalog.pg_type t where t.typname is null
> all are typically creating new schemas
Can it be like:
1) org.postgresql.jdbc.PgDatabaseMetaData#getTypeInfo loads all the type ids
2) as it reaches org.postgresql.jdbc.TypeInfoCache#getPGType(int), the type is no longer in the DB (e.g. dropped) ?
Can you add logging to TypeInfoCache#getPGType & rebuild & test to log the actual oid in question?
Vladimir
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: Zachary.Marshall@sas.com, sitnikov.vladimir@gmail.com
Subject: Re: NullPointerException in TypeInfoCache.getSQLType
In-Reply-To: <4700e94871ad45c58d816158b1c068bb@MERCMBX35R.na.SAS.com>
References: <1455717036452.5353@sas.com> <CAB=Je-FxjjzZ5f7rVZOjvmF9JZPf9Ca=NPCpHpfqmnAVv8++9A@mail.gmail.com> <4700e94871ad45c58d816158b1c068bb@MERCMBX35R.na.SAS.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox