[udig-devel] postgis & postgres

Andrea Antonello andrea.antonello at gmail.com
Tue Oct 16 08:33:38 PDT 2007


Hi, I'm trying to connect to a postgres database and do some spatial
and some normal queries. I connect like I used to do with geotools:

HashMap<String, Object> params = new HashMap<String, Object>();
params.put("database", databaseName);
params.put("host", host);
params.put("port", Integer.parseInt(port));
params.put("user", user);
params.put("passwd", passwd);
params.put("dbtype", "postgis");

spatialConn = DataStoreFinder.getDataStore(params);]

and what I get is an error like:

AVVERTENZA: ArcSDE Java API seems to not be on your classpath. Please
verify that all needed jars are. ArcSDE data stores will not be
available. java.lang.NoClassDefFoundError at
org.geotools.data.arcsde.ArcSDEDataStoreFactory.class$(ArcSDEDataStoreFactory.java:40)
at
org.geotools.data.arcsde.ArcSDEDataStoreFactory.isAvailable(ArcSDEDataStoreFactory.java:218)
at
org.geotools.data.DataStoreFinder.getAvailableDataStores(DataStoreFinder.java:113)
at
org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:76)
[...]
org.eclipse.equinox.launcher.Main.main(Main.java:1148) Caused by:
java.lang.ClassNotFoundException: com.esri.sde.sdk.client.SeConnection

Why is that in the way? Arcsde??

Since I had problems to get the 
Class.forName("org.postgres.Driver")
because of a classnotfound (even if I have the postgis plugin in my
dependencies), I tried to copy the two jars inside my plugin and put it
there in the classpath.

But it doesn't seem to work either.

Any idea?

Thanks
Andrea




More information about the udig-devel mailing list