• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
JavaXML.framework and Java 21 (and Eclipse)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JavaXML.framework and Java 21 (and Eclipse)


  • Subject: JavaXML.framework and Java 21 (and Eclipse)
  • From: Paul Hoadley via Webobjects-dev <email@hidden>
  • Date: Tue, 6 May 2025 12:02:07 +0930
  • Feedback-id: i671c40f3:Fastmail

Hello,

I'm porting a project to Java 21. It makes some use of packages in the java.xml module, e.g. org.w3c.dom. When I switch java.version to 21, Eclipse complains:

PastedGraphic-1.png

[In case the image is dropped: The package org.w3c.dom is accessible from more than one module: <unnamed>, java.xml]

That's fair enough, and it's true: JavaXML.framework smuggles in a bunch of packages, including this one. To be clear, though, it only seems to be Eclipse complaining: mvn package still builds the app bundle without complaint. My first thought was to exclude it via the POM, which works to remove those warnings, but then in deployment:

2025-05-05 04:45:11.012 WARN  NSLog - Instance Request: Error parsing: <instanceRequest type="NSDictionary">
<queryInstance type="NSString">STATISTICS</queryInstance>
</instanceRequest>

Turns out Xerces is expected to be available on the classpath to parse messages from wotaskd. (Thanks Ramsey from 2013!) It seems to be sufficient to import Xerces alone:

    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.12.2</version>
      <scope>runtime</scope>
    </dependency>

But then I get the Eclipse warnings back, though now just for src/test classes: "runtime" scope causes Eclipse to ignore it for the app, but runtime-scoped artifacts are still provided for test compilation, hence Eclipse complains again (because we use colliding packages in some tests).

Finally, I can silence Eclipse by putting this in .settings/org.eclipse.jdt.core.prefs:

org.eclipse.jdt.core.compiler.ignoreUnnamedModuleForSplitPackage=enabled

What a roller coaster. Now, my questions:

1. Has anyone else hit this, and, if so, what did you do about it?

2. Is anyone else living in a post-JavaXML.framework world? It smuggles in a lot of stuff that I'd like to get rid of (e.g., Log4J 1). If so, how did you do it?


-- 
Paul Hoadley
https://logicsquad.net/
https://www.linkedin.com/company/logic-squad/

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: JavaXML.framework and Java 21 (and Eclipse)
      • From: Michael Schmiedgen via Webobjects-dev <email@hidden>
  • Prev by Date: Re: Regarding the "localhostips" property in deployment
  • Next by Date: Re: Regarding the "localhostips" property in deployment
  • Previous by thread: Re: Regarding the "localhostips" property in deployment
  • Next by thread: Re: JavaXML.framework and Java 21 (and Eclipse)
  • Index(es):
    • Date
    • Thread