Skip to content

Problems with transition between Java 6 and Java 8 and TimeZones

Quick blog – first in a long time!

We use Java objects to help us take e-commerce payments.

Recently, because of a change from iText to PDFBox, I needed to update the Lucee Java version to version 8 from version 6.

I received this error message:

Error message: Unable to make public java.time.zone.ZoneRules java.time.ZoneRegion.getRules() accessible: module java.base does not “opens java.time”

I eventually came across this post on good ol’ StackOverflow.

This clued me in to checking the Lucee Service Control Java tab. Under Java 9 options, I just needed to add:

–add-opens=java.base/java.time=ALL-UNNAMED

and it all started working again.

Admittedly, I did have to rewrite some daylight savings and timezone identification code to match changes in the timezone handling, but that’s a story for another day!

Published injava