GetCapabilities Generation fails when encountering 3D SRS

Description

This one is a bit more serious, after configuring a layer as per [https://jira.codehaus.org/browse/GEOS-5474" title="Adding Layer with 2.5D geometry trips up over number of ordinates when generating initial bounds" class="issue-link" data-issue-key="GEOS-5474"><del>GEOS-5474</del>, the GetCapabilities for WMS 1.3.0 trips up.

Displaying GetCapabilities 1.3.0 document in the browser results in the error message:

<b>This page contains the following errors:</b>

error on line 4746 at column 17: XML declaration allowed only at the start of the document

<b>Below is a rendering of the page up to the first error.</b>

...snip...

Inspection of the line 4746reveals:

&lt;CRS&gt;EPSG:61346405&lt;/CRS&gt;
&lt;CRS&gt;EPSG:61356405&lt;/CRS&gt;
&lt;CRS&gt;&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://localhost:8080/geoserver/schemas/wms/1.3.0/exceptions_1_3_0.xsd"&gt; &lt;ServiceException&gt;
javax.xml.transform.TransformerException: org.geoserver.platform.ServiceException: Error occurred trying to write out metadata for layer: POINT_TEST
org.geoserver.platform.ServiceException: Error occurred trying to write out metadata for layer: POINT_TEST
Error occurred trying to write out metadata for layer: POINT_TEST
Unexpected error obtaining bounding box for layer POINT_TEST
Argument &amp;quot;GDA94&amp;quot; has 3 dimensions, while 2 was expected.
&lt;/ServiceException&gt;&lt;/ServiceExceptionReport&gt;

Testing GetCapabilities 1.1.1 ends up with a similar problem:

&lt;Layer queryable="1"&gt;
&lt;Name&gt;nurc:Img_Sample&lt;/Name&gt;
&lt;Title&gt;North America sample imagery&lt;/Title&gt;
&lt;Abstract/&gt;
&lt;KeywordList&gt;
&lt;Keyword&gt;WCS&lt;/Keyword&gt;
&lt;Keyword&gt;worldImageSample&lt;/Keyword&gt;
&lt;Keyword&gt;worldImageSample_Coverage&lt;/Keyword&gt;
&lt;/KeywordList&gt;
&lt;SRS&gt;EPSG:4326&lt;/SRS&gt;
&lt;LatLonBoundingBox minx="-130.85168" miny="20.7052" maxx="-62.0054" maxy="54.1141"/&gt;
&lt;BoundingBox SRS="EPSG:4326" minx="-130.85168" miny="20.7052" maxx="-62.0054" maxy="54.1141"/&gt;
&lt;Style&gt;
&lt;Name&gt;raster&lt;/Name&gt;
&lt;Title&gt;Default Raster&lt;/Title&gt;
&lt;Abstract&gt;A sample style that draws a raster, good for displaying imagery&lt;/Abstract&gt;
&lt;LegendURL width="20" height="20"&gt;
&lt;Format&gt;image/png&lt;/Format&gt;
&lt;OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:8080/geoserver/wms?request=GetLegendGraphic&amp;amp;format=image%2Fpng&amp;amp;width=20&amp;amp;height=20&amp;amp;layer=Img_Sample"/&gt;
&lt;/LegendURL&gt;
&lt;/Style&gt;
&lt;/Layer&gt;
&lt;!--&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;&lt;!DOCTYPE ServiceExceptionReport SYSTEM "http://localhost:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"&gt; &lt;ServiceExceptionReport version="1.1.1" &gt; &lt;ServiceException&gt;
javax.xml.transform.TransformerException: org.geoserver.platform.ServiceException: Error occurred trying to write out metadata for layer: POINT_TEST
org.geoserver.platform.ServiceException: Error occurred trying to write out metadata for layer: POINT_TEST
Error occurred trying to write out metadata for layer: POINT_TEST
Unexpected error obtaining bounding box for layer POINT_TEST
Argument &amp;quot;GDA94&amp;quot; has 3 dimensions, while 2 was expected.
&lt;/ServiceException&gt;&lt;/ServiceExceptionReport&gt;

Environment

None

Status

Assignee

Unassigned

Reporter

codehaus

Triage

None

Fix versions

Affects versions

2.2.1

Components

Priority

Medium
Configure