I can apply this style on geoserver 2.21.2, there is no problem verifying this style on geoserver 2.21-SNAPSHOT, but the preview layer reports:
The style specifies an attribute named 'xm',not found in the 'zj_jh_forest_ranger_grid' layer
The background log shows an exception as follows:
org.geoserver.platform.ServiceException: The requested Style can not be used
I don’t know the reason. Is it because of the geoserver 2.21-SNAPSHOT version?
The sld file exported by qgis is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" version="1.1.0" xmlns:se="http://www.opengis.net/se" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<NamedLayer>
<se:Name>金华市护林网格0615修改后_merge</se:Name>
<UserStyle>
<se:Name>金华市护林网格0615修改后_merge</se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>Single symbol</se:Name>
<se:PolygonSymbolizer>
<se:Fill>
<se:SvgParameter name="fill">#03e66b</se:SvgParameter>
<se:SvgParameter name="fill-opacity">0.25</se:SvgParameter>
</se:Fill>
<se:Stroke>
<se:SvgParameter name="stroke">#03e66b</se:SvgParameter>
<se:SvgParameter name="stroke-width">1</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>
</se:Rule>
<se:Rule>
<se:TextSymbolizer>
<se:Label>
<ogc:PropertyName>xm</ogc:PropertyName>
</se:Label>
<se:Font>
<se:SvgParameter name="font-family">@宋体</se:SvgParameter>
<se:SvgParameter name="font-size">12.0</se:SvgParameter>
<se:SvgParameter name="font-style">normal</se:SvgParameter>
<se:SvgParameter name="font-weight">bold</se:SvgParameter>
</se:Font>
<se:LabelPlacement>
<se:PointPlacement>
<se:AnchorPoint>
<se:AnchorPointX>0.5</se:AnchorPointX>
<se:AnchorPointY>0.5</se:AnchorPointY>
</se:AnchorPoint>
</se:PointPlacement>
</se:LabelPlacement>
<se:Fill>
<se:SvgParameter name="fill">#000000</se:SvgParameter>
</se:Fill>
<se:VendorOption name="autoWrap">60</se:VendorOption>
<se:VendorOption name="maxDisplacement">150</se:VendorOption>
</se:TextSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</UserStyle>
The error is saying that you have asked for the attribute
xmto be used for the labels and in this case there's no attribute of that name in the data set. This is unlikely to be related to the version of GeoServer that you are using. But there's generally no good reason to be using a snapshot version unless you need to be on the cutting edge or are testing a new function that has been recently added.