-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
when I update log4j2's version to 2.24.2,I get a error #3284
Comments
The NPE seems to be caused by JMockit. JMockit instruments all the objects involved in your test run (including the "global" Log4j Core objects and their fields). This is the reason why I don't have experience with the JMockit agent, so I cannot tell you if the behavior is expected (I doubt it) or is the result of a bug. You should probably reach out to the JMockit dev team. |
This code snippet looks like a bug.If it is created for the first time, the loggerRefByName variable is null. |
this code snip from log4j2 version 2.24.2 |
version 2.24.1 is :
version 2.24.2 is:
|
You are probably confusing
The reason why I have no experience with JMockit, so I don't know how to configure it to leave the Log4j classes alone. You should probably ask the JMockit developers directly. |
JMockit does not create proxy objects, but it instruments (modifies) the classes that are loaded by the JVM. So the objects are instances of the same classes as declared, but the bytecode of the classes is modified. You can see in the debugger that |
Sure, thank you for your answer. I will report the issue to the JMockit development team. However, right now I want to understand how I can know if a class has been modified by bytecode instrumentation. I want to learn how you would go about doing this. In Intellij, there is no indication that the bytecode has been modified. |
This is the log link:https://github.com/apache/servicecomb-java-chassis/actions/runs/12290867484/job/34298772628?pr=4640#step:5:4557
You can drag the page to the bottom。
the main error:
the main code:
the log4j.xml:
It seems that getLogger execution failed
The text was updated successfully, but these errors were encountered: