Imran Rajjad (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Aa4c754d9-7620-446e-8c70-a2c018f794dd
) *created* an issue
GeoServer (
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiMTI3M2ZkNTU2MTRjNDQwOWEwMWZlMmU1OTIxNjBhY2QiLCJwIjoiaiJ9
) / Bug (
https://osgeo-org.atlassian.net/browse/GEOS-9729?atlOrigin=eyJpIjoiMTI3M2ZkNTU2MTRjNDQwOWEwMWZlMmU1OTIxNjBhY2QiLCJwIjoiaiJ9
) GEOS-9729 (
https://osgeo-org.atlassian.net/browse/GEOS-9729?atlOrigin=eyJpIjoiMTI3M2ZkNTU2MTRjNDQwOWEwMWZlMmU1OTIxNjBhY2QiLCJwIjoiaiJ9
) WMS XML Post request fails with Workspace qualifier in url (
https://osgeo-org.atlassian.net/browse/GEOS-9729?atlOrigin=eyJpIjoiMTI3M2ZkNTU2MTRjNDQwOWEwMWZlMmU1OTIxNjBhY2QiLCJwIjoiaiJ9
)
Issue Type: Bug Affects Versions: 2.18-RC Assignee: Unassigned Components: WMS
Created: 08/Sep/20 8:41 AM Priority: Medium Reporter: Imran Rajjad (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=557058%3Aa4c754d9-7620-446e-8c70-a2c018f794dd
)
Steps to re-produce:
For the below GetMap request in XML format
<?xml version="1.0" encoding="UTF-8"?>
<ogc:GetMap xmlns:ogc="http://www.opengis.net/ows"
xmlns:gml="http://www.opengis.net/gml"
version="1.1.1" service="WMS">
<StyledLayerDescriptor version="1.0.0">
<NamedLayer>
<Name>topp:states</Name>
<NamedStyle><Name>population</Name></NamedStyle>
</NamedLayer>
</StyledLayerDescriptor>
<BoundingBox srsName="http://www.opengis.net/gml/srs/epsg.xml#4326">
<gml:coord><gml:X>-130</gml:X><gml:Y>24</gml:Y></gml:coord>
<gml:coord><gml:X>-55</gml:X><gml:Y>50</gml:Y></gml:coord>
</BoundingBox>
<Output>
<Format>image/png</Format>
<Size><Width>550</Width><Height>250</Height></Size>
</Output>
</ogc:GetMap>
Make a POST request with workspace as part of URL.
curl -u admin:geoserver -H "Content-Type: text/xml" -X POST
http://localhost:8080/geoserver/*topp*/wms --data @wms_post.xml
The request will fail with error message:
<?xml version="1.0" encoding="UTF-8"?><ows:ExceptionReport
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ows="http://www.opengis.net/ows"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0"
xsi:schemaLocation="http://www.opengis.net/ows
http://localhost:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd ">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>java.lang.NullPointerException</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
The root cause:
The Null pointer error is being generated from
https://github.com/geoserver/geoserver/blob/master/src/wms/src/main/java/org/geoserver/wms/WMSWorkspaceQualifier.java#L28
( #L28 )
There is no NULL check on rawKvp in requests, which are NULL for XML payload
based post requests.
(
https://osgeo-org.atlassian.net/browse/GEOS-9729#add-comment?atlOrigin=eyJpIjoiMTI3M2ZkNTU2MTRjNDQwOWEwMWZlMmU1OTIxNjBhY2QiLCJwIjoiaiJ9
) Add Comment (
https://osgeo-org.atlassian.net/browse/GEOS-9729#add-comment?atlOrigin=eyJpIjoiMTI3M2ZkNTU2MTRjNDQwOWEwMWZlMmU1OTIxNjBhY2QiLCJwIjoiaiJ9
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100145-
sha1:9e8df96 )
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel