Skip site navigation (1) Skip section navigation (2)

Re: Totally weird behaviour in org.postgresql.Driver

From: "Peter" <peter(at)greatnowhere(dot)com>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Totally weird behaviour in org.postgresql.Driver
Date: 2009-03-11 14:46:48
Message-ID: 49b7ced9$0$1343$834e42db@reader.greatnowhere.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
>> 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 



In response to

Responses

pgsql-jdbc by date

Next:From: Kris JurkaDate: 2009-03-12 03:44:38
Subject: Re: Totally weird behaviour in org.postgresql.Driver
Previous:From: Oliver JowettDate: 2009-03-11 14:33:26
Subject: Re: Totally weird behaviour in org.postgresql.Driver

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group