We have the following stack trace coming in off the user-list (thanks to David Epstein). David could we ask you to create an issue in the issue tracker with this information?
at org.geotools.jdbc.JDBCDataStore.createConnection(JDBCDataStore.java:1420)
at org.geotools.jdbc.JDBCDataStore.getConnection(JDBCDataStore.java:1377)
at org.geotools.jdbc.JDBCFeatureSource.getCountInternal(JDBCFeatureSource.java:404)
at org.geotools.data.store.ContentFeatureSource.getCount(ContentFeatureSource.java:409)
at org.geotools.jdbc.JDBCFeatureStore.getCountInternal(JDBCFeatureStore.java:172)
at org.geotools.data.store.ContentFeatureSource.getCount(ContentFeatureSource.java:409)
at org.geotools.data.store.ContentFeatureCollection.size(ContentFeatureCollection.java:290)
at org.geotools.feature.collection.DecoratingFeatureCollection.size(DecoratingFeatureCollection.java:168)
at net.refractions.udig.ui.FeatureTableContentProvider
Hunting down the code it appears as:
JDBCTransactionState tstate = (JDBCTransactionState) t.getState(this);
if(tstate != null) {
return tstate.cx;
} else {
Connection cx = createConnection();
try {
cx.setAutoCommit(false); /// <---- ERROR OCCURS HERE
} catch (SQLException e) {
throw (IOException) new IOException().initCause(e);
}
tstate = new JDBCTransactionState(cx, this);
t.putState(this, tstate);
return cx;
}
So it looks like createConnection() is failing; and returning null rather then an exception?
Looking at the implementation it is mostly a direct call to datasource getConnection().
I asked around on geotools-devel and we cannot think why getConnection() would return null; can I ask someone to test PostGIS; in a debugger if needed.
David you mentioned a couple ways in which you loaded shapefiles; are the shapefiles your own or available from a public website?
Jody