jdONeill development wrote: >I am having issues connecting to a local PostGIS database with the >following code: > >/ Map params = new HashMap(); > > params.put( "dbtype", props.getProperty( "postgis" ) ); > params.put( "host", props.getProperty( "localhost" ) ); > params.put( "port", new Integer( 5432) ); > params.put( "database", props.getProperty( "spatial" ) ); > params.put( "user", props.getProperty( "postgres" ) ); > params.put( "passwd", props.getProperty( "" ) ); > > DataStore pgDataStore = DataStoreFinder.getDataStore(params);/ > >You will notice this code from the 'Creating a PostGISDataStore' >tutorial. DataStore object pgDataStore is null causing a >java.lang.NullPointerException when the following line of code is run: > >/ String name = pgDataStore.getTypeNames()[0];/ > > Hi Dan,
Perhaps the tutorial is out of date? What version of geotools are you using? At a glance, I would expect to see the schema ("public") and possibly namespace ("") in the parameters as well. Besides that we'll need more details... Cheers, Cory. ---- Cory Horner Refractions Research Inc. http://www.refractions.net ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Geotools-gt2-users mailing list Geotools-gt2-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users