On 9/19/2011 9:40 PM, Jody Garnett wrote:

Well if it stopping when it checks the params then it will not even try to connect sigh ... here is the code?
Q: Can you see anything that would prevent your params being accepted?
Nope.


Q: is the postgis-versioned jar in libs? Try removing it to see if that helps with the checkDBType
I removed it and reloaded the target platform. It's the same with or without postgis-versioned jar

Q: Do you have the geotools source code to walk through this in a debugger? It would be good to know *which* param it is not accepting?
From what i can see all the params are good... only weird thing is that after the params are validated the PostgisDataStoreFactory is loaded and the method PostgisNGDataStoreFactory..checkDBType(Map params) returns false

In udig, *from what i can see*, the connection to a postgis db is done inside the run method of PostgisConnectionRunnable but a PostgisService object is not used; my question is, why does it say in the dev guide to use something like :

Map<String,Serializable>  params =new  HashMap<String,Serializable>();
params.put("dbtype","postgis");// must be"postgis"
params.put("host","www.refractions.net");// the name or ip address of the 
machine running PostGIS
params.put("port",new  Integer(5432));// the port that PostGIS is running on 
(generally 5432)
params.put("database","demo-bc");// the name of the database to connect to.
params.put("user","demo");// the user to connect with
params.put("passwd","demo");

IRepository local = CatalogPlugin.getDefault().getLocal();
IService service = local.acquire( params,new  NullProgressMonitor() );


i still haven't managed to get a non-null service to use for connecting to a postgis db BTW.


PS sorry it took so long to reply, i had a bad case of flu
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to