Re: [Qgis-user] Update WFS layer field type

2022-02-10 Thread emmexx
On 2/10/22 3:21 PM, Richard Duivenvoorde wrote:
> Off course users sometimes update their data (like you), so in the
> Geoserver web interface, go to 'Server Status' and then click the
> 'Reload' (the bottom button): Configuration and catalog.
> That refreshes Geoserver's internal metadata... (which for what I know
> only is cached in memory).

FIY

I added a new field to a postgis table, then I checked in the relative
geoserver layer if the new field was there (it was). I saved the
geoserver layer.
I tried again changing conf/web.xml and checked the layer using curl and
describefeatureType but the new field was missing from the response.

I tried Server status - Configuration and catalog - Reload too and
checked again with describefeatureType but the new field was still missing.

That Geoserver installation has some other problem that shouldn't be
related to this problem, but who knows.

After restarting geoserver the new field was there.

maxx
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Update WFS layer field type

2022-02-10 Thread emmexx
On 2/10/22 3:21 PM, Richard Duivenvoorde wrote:
> Off course users sometimes update their data (like you), so in the
> Geoserver web interface, go to 'Server Status' and then click the
> 'Reload' (the bottom button): Configuration and catalog.
> That refreshes Geoserver's internal metadata... (which for what I know
> only is cached in memory).

I'm pretty sure I did that too.
And I edited conf/web.xml so tomcat should have reloaded configuration
and catalog one way or the other.
I'll do a test when I'll delete the field I added out of despair. :-)

Thank you
maxx
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Update WFS layer field type

2022-02-10 Thread Richard Duivenvoorde

On 2/10/22 14:48, emmexx wrote:

So it must be a geoserver problem. Perhaps it caches the attributes
definitions.

I restarted geoserver and now the attributes are ok.

I'll ask on the geoserver mailing list if that is the expected behaviour.


Well, 'problem' :-)

Geoserver keeps the 'metadata' of it's datasources in memory (because it can be 
pretty intensive to find all kind of data from those.

Off course users sometimes update their data (like you), so in the Geoserver 
web interface, go to 'Server Status' and then click the 'Reload' (the bottom 
button): Configuration and catalog.
That refreshes Geoserver's internal metadata... (which for what I know only is 
cached in memory).

Regards,

Richard

ps: https://docs.geoserver.org/stable/en/user/rest/api/reload.html
(they have some issues with their doc site currently, so plz be patient)
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Update WFS layer field type

2022-02-10 Thread emmexx
On 2/10/22 9:19 AM, Richard Duivenvoorde wrote:
> Can you confirm (F12 in QGIS, seeing the requests), that QGIS is
> requesting WFS_describeFeatureType?

Thank you, I didn't know the QGIS Network logger, I lost hours trying to
find out how to log network requests :-(

I used the function Copy as cURL and tested it from a terminal.
The response of geoserver doesn't include either the new field or the
updated type field.

So it must be a geoserver problem. Perhaps it caches the attributes
definitions.

I restarted geoserver and now the attributes are ok.

I'll ask on the geoserver mailing list if that is the expected behaviour.

Thank you
  maxx
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Update WFS layer field type

2022-02-10 Thread Richard Duivenvoorde

On 2/10/22 09:12, emmexx wrote:

On 2/9/22 1:34 PM, emmexx wrote:

In geoserver the field type is displayed correctly but in qgis it isn't,
in layer properties - fields the field type is still the old one (int
instead of string). I didn't find a way to edit it.


Same problem if I add a new field to the postgis table.
I can update the fields definitions in geoserver, I can see that the
attributes of the table are updated when I send a
WFS_describeFeatureType request to geoserver but qgis doesn't update the
field list and the field type.

I tried to remove the WFS connection in Browser, I cleared the cache in
Settings - Options - Network but the field list doesn't change.

Is this a bug?


Can you confirm (F12 in QGIS, seeing the requests), that QGIS is requesting 
WFS_describeFeatureType?
In development table, you can also see if it pulls it fresh from the net, OR if 
it is using a cached version.

Some other things to try:
- empty your network cache (via setting/network) (or create a new profile so 
you will have another dir as cache?)
- replay the WFS_describeFeatureType in a browser and make sure Geoserver is 
showing the right types in it

Is it a public WFS, if so can you share the URL?

Regards,

Richard Duivenvoorde


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Update WFS layer field type

2022-02-10 Thread emmexx
On 2/9/22 1:34 PM, emmexx wrote:
> In geoserver the field type is displayed correctly but in qgis it isn't,
> in layer properties - fields the field type is still the old one (int
> instead of string). I didn't find a way to edit it.

Same problem if I add a new field to the postgis table.
I can update the fields definitions in geoserver, I can see that the
attributes of the table are updated when I send a
WFS_describeFeatureType request to geoserver but qgis doesn't update the
field list and the field type.

I tried to remove the WFS connection in Browser, I cleared the cache in
Settings - Options - Network but the field list doesn't change.

Is this a bug?

maxx
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user