You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GeoServer 2.22.2(Java17)带FID过滤的WFS请求报GeoTools转换错误

GeoServer 2.22.2 + Java 17:带FID过滤的WFS请求触发NumberFormatException

我们已完成以下环境升级:

  • GeoServer 2.22.2(配套GeoTools 28.2)
  • Java 17(从Java 8直接升级)
  • Postgres 12.7 RDS + PostGIS 3.0.3
  • Tomcat 9.0.10

除带FID过滤条件的WFS请求会触发GeoTools错误外,其余功能运行正常。错误日志如下:

[geotools.util] - Error applying the converter class org.geotools.data.util.NumericConverterFactory$NumericConverter on (GISDATA.BARRIERB_POLY.37,class java.lang.Integer)
java.lang.NumberFormatException: For input string: "GISDATA.BARRIERB_POLY"

针对同一图层massgis:GISDATA.BARRIERB_POLY的测试结果:

  • 不带过滤条件的WFS查询可正常返回数据
  • 带FID过滤的查询触发上述错误

触发错误的WFS请求内容:

<wfs:GetFeature
        outputFormat="csv"
        xmlns:wfs="http://www.opengis.net/wfs"
        service="WFS"
        version="1.1.0"
        xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:ogc="http://www.opengis.net/ogc">
        <wfs:Query typeName="massgis:GISDATA.BARRIERB_POLY" srsName="EPSG:26986" xmlns:massgis="http://massgis.state.ma.us/featuretype">        
                <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
                        <ogc:FeatureId fid="GISDATA.BARRIERB_POLY.37"/><ogc:FeatureId fid="GISDATA.BARRIERB_POLY.38"/>
                </ogc:Filter>
        </wfs:Query>
</wfs:GetFeature>

请问是否有人遇到过该错误?我们怀疑这可能是GeoServer 2.22.2与Java 17的兼容性问题,目前计划在非生产环境降级至Java 11,但希望先收集更多相关信息再执行操作。

内容的提问来源于stack exchange,提问作者Aleda Freeman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.18 02:35:28