I have an interesting stack trace reported from the udig-users list
java.lang.NullPointerException
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(); is there any reason why that would return null for postgis?
Jody
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel