Skip to content

[DIRSTUDIO-1352] Lift the JDK XML parser limits that break the build on JDK 25 - #124

Open
zrhoffman wants to merge 2 commits into
apache:masterfrom
zrhoffman:fix/jdk-xml-limits
Open

zrhoffman wants to merge 2 commits into
apache:masterfrom
zrhoffman:fix/jdk-xml-limits

Conversation

@zrhoffman

@zrhoffman zrhoffman commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

Fixes DIRSTUDIO-1352.

On JDK 25 the build fails in two places because of the XML parser limits that the JDK sets in its default jaxp.properties:

  • Tycho 2.3.0 cannot read the p2 metadata of the Eclipse Babel update site while resolving the target platform: it exceeds jdk.xml.maxGeneralEntitySizeLimit (JAXP00010003) and jdk.xml.totalEntitySizeLimit (JAXP00010004).
  • The DocBook XSLT transformation of the help plugins exceeds jdk.xml.entityExpansionLimit (JAXP00010001). Both failures also happen on master.

Add .mvn/jvm.config, which sets these three properties to 0 (no limit) for the Maven JVM. Other jdk.xml.* limits are left at their defaults, because some of them do not treat 0 as "no limit" on older JDKs. The properties only affect XML parsing inside the Maven process and have no effect on the build output.

Verified on JDK 25 that target platform resolution (mvn validate) and the build of the help plugins pass, and that the full build (pom-first.xml and pom.xml) still passes on JDK 17. A full build on JDK 25 also needs the separate fix for the antlr-maven-plugin Security Manager failure (#123, DIRSTUDIO-1351).

…on JDK 25

Fixes <https://issues.apache.org/jira/browse/DIRSTUDIO-1352>.

On JDK 25 the build fails in two places because of the XML parser
limits that the JDK sets in its default jaxp.properties:
- Tycho 2.3.0 cannot read the p2 metadata of the Eclipse Babel update
  site while resolving the target platform: it exceeds
  jdk.xml.maxGeneralEntitySizeLimit (JAXP00010003) and
  jdk.xml.totalEntitySizeLimit (JAXP00010004).
- The DocBook XSLT transformation of the help plugins exceeds
  jdk.xml.entityExpansionLimit (JAXP00010001).
Both failures also happen on master.

Add .mvn/jvm.config, which sets these three properties to 0 (no limit)
for the Maven JVM. Other jdk.xml.* limits are left at their defaults,
because some of them do not treat 0 as "no limit" on older JDKs. The
properties only affect XML parsing inside the Maven process and have
no effect on the build output.

Verified on JDK 25 that target platform resolution (mvn validate) and
the build of the help plugins pass, and that the full build
(pom-first.xml and pom.xml) still passes on JDK 17. A full build on
JDK 25 also needs the separate fix for the antlr-maven-plugin
Security Manager failure.
The "Build with OpenJDK 17" job failed while packaging the NLS feature:
p2 tried to download org.eclipse.equinox.p2.updatechecker.nl_fr from
the Eclipse Babel R0.15.1 update site through Eclipse download mirrors,
and none of the mirrors has that artifact ("Artifact not found"; one
mirror, mirror1.sox.rs, no longer resolves). The Babel R0.15.1 site is
only hosted on archive.eclipse.org, so mirror selection fails at random
and the build is flaky.

Set eclipse.p2.mirrors=false in .mvn/jvm.config, so p2 downloads
artifacts directly from the repository URLs in the target platform.

Verified that the full build (pom-first.xml and pom.xml) passes on
JDK 17 with an empty local Maven repository and no mirror use, and
that on JDK 25 target platform resolution and the help plugins still
pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant