WFS does not support feature types without geometry columns. ------------------------------------------------------------
Key: GEOT-2737 URL: http://jira.codehaus.org/browse/GEOT-2737 Project: GeoTools Issue Type: Bug Components: data wfs Affects Versions: 2.6-M2 Environment: MaxOSX, Java 6, Macbook Pro 5.2 Reporter: ingenieroariel getSchema fails for features that have no geometry column with a NullPointerException; the exception is called in WFSFeatureTypeTransformer.java, a simple check for null before calling the method fixes the issue. Index: modules/unsupported/wfs/src/main/java/org/geotools/xml/gml/WFSFeatureTypeTransformer.java =================================================================== --- modules/unsupported/wfs/src/main/java/org/geotools/xml/gml/WFSFeatureTypeTransformer.java (revision 33780) +++ modules/unsupported/wfs/src/main/java/org/geotools/xml/gml/WFSFeatureTypeTransformer.java (working copy) @@ -51,7 +51,10 @@ build.add(attributeType); } } - build.setDefaultGeometry(defaultGeometryType.getLocalName()); + //Only try to set default geometry when there actually is a geometry type + if(defaultGeometryType!=null){ + build.setDefaultGeometry(defaultGeometryType.getLocalName()); + } return build.buildFeatureType(); } -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Come build with us! The BlackBerry® 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/devconf _______________________________________________ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel