Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] testing needed postgis+1.2-RC3

Okay I have gathered up the known information to date into a bug report (and yes it looks like the source of the shapefiles, crs used, command used to load into postgis are provied).

Jody

On 01/07/2010, at 9:51 AM, Jody Garnett wrote:

Morning List:

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?

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().
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


Back to the top