[Eclipse 2026-09] New Java 25 XML limits cause problems with some plugins which process large XML files #2918
Replies: 12 comments 9 replies
|
For p2, it sets some of those here: I'm not sure I think the danger of these is overrated, but hey we're all entitled to an opinion. After all, this content is being used to load repositories from which the user is going to install bundles. So what, you're kill my process with some evil XML overload before I get a chance to install your evil content rather than encourage me to proceed and actually install said evil content and then run it in the JVM after it restarts at which point the evil I can do is way more than exploding your XML processor. |
|
This was more a question than a bug. After all, the Platform doesn't determine the size of the SimRel repository, nor the number of |
|
Thanks @merks for your points. For me, the primary issue here is not a security concern but a functionality/compatibility problem. bndtools worked with these repositories before (up to Eclipse 2026-06), but with Eclipse 2026-09 now running on JDK 25, the new JAXP defaults can make bndtools unusable when it encounters a repository index exceeding those limits. We can of course fix this in bndtools by configuring appropriate limits ourselves. However, that only fixes the problem for future bndtools versions. Users running an older bndtools version inside a current Eclipse release may still encounter the problem unless there is a workaround at the Eclipse/JDK level. I also agree that this does not affect all bndtools users automatically. It only affects users who work with repository indexes large enough to hit the new limits. I understand the security rationale behind the JDK change. My point is simply that, in this particular case, the practical impact we are seeing is a compatibility regression: an existing, legitimate repository can no longer be consumed by an otherwise unchanged bndtools installation after moving to the new Eclipse/JDK combination. I don't want to blame anyone for this or expect Eclipse to solve the problem. My intention is mainly to discuss where the most appropriate place for a solution would be. A solution does not necessarily have to be a change in Eclipse either — even making users aware of the problem and documenting the available workaround could already be helpful for users of older bndtools versions or even other XML-processing Eclipse plugins. |
|
Just for further reference: |
|
Today after being forced by the platform evolution to start using Java 25. I hit two new instances of this problem. (see eclipse-justj/justj.tools#14). For a QVTd JUnit test there were too many entity references being resolved to save space in URL references. Fixable by a makeParser overload to revert the three corrupted limits. Maven's invocation of JustJ is obviously unaware of what is being promoted and can hit limits. Fixable by three -D's on the Maven command line. JustJ should be using the improved P2 manager, but seemingly the improvements are inadequate or bypassed.
No. It is a serious regression that is showing up in too many places. IMHO by default EMF's makeParser should revert the limits unless a new load option requests the new limited functionality. |
|
I'm not knowingly installing an old version of P2. I use but perhaps Tycho 4.0.5 confounds. To me a limit of 10,000 on entities is just as stupid as say a Java compiler limiting comment @link's to 10,000 characters. I'm not suggesting affecting JVM clients, just EMF clients. Forcing people to the global 3 -D's solution has potential side effects. Fixing just EMF preserves EMF legacy without affecting JVM. |
Yes Tycho 5.0.4 fixes the XML Parser limits for JustJ (but not the classpath ordering regression that breaks dynamic JET templates forcing my OCL build to use 3.0.5. Sigh! time for yet another difficult debug and workaround. See eclipse-ocl/org.eclipse.ocl#2354) |
|
How is a useful/flexible application such as the Sample Reflective Ecore Model Editor's functionality to be preserved for big files? Must the user restart Eclipse after adding the three -D's to the Eclipse.ini or the Eclipse command line. Surely we cannot expect every XML processing application (e.g UML tools) to fix this corruption? |
Using attributes to store large amounts of data is generally considered bad practice in XML - they have real limitations compared to elements when it comes to data modeling and parsing (as always, there's no normative answer here, so others may disagree). That said, this discussion won't convince anyone to change their data model, nor does it help solve the actual problem. If someone wants to challenge the limit itself, the JDK bug tracker (as painful as that process is) - or Oracle support, if you have a paid contract - is the right venue. Here, we can only treat the JDK's behavior as a given constraint to work around. |
|
It's beyond arbitrary it's mindless. Yes big entities are a security violation opportunity, but no big entities doesn't stop a clever security violation being smaller. We might as well ban big DLLs since they have a larger security risk. #2931 demonstrates that I was wrong in suggesting that EMF is the place to fix the problem. There are significant non-EMF XML usages too. The platform should come with at least a reverting Eclipse.ini that would demonstrate how older platforms can be Java 25-proofed. |
There are numerous reasons why large XML files may fall foul of the new limits; only a few may be dismissed as poor practice. For the OCL/QVTd case the problem was the use of entities to shorten URI references saving typically 20% on file size; arguably a good practice. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
In bndtools we discovered that with new new Eclipse 2026-09 released today bndtools is not working properly because in our specific instance there is a repository configured which processes a large XML OSGI index which exceeds Java 25 internal xml limits.
e.g.
See for details and workaround bndtools/bnd#7412
Workaround:
set the following in
eclipse.iniof the Eclipse instance you are running:or any other reasonably high value if you think 0 (unlimited) is too dangerous.
Question
Is there something Eclipse should do?
or plugin authors? (e.g. for bndtools we could set the limits directly on the
XMLInputFactorybut this would not work for older releases of our plugin.In case this is the wrong repo for this issue, just let me know where I can move it to.
All reactions