payara / Payara

Payara Server is an open source middleware platform that supports reliable and secure deployments of Java EE (Jakarta EE) and MicroProfile applications in any environment: on premise, in the cloud or hybrid.
http://www.payara.fish
Other
879 stars 301 forks source link

Bug Report: 6.2022.2 with Vaadin 24.0.0.alpha6 -> UnsupportedOperationException: PermittedSubclasses requires ASM9\FISH-6931 #6127

Open pioneer2k opened 1 year ago

pioneer2k commented 1 year ago

Brief Summary

We are trying to test our applications with Payara Micro 6.2022.2 and the Jakarta EE 10 compatible pre-release of Vaadin Flow (24.0.0.alpha4).

Expected Outcome

Application starts without a failure during class scanning

Current Outcome

When starting our application the deployment fails with an exception in HK2/ASM. See below. My suspicion is, that the integrated HK2 version uses ASM7, but ASM9 is needed, which should be the standard on JDK 17. See also another issues around that topic: https://issues.apache.org/jira/browse/GROOVY-10194 The class SortDirection.class is also a enum class of that kind.

Exception while visiting com/vaadin/flow/data/provider/SortDirection.class of size 1425 java.lang.UnsupportedOperationException: PermittedSubclasses requires ASM9 at org.objectweb.asm.ClassVisitor.visitPermittedSubclass(ClassVisitor.java:266) at org.objectweb.asm.ClassReader.accept(ClassReader.java:706) 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(FutureTask.java:264) 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)

Reproducer

see example.zip in the first comment below

Operating System

Windows 11 Pro

JDK Version

Oracle JDK 17.0.5

Payara Distribution

Payara Micro

pioneer2k commented 1 year ago

example.zip

I created an example project to reproduce the issue. Just build the project with Maven: mvn com.github.eirslett:frontend-maven-plugin:1.10.0:install-node-and-npm -DnodeVersion="v18.12.1" mvn install

Then start the WAR with: java -jar payara-micro.jar gum-1.0-SNAPSHOT.war

shub8968 commented 1 year ago

Hi @pioneer2k,

I have escalated this issue to the platform development team as FISH-6331.

krzysztof-osiecki commented 1 year ago

Hi @shub8968 seems we have similar/identical issue but with different library. In Payara 6.2023.1. During deployment we see many error logs from jOOQ classes looking like this (jOOQ version 3.17.7) Exception while visiting org/jooq/SelectFieldOrAsterisk.class of size 275 java.lang.UnsupportedOperationException: PermittedSubclasses requires ASM9 at org.objectweb.asm.ClassVisitor.visitPermittedSubclass(ClassVisitor.java:266) at org.objectweb.asm.ClassReader.accept(ClassReader.java:706) 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(FutureTask.java:264) 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)

Too me its seems to be the same problem, so just commenting here, should i create a separete bug report?

Operating System Windows 10 and Windows 11

JDK Version Oracle Open JDK 17.0.2

Payara Distribution Payara Micro and Payara Server Full Profile

grommitz commented 1 year ago

We see the same thing, the warning seems to appear for all the enum classes in our internal libraries. This is with 6.2023.1.

Its strange because payara 6 appears to include ASM 9.2