[Geoserver-devel] [JIRA] (GEOS-10301) incompatibility with ogcapi and editing sld styles

Jody Garnett created an issue

GeoServer / BugGEOS-10301

incompatibility with ogcapi and editing sld styles

Issue Type:

BugBug

Affects Versions:

2.20.0

Assignee:

Unassigned

Components:

Community modules, Main

Created:

11/Nov/21 5:23 PM

Environment:

Tested Adoption (formally Adopt OpenJDK) “Temurin” in a number of linux docker containers, and macOS:

  • Temurin: 1.8.0_302 (OpenJDK 64-Bit Server VM)
  • Temurin: 1.8.0_312

Priority:

MediumMedium

Reporter:

Jody Garnett

Okay I know ogcapi community module is not supported yet, but as the code that is broken is located in main I am going to make a bug report.

java.io.IOException: Stream closed
    at java.io.BufferedReader.ensureOpen(BufferedReader.java:122)
    at java.io.BufferedReader.reset(BufferedReader.java:510)
    at org.geoserver.catalog.SLDHandler.getVersionAndReader(SLDHandler.java:388)
    at org.geoserver.catalog.SLDHandler.version(SLDHandler.java:334)
    at org.geoserver.wms.web.data.StyleNewPage.onStyleFormSubmit(StyleNewPage.java:76)

The file SLDHandler was revised by Gabriel to use built-in java parsing, rather than explicitly depend on STAX resulting in:

        } finally {
            // release parser resources, does not close input stream
            try {
                parser.close();
            } catch (XMLStreamException e) {
                LOGGER.log(Level.WARNING, "Non fatal error closing XML Stream Parser", e);
            }
        }
        // reset input stream
        reader.reset(); <-- error occurs here

In most environments the parser.close(); does not close the input stream (as described in the comment), but when running with the ogcapi community module an alternate parser is used (woodstox parser) and the above failure is observed.

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100183-sha1:1bc0b1f)

Atlassian logo