Received: from nautilus.shore.net (nautilus.shore.net [207.244.124.104]) by hub.org (8.9.3/8.9.3) with ESMTP id XAA15652 for ; Thu, 1 Jul 1999 23:36:34 -0400 (EDT) (envelope-from ari@shore.net) Received: from pm4-3-165.port.shore.net [207.244.110.165] by nautilus.shore.net with esmtp (Exim) for pgsql-interfaces@postgresql.org id 10zu7w-0002vn-00; Thu, 1 Jul 1999 23:36:36 -0400 X-Sender: ari@shell1.shore.net Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Thu, 1 Jul 1999 23:36:53 -0400 To: pgsql-interfaces@postgresql.org From: Ari Halberstadt Subject: erratic problems with jdbc driver 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.(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 . 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