When deployed an application containing Dozer, the following Exception was thrown.
Exception while visiting com/github/dozermapper/core/util/MappingOptions.class of size 764
java.lang.ClassCastException: org.glassfish.hk2.classmodel.reflect.impl.InterfaceModelImpl cannot be cast to org.glassfish.hk2.classmodel.reflect.impl.AnnotationTypeImpl
at org.glassfish.hk2.classmodel.reflect.impl.ModelClassVisitor$ModelDefaultAnnotationVisitor.visit(ModelClassVisitor.java:420)
at org.objectweb.asm.ClassReader.readElementValue(ClassReader.java:3045)
at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1375)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:717)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:401)
at org.glassfish.hk2.classmodel.reflect.Parser$5.on(Parser.java:336)
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.handleEntry(ReadableArchiveScannerAdapter.java:165)
at com.sun.enterprise.v3.server.ReadableArchiveScannerAdapter.onSelectedEntries(ReadableArchiveScannerAdapter.java:127)
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.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
No exceptions will be thrown.
An exception was thrown.
I am seeing the same issue without dozer with the Payara full version. It does not appear on 5 2020.4. Could be related to https://github.com/payara/Payara/pull/4865 when H2K types are being discarded?
Hi @otukatigayim I was able to reproduce this easily, I have raised an internal issue FISH-743.
I also have tons of
java.lang.ClassCastException: class org.glassfish.hk2.classmodel.reflect.impl.InterfaceModelImpl cannot be cast to class org.glassfish.hk2.classmodel.reflect.impl.AnnotationTypeImpl
when deploying my application using docker image payara/server-full:5.2020.5-jdk11.
Can I safely ignore these exceptions or should I better go back to payara/server-full:5.2020.4-jdk11 and hope/wait for a fix in payara/server-full:5.2020.6-jdk11 ?
Same exceptions for me in Payara Micro 5.2020.5, where the deployed project uses Hibernate and MariaDB.