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

BUG #2636: JDBC error behaviour incorrect

From: "Kiren Pillay" <kiren(dot)pillay(at)standardbank(dot)co(dot)za>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2636: JDBC error behaviour incorrect
Date: 2006-09-18 21:03:14
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      2636
Logged by:          Kiren Pillay
Email address:      kiren(dot)pillay(at)standardbank(dot)co(dot)za
PostgreSQL version: 8.1.4
Operating system:   Windows
Description:        JDBC error behaviour incorrect


Here is my code snippet:

	  public Hashtable retrieveApplicationParameters() {
		    PreparedStatement ps = null;
		    ResultSet rs = null;

		    String loadApplicationParameters = " SELECT key_id, key_value FROM
application_parameters WHERE is_active = 1";

		    Hashtable values = new Hashtable();
		    try {
		    	DBActions db=DBActions.getInstance();
		      rs = db.getConnection().prepareCall(loadApplicationParameters
		      while ( {
		    	  // Testing
		        values.put(rs.getString(1), rs.getString(2));
		        System.out.println(rs.getString(1)+","+ rs.getString(2));
		    } catch (SQLException sqle) {
		      logger.error("Could not load application parameters ", sqle);
		    catch (Exception e){
		    catch (Throwable e){
		    	/*finally {
		      DBConnection.close(rs, ps);
		    return values;


In this code, the program gets to the executeQuery part with no exception.
When it gets to the part, the code jumps to the finally block.
This is non-deterministic behaviour as the code seems to have thrown an
exception, but even the catch Throwable part does not catch the error.

The database being connected to is a restore from another database. The fact
is this database restore could be incorrect, but how can I find the actual
cause of the problem. Is there a way to increase the logging so that I can
figure out the problem here. 

Sorry I can't give more info than this until i can learn how to turn the
debugging for the jdbc driver and so on.


pgsql-bugs by date

Next:From: Casey DuncanDate: 2006-09-18 21:08:22
Subject: Out of memory error during large hashagg
Previous:From: Tom LaneDate: 2006-09-18 20:42:32
Subject: Re: BUG #2632: createuser language poblem

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