Hi,

im am using geotools with an arcsde 9.2, but since version 2.4.4 (maybe 2.4.2, 
cause 2.4.1 works) i can't get a connection to my database.
I tested also with 2.4.4 but the result is still the same:

9 juil. 2008 20:28:14 org.geotools.arcsde.data.ArcSDEAttributeReader hasNext
GRAVE: Error fetching row for TEST.SITECLAS[
Filter: Filter.INCLUDE
 where clause sent: null
geometry filter:Filter.INCLUDE[SDE error -51][Error desc=DATABASE LEVEL ERROR 
OCCURRED.][Extended desc=
]
org.geotools.arcsde.ArcSdeException: Error fetching row for TEST.SITECLAS[
Filter: Filter.INCLUDE
 where clause sent: null
geometry filter:Filter.INCLUDE[SDE error -51][Error desc=DATABASE LEVEL ERROR 
OCCURRED.][Extended desc=
]
        at org.geotools.arcsde.data.ArcSDEQuery.fetch(ArcSDEQuery.java:792)
        at 
org.geotools.arcsde.data.ArcSDEAttributeReader.hasNext(ArcSDEAttributeReader.java:219)
        at 
org.geotools.data.DefaultFeatureReader.hasNext(DefaultFeatureReader.java:106)
        at 
org.geotools.feature.FeatureReaderIterator.hasNext(FeatureReaderIterator.java:50)
        at 
org.geotools.feature.collection.DelegateFeatureIterator.hasNext(DelegateFeatureIterator.java:50)
        at org.geotools.demo.example.App.main(App.java:45)
Caused by: com.esri.sde.sdk.client.SeException: 
        at com.esri.sde.sdk.client.k.v(Unknown Source)
        at com.esri.sde.sdk.client.k.d(Unknown Source)
        at com.esri.sde.sdk.client.SeQuery.fetch(Unknown Source)
        at org.geotools.arcsde.data.ArcSDEQuery.fetch(ArcSDEQuery.java:782)
        ... 5 more
Total length 0

The java code is here:

                System.out.println("Hello GeoTools: " + GeoTools.getVersion());

                try {
                        Map<String, Object> params = new HashMap<String, 
Object>();
                        params.put("dbtype", "arcsde");
                        params.put("server", "*.*.*.*");
                        params.put("port", "5151");
                        params.put("database", "");  // this was OK as blank in 
my example
                        params.put("user", "sde");
                        params.put("password", "sde");


                        DataStore dataStore = 
DataStoreFinder.getDataStore(params);
                        String[] typeNames = dataStore.getTypeNames();
                        String typeName = typeNames[0];

                        System.out.println("Reading content " + typeName);

                        FeatureSource featureSource = 
dataStore.getFeatureSource(typeName);
                        FeatureCollection collection = 
featureSource.getFeatures();
                        FeatureIterator iterator = collection.features();
                        int length = 0;
                        try {
                                while (iterator.hasNext()) {
                                        Feature feature = iterator.next();
                                        Geometry geometry = 
feature.getDefaultGeometry();
                                        length += geometry.getLength();
                                }
                        } finally {
                                iterator.close();
                        }
                        System.out.println("Total length " + length);

                } catch (Exception e) {
                        e.printStackTrace();
                }

        }


Is this a known problem?


And I also wanted to know why there has been such "major" changes in an minor 
version update?

Like:

 final ArcSDEConnectionPool connectionPool = dataStore.getConnectionPool();

is not possible anymore, cause dataStore.getConnectionPool() has been changed 
to package scope.


Can somebody change this back?

thanks 

/Manfred

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Geotools-gt2-users mailing list
Geotools-gt2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to