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:

  1. Update the system packaged JDK 8 (Coretto and RHEL-packaged openjdk confirmed)
  2. Try to start handle-server script
  3. (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

Most upvoted comments

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.

All,

It took me longer to get to this than expected… but I just released this patched 6.2.5_03 JAR 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 version 6.2.5_03:

<dependency>
    <groupId>org.dspace</groupId>
    <artifactId>handle</artifactId>
    <version>6.2.5_03</version>
   <!-- Previously this tag will be <version>6.2</version> in both DSpace 5.x and 6.x -->
</dependency>

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.jar in 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-config script. Maybe that’s the missing piece here? I’d recommend trying to make those updates to make-handle-config and 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-config to no longer throw errors, and start-handle-server to 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.