Exclude xml-apis from build

Description

The xml-apis.jar will cause failures in JDK 11 with an environment using the new module loading. These Geoserver projects are affected by this: gs-wms, gs-ows, gs-web-wps.

Environment

None

Activity

Gabriel Roldan 
January 30, 2025 at 2:30 AM

Still an issue. Re-opened and assigned a new pull request:

Andrea Aime 
January 31, 2023 at 12:04 PM

Yep, go ahead and remove. Was just trying to figure out the difference in behavior

Roar Brænden 
January 31, 2023 at 12:04 PM

Here is one of the messages:

The package org.xml.sax.helpers is accessible from more than one module: <unnamed>, java.xml

 

It could probably be eliminated by turning one of the switches Preferences → Compiler → Error/Warnings. But it is quite annoying, and the xml-apis.jar is superfluous when using JDK 11.

Andrea Aime 
January 31, 2023 at 11:11 AM

Weird, I run the GeoServer tests with JDK 11 on IntelliJ without problems. Tried with ExecuteTest, run smoothly.

Checked if it was due to some JVM parameters, I normally run with “-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xverify:none” to get faster startup, but removing them changes nothing.

It could be something Eclipse specific, like for example it adding some custom parameters, or related to the Eclipse own compiler, which sometimes behaves differently (e.g., it allows to compile sources with compile errors, and will throw exceptions if those parts are reached, something the normal javac would not allow).

Roar Brænden 
January 31, 2023 at 11:03 AM

No, Eclipse. I suppose it matters when running junit tests.

Fixed

Details

Assignee

Reporter

Fix versions

Components

Priority

Created January 31, 2023 at 8:29 AM
Updated March 25, 2025 at 12:03 PM
Resolved February 3, 2025 at 8:54 AM