We're updating the issue view to help you get more done. 

failed get DescribeFeatureType request when exists uuid field and DataStore option Expose primary keys set true

Description

Hi!
I trying to create layer with uuid identifier.
I have already configured postgis sql datastore with existing layers.
And i create table in this database and register layer with default geoservser sld called 'points'.

When I trying to exec request DescribeFeatureType I recive nothing.
request link sample
Answer:

1 <xsd:schema elementFormDefault="qualified" targetNamespace="gisbis"><xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://127.0.0.1:8083/geoserver/schemas/gml/3.1.1/base/gml.xsd"/></xsd:schema>

and such error in geoserver log

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 INFO | jvm 1 | 2017/11/10 19:18:43 | 10 ноя 19:18:43 INFO [geoserver.wfs] - INFO | jvm 1 | 2017/11/10 19:18:43 | Request: getServiceInfo INFO | jvm 1 | 2017/11/10 19:18:43 | 10 ноя 19:18:43 INFO [geoserver.wfs] - INFO | jvm 1 | 2017/11/10 19:18:43 | Request: describeFeatureType INFO | jvm 1 | 2017/11/10 19:18:43 | service = WFS INFO | jvm 1 | 2017/11/10 19:18:43 | version = 1.1.0 INFO | jvm 1 | 2017/11/10 19:18:43 | baseUrl = http://127.0.0.1:8083/geoserver/ INFO | jvm 1 | 2017/11/10 19:18:43 | typeName[0] = {te}sssss INFO | jvm 1 | 2017/11/10 19:18:43 | outputFormat = text/xml; subtype=gml/3.1.1 INFO | jvm 1 | 2017/11/10 19:18:43 | 10 ноя 19:18:43 WARN [geoserver.wfs] - Could not build xml schema for type: sssss INFO | jvm 1 | 2017/11/10 19:18:43 | java.lang.NullPointerException: Could not find a type for property: id of type: java.util.UUID INFO | jvm 1 | 2017/11/10 19:18:43 | at org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.buildComplexSchemaContent(FeatureTypeSchemaBuilder.java:771) INFO | jvm 1 | 2017/11/10 19:18:43 | at org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.buildSchemaContent(FeatureTypeSchemaBuilder.java:691) INFO | jvm 1 | 2017/11/10 19:18:43 | at org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.buildSchemaInternal(FeatureTypeSchemaBuilder.java:260) INFO | jvm 1 | 2017/11/10 19:18:43 | at org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.build(FeatureTypeSchemaBuilder.java:154) INFO | jvm 1 | 2017/11/10 19:18:43 | at org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.build(FeatureTypeSchemaBuilder.java:148) INFO | jvm 1 | 2017/11/10 19:18:43 | at org.geoserver.wfs.xml.FeatureTypeSchemaBuilder.build(FeatureTypeSchemaBuilder.java:137) INFO | jvm 1 | 2017/11/10 19:18:43 | at org.geoserver.wfs.xml.v1_1_0.XmlSchemaEncoder.doWrite(XmlSchemaEncoder.java:107) INFO | jvm 1 | 2017/11/10 19:18:43 | at org.geoserver.wfs.xml.v1_1_0.XmlSchemaEncoder.write(XmlSchemaEncoder.java:96) INFO | jvm 1 | 2017/11/10 19:18:43 | at org.geoserver.wfs.WFSDescribeFeatureTypeOutputFormat.write(WFSDescribeFeatureTypeOutputFormat.java:80) INFO | jvm 1 | 2017/11/10 19:18:43 | at org.geoserver.ows.Dispatcher.response(Dispatcher.java:1009) INFO | jvm 1 | 2017/11/10 19:18:43 | at org.geoserver.ows.Dispatcher.handleRequestInternal(Dispatcher.java:272) INFO | jvm 1 | 2017/11/10 19:18:43 | at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:147)

But when I set Expose primary keys in datastore options to false it state normally.
Correct answer:

1 2 3 4 5 6 7 8 9 10 11 12 13 <xsd:schema elementFormDefault="qualified" targetNamespace="te"> <xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://127.0.0.1:8083/geoserver/schemas/gml/3.1.1/base/gml.xsd"/> <xsd:complexType name="sssssType"> <xsd:complexContent> <xsd:extension base="gml:AbstractFeatureType"> <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="0" name="geom" nillable="true" type="gml:GeometryPropertyType"/> </xsd:sequence> </xsd:extension> </xsd:complexContent> </xsd:complexType> <xsd:element name="sssss" substitutionGroup="gml:_Feature" type="te:sssssType"/> </xsd:schema>

Environment

windows 10 pro, postgresql 9.5, postgis 2.2.2, geoserver 2.11.1

Status

Assignee

Daniele Romagnoli

Reporter

Alexandr Bobrov

Triage

Fix versions

Affects versions

2.11.1

Components

Priority

Medium