On 9/19/2011 5:02 PM, poultee wrote:
I seriously can not understand why it won't return anything other than
null for a service(it's pasted from one of the udig dev guide pages
after all
http://udig.refractions.net:8080/confluence/display/DEV/2+Catalog#2Catalog-LocalCatalog
)...looks like i'm going to try and use PostgisService2 directly.
i have also tried
IRepository local = CatalogPlugin.getDefault().getLocal();
*URL aa = new URL (null,
"jdbc.postgis://postgres:12345@localhost:5432/postgis",
CorePlugin.RELAXED_HANDLER);*
*IService service = local.acquire( aa, new NullProgressMonitor() );*
// saw it here
https://github.com/uDig/udig-platform/blob/master/tutorials/net.refractions.udig.tutorials.examples/src/net/refractions/udig/tutorials/examples/CatalogExample.java,
and it returns null for "service"
instead of
java.util.Map<String,Serializable> params = new
HashMap<String,Serializable>();
params.put("dbtype", "postgis"); // must be "postgis"
params.put("host", "localhost"); // 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", "postgis"); // the name of the
database to connect to.
params.put("user", "postgres"); // the user to
connect with
params.put("passwd", "12345");
IRepository local = CatalogPlugin.getDefault().getLocal();
IService service = local.acquire( params, new NullProgressMonitor()
); // should not be null but it is
but it still does not work ...
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel