0

jpackage has been working fine until today on Mac OS. Now it fails due to some internal use of an incubator package.

Is there a workaround for this? It still works fine on windows.

openjdk version "17.0.8" 2023-07-18 LTS OpenJDK Runtime Environment Zulu17.44+15-CA (build 17.0.8+7-LTS) OpenJDK 64-Bit Server VM Zulu17.44+15-CA (build 17.0.8+7-LTS, mixed mode, sharing)

Mac OS 12.6.8 (21G725)

I am using jpackage from my maven build using exec plugin.

I am using jpackage with --input on an app image to create a non modular app. This has been fine before. Could this have become a problem?

Maven -X log

jdk.jpackage.internal.PackagerException: jlink failed with: WARNING: Using incubator modules: jdk.incubator.foreign, jdk.incubator.vector
Error: jdk.tools.jlink.plugin.PluginException: Duplicate resources: {lib/libj2gss.dylib=[java.security.jgss, java.security.sasl], lib/jfr/default.jfc=[jdk.jshell, jdk.jsobject, jdk.jfr, jdk.jlink, jdk.jpackage, jdk.jstatd, jdk.localedata], conf/management/management.properties=[jdk.management.jfr, jdk.management.agent, jdk.sctp, jdk.xml.dom, jdk.unsupported, jdk.management, jdk.net, jdk.random, jdk.nio.mapmode, jdk.security.auth, jdk.unsupported.desktop, jdk.naming.rmi, jdk.zipfs, jdk.naming.dns, jdk.security.jgss], lib/jfr/profile.jfc=[jdk.jshell, jdk.jsobject, jdk.jfr, jdk.jlink, jdk.jpackage, jdk.jstatd, jdk.localedata], lib/libosxkrb5.dylib=[java.security.jgss, java.security.sasl], lib/libmanagement_ext.dylib=[jdk.management, jdk.naming.rmi, jdk.naming.dns], lib/libextnet.dylib=[jdk.net, jdk.random, jdk.nio.mapmode, jdk.sctp], conf/sound.properties=[java.desktop, java.instrument], conf/management/jmxremote.access=[jdk.management.jfr, jdk.management.agent, jdk.sctp, jdk.xml.dom, jdk.unsupported, jdk.management, jdk.net, jdk.random, jdk.nio.mapmode, jdk.security.auth, jdk.unsupported.desktop, jdk.naming.rmi, jdk.zipfs, jdk.naming.dns, jdk.security.jgss], lib/librmi.dylib=[java.rmi, java.scripting], lib/libsyslookup.dylib=[jdk.incubator.vector, jdk.javadoc, jdk.jdi, jdk.internal.ed, jdk.internal.le, jdk.jdeps, jdk.internal.opt, jdk.jartool, jdk.jconsole, jdk.incubator.foreign, jdk.internal.jvmstat], lib/libattach.dylib=[jdk.charsets, jdk.attach], lib/libinstrument.dylib=[java.logging, java.instrument], lib/libjaas.dylib=[jdk.security.auth, jdk.unsupported.desktop, jdk.xml.dom, jdk.unsupported, jdk.zipfs, jdk.security.jgss], conf/logging.properties=[java.rmi, java.sql, jdk.incubator.vector, jdk.jdi, jdk.charsets, java.logging, java.transaction.xa, java.xml.crypto, java.xml, jdk.jfr, jdk.jstatd, jdk.httpserver, jdk.crypto.cryptoki, java.naming, jdk.internal.ed, java.prefs, java.net.http, jdk.compiler, java.security.sasl, jdk.internal.opt, jdk.jconsole, jdk.attach, jdk.crypto.ec, jdk.javadoc, jdk.jshell, jdk.editpad, jdk.internal.le, java.management, java.sql.rowset, jdk.jsobject, java.smartcardio, jdk.jlink, jdk.jdwp.agent, jdk.incubator.foreign, jdk.internal.jvmstat, java.security.jgss, java.scripting, jdk.dynalink, jdk.jdeps, jdk.accessibility, jdk.jartool, java.management.rmi, jdk.jpackage, jdk.localedata], lib/libj2pcsc.dylib=[java.sql, java.transaction.xa, java.xml.crypto, java.sql.rowset, java.xml, java.smartcardio, jdk.accessibility], lib/libj2pkcs11.dylib=[jdk.crypto.cryptoki, jdk.editpad, jdk.dynalink, jdk.crypto.ec], lib/libmanagement_agent.dylib=[jdk.management.jfr, jdk.management.agent], lib/libmanagement.dylib=[java.naming, java.management, java.net.http, java.management.rmi], conf/management/jmxremote.password.template=[jdk.management.jfr, jdk.management.agent, jdk.sctp, jdk.xml.dom, jdk.unsupported, jdk.management, jdk.net, jdk.random, jdk.nio.mapmode, jdk.security.auth, jdk.unsupported.desktop, jdk.naming.rmi, jdk.zipfs, jdk.naming.dns, jdk.security.jgss]}
John Baker
  • 89
  • 12
  • My edit didn't work as you've removed the line separators. Could you please repost that, formatter as code – g00se Aug 05 '23 at 15:39
  • There were no line separators. I copy/pasted from the terminal. – John Baker Aug 05 '23 at 15:41
  • The error seems to be from duplicate resources, not use of incubator modules: `Error: jdk.tools.jlink.plugin.PluginException: Duplicate resources` – Jorn Vernee Aug 05 '23 at 15:46
  • I can't find it now, but there was a user with a similar question recently (I think they deleted their question). They were also using Zulu IIRC. In the end it turned out they had a broken JDK installation, and switching JDKs worked for them. – Jorn Vernee Aug 05 '23 at 15:56
  • ` 2>&1 | tee stacko.log` and paste that named text file formatted as code – g00se Aug 05 '23 at 15:57
  • To see if your JDK is the problem you can use the `jmod list` command on the relevant `jmods/*.jmod` files in the jdk installation directory, and then see if the reported duplicate resource indeed exists in both files. – Jorn Vernee Aug 05 '23 at 16:08
  • Weirdly when I list (with show older versions) on azul there are 2 that look identical (same version info). Downloading the "older" release with same details (17.0.8+7 Azul Zulu: 17.44.15) as the "newer" release of same name seems to work. So yes it looks like azul have released a broken build. Or the website is buggy. – John Baker Aug 05 '23 at 16:18

1 Answers1

0

Solved.

I looks like azul released a broken jdk 17 build.

There were 2 listed with same version (when listing older versions is selected). The first didn't work, the second with same details does.

It is also possible that something went wrong when installing it, however the same thing happened on 2 different macs so think this is unlikely.

John Baker
  • 89
  • 12