Record requires ASM8

Hi to all,

I was just migrating my application to Payara 6.2022.1. But while starting, I face the following error message:

[2022-11-04T17:00:52.194+0100] [Payara 6.2022.1] [SCHWERWIEGEND] [] [javax.enterprise.system.tools.deployment.common] [tid: _ThreadID=118 _ThreadName=payara-executor-service-task] [timeMillis: 1667577652194] [levelValue: 1000] [[
  Exception while visiting de/.../MonitoringResultVO.class of size 1730
java.lang.UnsupportedOperationException: Record requires ASM8
	at org.objectweb.asm.ClassVisitor.visitRecordComponent(ClassVisitor.java:305)
	at org.objectweb.asm.ClassReader.readRecordComponent(ClassReader.java:953)
	at org.objectweb.asm.ClassReader.accept(ClassReader.java:731)
	at org.objectweb.asm.ClassReader.accept(ClassReader.java:424)
	at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:336)
	at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:164)
	at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:130)
	at org.glassfish.hk2.classmodel.reflect.Parser.doJob(Parser.java:321)
	at org.glassfish.hk2.classmodel.reflect.Parser.access$300(Parser.java:44)
	at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:280)
	at org.glassfish.hk2.classmodel.reflect.Parser$3.call(Parser.java:269)
	at java.base/java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:264)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:833)
]]

I use records as data-objects for CDI-events, which work fine in Payara 5.2022.2 (on JDK temurin-17).

Are records not supported in Payara 6?

Thank you very much in advance,
Ulrich

1 Like

Ulrich, I wish I could help, but actually I’m having a similar problem using Springframework web mvc 6.0. In my case, I’ve opened a forum item but in my case I’ve reported it as “CDI is not available.” which occurs after a slew of these ASM8 and ASM9 required messages.

If you’re able to figure this our, be sure to reach out to me at barnardglenn@gmail.com. Thanks, and I’ll do the same.

Hello @UlrichC and @gbarnard!

Thank you for reporting this bug. We are aware of the issue, and our Engineering team is working on a fix. I cannot provide a specific timeframe for the fix, as the problem is not prioritised at the moment, but I will post an update once it has been solved.

It should be a priority as should updating the CDI used. Both are stopping all application development using spring web mvc work on payara 6. My response from their team clearly stated that payara (and glassfish?) are not in synced with Jakarta 10.

I’d love to hear when a corrected version is being released.

Hi Felix, thanks for the response. For me, it should be of priority as well, because otherwise we cannot update to Payara6, but we are forced to because Payara5 get no updates anymore… and I would not transfer all Records to DTOs anymore… it would be very nice to get an update soon… many thanks

Hello. It’s a blocker here as well. Maybe the fix is as simple as in Payara 5?

If Payara engineers have other priorities, then how community can help?

Regards,
Robert

Hello. Related HK2’s issue:

Hello @robelcik,

Thank you so much for your discovery! I have updated the internal issue with the GitHub issue linked here. We always encourage community members to submit a PR that the Engineering team would gladly verify.

The issue is sadly not prioritised at the moment, as the issues occur mostly on Spring applications, and our customer base mainly uses Jakarta EE. I apologise for all the trouble caused by this bug.

Hi Felix,
that’s not right, that this issue occurs mostly on Spring applications, it occurs in every Payara application using records with Java 17.
The bug blocks us from migrating to Payara 6… so it would be very nice, if this bug could be fixed shortly. Many thanks in advance!

Test the Payara Server 6.2023.2 which is release on 13th Mar 2023 but the ASM bug seems not fixed yet. The spring boot application still not able to run on Payara 6.

This bug should get fixed in the upcoming release of Payara Community version 6.2023.4 which is due around mid-April 2023.

Hi @UlrichC,

Payara Community 6.2023.4 has been released and contains component upgrades surrounding ASM. Can you please verify if your application works as expected on this version of Payara?

Best Regards,
James

I tried Spring Web MVC on 6.2023.6 and the ASM messages are gone, but the “CDI is not available” still appears. The application is bare bones with Web.xml referencing Spring’s Dispatcher 6.0.9 servlet.

Sorry for this late reply, but in the version 6.2023.4, the ASM error message does not show up anymore. Thanks very much!

Anyone found a fix for the “CDI is not available” error? I’m waiting for this to be able to upgrade Spring