[postgis-users] postgis jump driver causing wierd error

Seamus Thomas Carroll carrolls at cpsc.ucalgary.ca
Wed Mar 17 12:11:47 PST 2004


Hi,

I have added a plugin to jump that uses the postgis jumpdriver.  I use the 
standard postgis driver to get information from the database and then use 
the jumpdriver to display the retrieved layer information.  If I is use 
this 
code to get a connection the jumpdriver works correctly:
Connection conn = DriverManager.getConnection(url, username, password);

Yesterday I tried adding pooling to make it easier to get connections to 
the database ( i need many connections ) using the following code:

Jdbc3PoolingDataSource dbPool = new Jdbc3PoolingDataSource()
dbPool.setDataSourceName( dataSourceName );	
dbPool.setServerName(serverName);
dbPool.setDatabaseName(databaseName);
dbPool.setPortNumber( portNumber );
dbPool.setUser(user);
dbPool.setPassword(password);
dbPool.setMaxConnections(maxConnections);
Connection con = dbPool.getConnection();

This works out great and I use the connection as normal.  The problem 
occurs when I the try to use the jumpdriver to load in a layer.  I now 
recieve the following error:
java.sql.SQLException: No suitable driver
 at java.sql.DriverManager.getConnection(DriverManager.java:532)
 at java.sql.DriverManager.getConnection(DriverManager.java:171)
 at net.refractions.postgis.PostGISConnection.connect(PostGISConnection.java:448)
 at net.refractions.postgis.PostGISConnection.executeQuery(PostGISConnection.java:77)
 at net.refractions.postgis.PostGISConnection.executeQuery(PostGISConnection.java:471)
 at uavui.agentsmanager.AgentEntry.updateMap(AgentEntry.java:329)
 at uavui.agentsmanager.AgentEntry.access$800(AgentEntry.java:51)
 at uavui.agentsmanager.AgentEntry$AgentUpdateThread.startUpdate(AgentEntry.java:596)
 at uavui.agentsmanager.AgentEntry$AgentUpdateThread.run(AgentEntry.java:583)

java.lang.IllegalStateException: Could not connection to database: No suitable driver
 at net.refractions.postgis.PostGISConnection.connect(PostGISConnection.java:457)
 at net.refractions.postgis.PostGISConnection.executeQuery(PostGISConnection.java:77)
 at net.refractions.postgis.PostGISConnection.executeQuery(PostGISConnection.java:471)
 at uavui.agentsmanager.AgentEntry.updateMap(AgentEntry.java:329)
 at uavui.agentsmanager.AgentEntry.access$800(AgentEntry.java:51)
 at uavui.agentsmanager.AgentEntry$AgentUpdateThread.startUpdate(AgentEntry.java:596)
 at uavui.agentsmanager.AgentEntry$AgentUpdateThread.run(AgentEntry.java:583)


I have no idea why adding connection pooling to my code would effect the 
jumpdriver.  Does anyone know of any technical issues about adding  
Jdbc3PoolingDataSource to my plugin that would cause it to effect the 
jumpdriver?

Thanks for any suggestions or comments,

Seamus




More information about the postgis-users mailing list