|
|
|
Wu Yongfeng
|
Hi all:
I'm now tring to use ArcSDE 9.3 datasource, with ArcSDE sdk I can fetch a FeatureCollection by query, but when I call the FeatureCollection.features() method, an exception was threw: "PropertyDescriptor is null - did you request a property that does not exist?" at org.geotools.feature.type.ComplexTypeImpl.<init>(ComplexTypeImpl.java:71) at org.geotools.feature.type.FeatureTypeImpl.<init>(FeatureTypeImpl.java:50) at org.geotools.feature.simple.SimpleFeatureTypeImpl.<init>(SimpleFeatureTypeImpl.java:55) at org.geotools.feature.type.FeatureTypeFactoryImpl.createSimpleFeatureType(FeatureTypeFactoryImpl.java:154) at org.geotools.feature.simple.SimpleFeatureTypeBuilder.buildFeatureType(SimpleFeatureTypeBuilder.java:851) at org.geotools.data.DataUtilities.createSubType(DataUtilities.java:1306) at org.geotools.arcsde.data.ArcSDEQuery.getQuerySchema(ArcSDEQuery.java:274) at org.geotools.arcsde.data.ArcSDEQuery.createQuery(ArcSDEQuery.java:186) at org.geotools.arcsde.data.ArcSDEDataStore.getFeatureReader(ArcSDEDataStore.java:365) at org.geotools.arcsde.data.ArcSDEDataStore.getFeatureReader(ArcSDEDataStore.java:316) at org.geotools.arcsde.data.ArcSdeFeatureSource.getfeatureReader(ArcSdeFeatureSource.java:306) at org.geotools.arcsde.data.ArcSdeFeatureCollection.reader(ArcSdeFeatureCollection.java:111) at org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:229) at org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:199) at org.geotools.data.store.DataFeatureCollection.features(DataFeatureCollection.java:188) ...... GeoTools is the 2.6 snapshot version. Anyone knows why or is working around it? Best regards, Wu ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Geotools-gt2-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
||||||||||||||||
|
Gabriel Roldan
|
Can you share a code snippet to reproduce?
Cheers, Gabriel Wu Yongfeng wrote: > Hi all: > > I'm now tring to use ArcSDE 9.3 datasource, with ArcSDE sdk I can fetch > a FeatureCollection by query, but when I call the > FeatureCollection.features() method, an exception was threw: > "PropertyDescriptor is null - did you request a property that does not > exist?" > > at org.geotools.feature.type.ComplexTypeImpl.<init>(ComplexTypeImpl.java:71) > at > org.geotools.feature.type.FeatureTypeImpl.<init>(FeatureTypeImpl.java:50) > at > org.geotools.feature.simple.SimpleFeatureTypeImpl.<init>(SimpleFeatureTypeImpl.java:55) > at > org.geotools.feature.type.FeatureTypeFactoryImpl.createSimpleFeatureType(FeatureTypeFactoryImpl.java:154) > at > org.geotools.feature.simple.SimpleFeatureTypeBuilder.buildFeatureType(SimpleFeatureTypeBuilder.java:851) > at > org.geotools.data.DataUtilities.createSubType(DataUtilities.java:1306) > at > org.geotools.arcsde.data.ArcSDEQuery.getQuerySchema(ArcSDEQuery.java:274) > at > org.geotools.arcsde.data.ArcSDEQuery.createQuery(ArcSDEQuery.java:186) > at > org.geotools.arcsde.data.ArcSDEDataStore.getFeatureReader(ArcSDEDataStore.java:365) > at > org.geotools.arcsde.data.ArcSDEDataStore.getFeatureReader(ArcSDEDataStore.java:316) > at > org.geotools.arcsde.data.ArcSdeFeatureSource.getfeatureReader(ArcSdeFeatureSource.java:306) > at > org.geotools.arcsde.data.ArcSdeFeatureCollection.reader(ArcSdeFeatureCollection.java:111) > at > org.geotools.data.store.DataFeatureCollection.openIterator(DataFeatureCollection.java:229) > at > org.geotools.data.store.DataFeatureCollection.iterator(DataFeatureCollection.java:199) > at > org.geotools.data.store.DataFeatureCollection.features(DataFeatureCollection.java:188) > ...... > > > GeoTools is the 2.6 snapshot version. > > Anyone knows why or is working around it? > > Best regards, > > Wu > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > > > ------------------------------------------------------------------------ > > _______________________________________________ > Geotools-gt2-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users -- Gabriel Roldan OpenGeo - http://opengeo.org Expert service straight from the developers. ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Geotools-gt2-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
||||||||||||||||
|
Wu Yongfeng
|
HashMap<String, Serializable> params = new HashMap<String, Serializable>(); params.put(ArcSDEDataStoreFactory.DBTYPE_PARAM.key, "arcsde"); params.put(ArcSDEDataStoreFactory.SERVER_PARAM.key, host); params.put(ArcSDEDataStoreFactory.PORT_PARAM.key, port); params.put(ArcSDEDataStoreFactory.INSTANCE_PARAM.key, instance); params.put(ArcSDEDataStoreFactory.USER_PARAM.key, user); params.put(ArcSDEDataStoreFactory.PASSWORD_PARAM.key, password); ArcSDEDataStoreFactory dsFactory = new ArcSDEDataStoreFactory(); ds = dsFactory.createDataStore(params); String typeName = sources[5]; featureSource = ds.getFeatureSource(typeName); FeatureCollection<SimpleFeatureType, SimpleFeature> featureCollection = featureSource.getFeatures(geometryFilter); featureCollection .features(); ........ 2009/10/15 Gabriel Roldan <[hidden email]> Can you share a code snippet to reproduce? ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Geotools-gt2-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
||||||||||||||||
|
Wu Yongfeng
|
In reply to this post
by Gabriel Roldan
Hi Gabriel:
I have found the problem, the geometry field which used in a filter is wrong. However, I think when the filter is wrong, featureSource.features(filter) should return null or throw an exception:) 2009/10/15 Gabriel Roldan <[hidden email]> Can you share a code snippet to reproduce? ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Geotools-gt2-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |