7.5.176 updated required Java version, which is marked in RDEPEND with virtual/jre:17, but even so openjdk-bin:17 won't allow Unifi to start due a long nested exception with final exception: Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make private java.time.Instant(long,int) accessible: module java.base do es not "opens java.time" to unnamed module @43c3d622 Linked in URL is a comment from vendor explaining to someone else what arguments are needed, among which are a bunch of --add-opens -arguments. Adding them in the ebuild for java-pkg_dolauncher --java_args string resolves the issue. Something like this: java-pkg_dolauncher \ unifi \ --java_args '-Dorg.xerial.snappy.tempdir=/usr/lib/unifi/tmp -Djava.library.path= --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.time=ALL-UNNAMED --add-opens java.base/sun.security.util=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.rmi/sun.rmi.transport=ALL-UNNAMED' \ --jar ace.jar \ --pwd '/usr/lib/unifi' Whether the other parameters described in URL are needed I do not know nor have tried; this seems to be the smallest change required. Reproducible: Always Steps to Reproduce: 1. emerge =net-wireless/unifi-7.5.176 (after keywords) 2. rc-service unifi start (or similar) 3. see /var/log/unifi/server.log for errors Actual Results: Opening the service web page gives 404 not found. Expected Results: Opening the service web page gives Unifi login page.
I confirm! Same issue with: * dev-java/openjdk-17.0.6_p10 * net-wireless/unifi-7.5.176 I haven't tried the fix, but it makes sense indeed.
Created attachment 872190 [details, diff] /usr/bin/unifi patch Successfully started unifi 7.5.176 with =dev-java/openjdk-jre-bin-17.0.6_p10 after adding: --add-opens java.base/java.time=ALL-UNNAMED to gjl_java_args in /usr/bin/unifi
Created attachment 872221 [details, diff] Patch for unifi-7.5.176.ebuild Works great! This can be fixed in the build itself (patch attached). However please note that --add-opens is not supported yet in JDK 8, as far as I know.
(In reply to Joël from comment #3) > Created attachment 872221 [details, diff] [details, diff] > Patch for unifi-7.5.176.ebuild > > Works great! This can be fixed in the build itself (patch attached). > > However please note that --add-opens is not supported yet in JDK 8, as far > as I know. Java 17 is a requirement for Unifi 7.5.176 AFAIK.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3cf91a73f24a075c2320e1cb744dbff27ff17ab commit e3cf91a73f24a075c2320e1cb744dbff27ff17ab Author: Conrad Kostecki <conikost@gentoo.org> AuthorDate: 2023-10-09 21:58:44 +0000 Commit: Conrad Kostecki <conikost@gentoo.org> CommitDate: 2023-10-09 21:59:40 +0000 net-wireless/unifi: add needed java opts Closes: https://bugs.gentoo.org/915126 Signed-off-by: Conrad Kostecki <conikost@gentoo.org> .../unifi/{unifi-7.5.176.ebuild => unifi-7.5.176-r1.ebuild} | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Well done, thank you!