It seems complex features do not work with postgis views, because they do not have a primary key. I receive this error when requesting wfs data:
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.0.0" xsi:schemaLocation="http://www.opengis.net/ows/1.1 https://192.168.0.111/geoserver/schemas/ows/1.1.0/owsAll.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 Index: 0, Size: 0</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
Has somebody a successful experience with PostGIS views as a complex feature data source?