DSpace: DSpace 5 and 6 handle server doesn't start after JDK 8 update
Describe the bug After updating to
openjdk version "1.8.0_352"
OpenJDK Runtime Environment (build 1.8.0_352-b08)
OpenJDK 64-Bit Server VM (build 25.352-b08, mixed mode)
or
openjdk version "1.8.0_352"
OpenJDK Runtime Environment Corretto-8.352.08.1 (build 1.8.0_352-b08)
OpenJDK 64-Bit Server VM Corretto-8.352.08.1 (build 25.352-b08, mixed mode)
The handle-server script no longer starts, probably due to JDK-8287132 - Retire Runtime.runFinalizersOnExit so that it always throws UOE
To Reproduce Steps to reproduce the behavior:
- Update the system packaged JDK 8 (Coretto and RHEL-packaged openjdk confirmed)
- Try to start handle-server script
- (Startup error message)
2022/10/26 03:04:46 CEST" 25 Started new run.
java.lang.UnsupportedOperationException
at java.lang.Runtime.runFinalizersOnExit(Runtime.java:287)
at java.lang.System.runFinalizersOnExit(System.java:1059)
at net.handle.server.Main.initialize(Main.java:124)
at net.handle.server.Main.main(Main.java:75)
Shutting down...
The reported errors in the mailing lists looks like DSpace 5 installations, but the handle server dependency looks the same in the DSpace 6 pom.xml, so probably also applies there?
Expected behavior
Normal startup of handle-server
KNOWN WORKAROUNDS Either of these options will work, but neither is ideal:
- Downgrade OpenJDK 8 to a version prior to 1.8.0.352 (which is where this change was made)
- Use OpenJDK 7 (which is no longer supported)
Related work https://bugs.openjdk.org/browse/JDK-8287132 https://groups.google.com/g/dspace-community/c/B-865GtF93A
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 35 (20 by maintainers)
Commits related to this issue
- GH-8557 test out upgrading dependency for handle server — committed to ubbdst/clarin-dspace by OyvindLGjesdal 2 years ago
- GH-8557 test out upgrading dependency for handle server — committed to ubbdst/clarin-dspace by OyvindLGjesdal 2 years ago
- GH-8557: handle server test for DS5 — committed to OyvindLGjesdal/DSpace by OyvindLGjesdal 2 years ago
- GH-8557: handle server test for DS5 — committed to OyvindLGjesdal/DSpace by OyvindLGjesdal 2 years ago
- GH-8557: Test running dependencies for DSpace 6 — committed to OyvindLGjesdal/DSpace by OyvindLGjesdal 2 years ago
- GH-8557: Test running dependencies for DSpace 6 — committed to OyvindLGjesdal/DSpace by OyvindLGjesdal 2 years ago
- GH-8557: Test running dependencies for DSpace 6 — committed to OyvindLGjesdal/DSpace by OyvindLGjesdal 2 years ago
- #8557-Parametros y cambio de nombre al adapter — committed to sedici/DSpace by GarrafaGalactica a year ago
- #8557-Primer update — committed to sedici/DSpace by GarrafaGalactica a year ago
- LIBCIR-278. Pin tomcat version to older version. We need to use a older tomcat version (released August, 2022) since the newer versions ship with a newer JDK that causes the handle-server to fail Re... — committed to umd-lib/mdsoar by mohideen a year ago
- #8557-Misma curation queue todos los eventos — committed to sedici/DSpace by mugen-2 a year ago
- pom.xml: update Handle server dependency To fix issue with OpenJDK 1.8.0_352. See: https://github.com/DSpace/DSpace/issues/8557#issuecomment-1595340249 — committed to ilri/DSpace by alanorth a year ago
- Update Handle Version to 6.2.5_03 Fixes #8557 for DSpace 5.x and allows for latest version of JDK 1.8 — committed to misilot/DSpace by misilot a year ago
- Update Handle Version to 6.2.5_03 Fixes #8557 for DSpace 6.x and allows for latest version of JDK 1.8 — committed to misilot/DSpace by misilot a year ago
Thanks all for the verification! I’ll see if I can find time to push this JAR out to Maven Central in the next week or so to make it easier to deploy for impacted sites. Will post back here when completed.
Thank you @tdonohue! I tested it and it is working for us as well.
Thank you @tdonohue . It is working for us, e.g. with https://gitlab.oit.duke.edu/ddr/dspace/-/blob/dukespace-6_prod/pom.xml?ref_type=heads#L1100-1104 we can see https://hdl.handle.net/10161/22434 resolving correctly.
All,
It took me longer to get to this than expected… but I just released this patched
6.2.5_03JAR to Maven Central.As it was just released it may take an hour or two to appear.UPDATE: It’s already made it to Maven Central: https://central.sonatype.com/artifact/org.dspace/handle/6.2.5_03/overview
Can someone give it a try to verify it is working?
To test it, simply change this version tag in your Parent/Root POM (
[src]/pom.xml) to use version6.2.5_03:The compiled handle.jar file is available at https://release.prosentient.com.au/handle62/handle.jar.gz It can be used to replace the handle-6.2.jar reference in the dspace 6.4 build or copied directly to the target directly to the target directories - particularly of course lib
./lib/handle-6.2.jar ./webapps/jspui/WEB-INF/lib/handle-6.2.jar ./webapps/xmlui/WEB-INF/lib/handle-6.2.jar ./webapps/swordv2/WEB-INF/lib/handle-6.2.jar ./webapps/rdf/WEB-INF/lib/handle-6.2.jar ./webapps/rest/WEB-INF/lib/handle-6.2.jar ./webapps/sword/WEB-INF/lib/handle-6.2.jar ./webapps/oai/WEB-INF/lib/handle-6.2.jar
It was an interesting archeological exercise obtaining the handle v6 source. handle.net do not maintain web references to archived distributions. web.archive.org was helpful in this respect
Edmund
At Duke, we have successfully used the JAR file @ilittle-cnri posted at https://www.handle.net/hs-source/hdl6.2.5_03.tar.gz in place of the current
handle-6.2.jarin our DSpace 6.4 application. It is working great for existing and newly-minted handles alike. Many thanks to all for identifying and providing a community solution.@OyvindLGjesdal : Thanks for your feedback. After digging around a bit, I realized that there was some earlier work also needed to support migrating to Handle Server v9 in #2394 … and those changes involved minor updates to the
make-handle-configscript. Maybe that’s the missing piece here? I’d recommend trying to make those updates tomake-handle-configand trying again…hopefully it’ll work this time.In terms of testing the handle-server works, you should be able to minimally start the handle-server with some “fake/test” settings, and verify that it starts up on the configured ports (2641 and 8000 by default, IIIRC).
In any case, if you can get
dspace make-handle-configto no longer throw errors, andstart-handle-serverto spin everything up on the expected ports, then that should mean that everything is “working”. At that point, if you wanted to create a PR, then I’m sure we could find some testers to help verify it works for them.