Hibernate 6.2.0.CR3 does not deploy to Payara Micro due to java.lang.ClassCircularityError
Description
Activity

Christian Beikov April 17, 2024 at 11:27 AM
Closing since this seems to have been fixed in GlassFish via https://github.com/eclipse-ee4j/glassfish/pull/24433 and there is a workaround for Payara.

Cédric Tabin May 16, 2023 at 12:09 PM
For information, here is a hint to circumvent this error in Payara (6.2023.1) / GlassFish (7.0.4): just add explicitly the following properties in the persistence.xml
of the application:
Note: we do bytecode enhancement during the build through a maven plugin.
Martin Charlesworth March 31, 2023 at 2:41 PM
thanks Cedric I didn’t get around to doing that.

Cédric Tabin March 31, 2023 at 12:31 PM
Thanks Sanne, I’ve opened an issue in Payara:
According to the reproducer of Martin, this seems more widely related to GlassFish. We’ve had the same error in payara-embedde-all 6.2023.1.

Sanne Grinovero March 14, 2023 at 4:56 PM
I had a quick look, but sorry my knowledge of Payara is close to zero and I have no idea of what it’s doing. Might be best to ask the Payara developers.
From the error and the stacktrace it doesn’t seem related to our own bytecode enhancement, as it hasn’t been initialized (it’s actually failing to initialize the bytecode transformer..); it would seem like there is some issue with modular classloading or possibly a library conflict?
When I use 6.2.0.CR3 in a Jakarta EE 10 project & try to deploy to payara micro, it fails with ClassCircularityError:
With 6.1.5 it works perfectly well. Reproducer project here:
https://github.com/grommitz/hibernate-deployment-issue-reproducer