-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AnnotationFormatError: java.lang.IllegalArgumentException: Wrong type at constant pool index post class retransformation by agent #17265
Comments
Issue for #13071 (comment) @tajila fyi |
Observation: This error comes when we re-transform controller class with method parameters having annotation. E.g.: Rest Controller methods with This issue comes only in IBM J9 JVM, not seen with HotSpot VM. Here is the application and java agent to reproduce this issue: https://gitlab.com/bvsvas/openj9-constant-pool-agent, follow the instructions given in the README of this project. |
Dear team, I see this has been pushed to Jan refresh, Is this issue not going to be part of Oct refresh? |
No we wont be able to get to it in time |
@theresa-m Please take a look at this |
This is caused by the same issue described in #10026. There are a few places in the openjdk class libraries that should call I don't think there's a way of doing this without making changes to class libraries in the extensions repo which isn't normally best practice in OpenJ9. Another way could be to replace https://github.com/ibmruntimes/openj9-openjdk-jdk8/blob/openj9/jdk/src/share/classes/java/lang/reflect/Method.java#L639 with a call to @tajila can you please provide some feedback on these solutions? |
Not in favour of this one as we lose out on having the annotation cache in the byte array to speed things up. I think we will need to do similar changes to #10026 in the extensions code. |
Thanks @tajila. I'll open a pr for review sometime today to hopefully get this in before the code split. |
I get the error AnnotationFormatError: java.lang.IllegalArgumentException: Wrong type at constant pool index It comes while hitting REST Endpoint in Spring Boot application deployed in WebSphere Liberty. It only comes when call was made after class retransformation by java agent. This error doesn't come if endpoint hits before class retransformation.
We have verified class bytecode pre and post class retransformation and constant pool's constant index are intact and no change was observed. (refer to the class-dump.zip in attachments, it will have before and after .class files)
JDK used:
java version "1.8.0_361"
Java(TM) SE Runtime Environment (build 8.0.8.0 - pxa6480sr8-20230314_01(SR8))
IBM J9 VM (build 2.9, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20230313_47323 (JIT enabled, AOT enabled)
OpenJ9 - 4d03a8c
OMR - 49526cb
IBM - 7187a01
Error stack trace:
class-dump.zip
class-dump.zip
The text was updated successfully, but these errors were encountered: