Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 296E56348E1 for ; Wed, 11 Mar 2009 11:51:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 01508-01 for ; Wed, 11 Mar 2009 11:51:14 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by mail.postgresql.org (Postfix) with ESMTP id 2F2CE634907 for ; Wed, 11 Mar 2009 11:51:24 -0300 (ADT) Received: from news.hub.org (news.hub.org [200.46.204.72]) by news.hub.org (8.14.3/8.14.3) with ESMTP id n2BEpGW6019688 for ; Wed, 11 Mar 2009 11:51:17 -0300 (ADT) (envelope-from news@news.hub.org) Received: (from news@localhost) by news.hub.org (8.14.3/8.14.3/Submit) id n2BEo6gs018758 for pgsql-jdbc@postgresql.org; Wed, 11 Mar 2009 11:50:06 -0300 (ADT) (envelope-from news) From: "Peter" X-Newsgroups: pgsql.interfaces.jdbc References: <49b7bfef$0$1343$834e42db@reader.greatnowhere.com> <49B7CBB6.5020800@opencloud.com> Subject: Re: Totally weird behaviour in org.postgresql.Driver Date: Wed, 11 Mar 2009 16:46:48 +0200 X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 Lines: 24 Message-ID: <49b7ced9$0$1343$834e42db@reader.greatnowhere.com> X-Complaints-To: usenet@greatnowhere.com To: pgsql-jdbc@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/57 X-Sequence-Number: 19387 >> I'm totally at loss why and how >> protocols can become null. JVM bug perhaps? This is Tomcat 6 running on >> Ubuntu 8.10, and my webapp uses BlazeDS. >> >> Any ideas? Could this be due to improper synchronization somewhere in my >> app? > > It does sound like a JVM bug. > > If you're using gcj (might be the default on an Ubuntu install, I don't > remember), throw it away; every time I've seen "impossible" NPEs like > this it's been because of gcj bugs. I'm in fact using Sun JVM 1.6.0.10. I think you're right about gcj being the default - that was one of the first things I scrapped. I added a bunch more synchronized (mutex) blocks in my code to avoid getConnection being called simultaneously from multiple threads (why isnt that method synchronized anyway?) - so far so good... keeping fingers crossed. Maybe should have just subclassed PGSimpleDataSource... Peter