From: Ari Halberstadt <ari@shore.net>
To: pgsql-interfaces@postgresql.org
Subject: erratic problems with jdbc driver
Date: Thu, 1 Jul 1999 23:36:53 -0400
Message-ID: <v04003a01b3a1df1c047c@[207.244.110.165]> (raw)
I've been getting some erratic exceptions in the jdbc driver. About 50% of
the time I get the a stack trace like the following:
java.lang.NullPointerException
at postgresql.util.PSQLException.translate(PSQLException.java:76)
at postgresql.util.PSQLException.<init>(PSQLException.java:45)
at postgresql.PG_Stream.ReceiveString(Compiled Code)
at postgresql.Connection.ReceiveFields(Compiled Code)
at postgresql.Connection.ExecSQL(Compiled Code)
at postgresql.jdbc2.Statement.execute(Compiled Code)
at postgresql.jdbc2.Statement.executeQuery(Compiled Code)
at com.magiccookie.sql.StatementForwarder.executeQuery(Compiled Code)
at com.magiccookie.sql.StatementWrapper.executeQuery(Compiled Code)
at com.magiccookie.photodb.Image.match(Compiled Code)
at com.magiccookie.photodb.Util.makeGalleryThumbnail(Compiled Code)
at _photography._photodb.___folder_gallery.render(Compiled Code)
at com.bitmechanic.gsp.GspServlet.renderTemplate(GspServlet.java:576)
at com.bitmechanic.gsp.GspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
at org.apache.jserv.JServConnection.run(JServConnection.java:359)
at java.lang.Thread.run(Thread.java:485)
This is erratic because sometimes the same exact query and code succeed,
but sometimes it fails. I think the NullPointerException is caused by a
null bundle, but this is actually triggered by an earlier exception that
gets lost in the process.
I added a print statement in PSQLException and this is what the
actual error is:
ERROR=postgresql.stream.ioerror
ARG=java.net.SocketException: Socket closed
It looks like the socket connection is being lost at random times while
running the query.
The query being run at the time is:
select
adjustments,description,ts,folder,notes,keywords,title,film,location,private,nam
e,ts from photo where id = 158
The calling code is iterating over a list of rows and retrieving info for
each row. It does not always fail when retrieving the same row: though the
query is the same it may be accessing a row with a different ID. You can
see the net effect of this at
<http://www.magiccookie.com/photography/photodb/folder-gallery.gsp;.
Sometimes all of the pictures are displayed, and sometimes only the first
few are displayed.
I had this problem with 6.05b1 and just upgraded to 6.5, but the problem
persists.
Environment: postgresql 6.5, sunos 5.6, Solaris_JDK_1.2.1_03_pre-release.
-- Ari Halberstadt mailto:ari@shore.net <http://www.magiccookie.com/;
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: ari@shore.net
Subject: Re: erratic problems with jdbc driver
In-Reply-To: <v04003a01b3a1df1c047c@[207.244.110.165]>
* 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