Skip to content
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

NewAsyncAppender$Worker illegally accessing "protected" member #77

Open
lars-sh opened this issue Dec 27, 2024 · 0 comments
Open

NewAsyncAppender$Worker illegally accessing "protected" member #77

lars-sh opened this issue Dec 27, 2024 · 0 comments

Comments

@lars-sh
Copy link

lars-sh commented Dec 27, 2024

I like the idea of NewAsyncAppender within reload4j 1.2.26.
While it works on my local Windows machine it fails on z/OS with the following exception:

Exception in thread "NewAsyncSingleAppender-Worker-null" java.lang.IllegalAccessError: Class org/apache/log4j/NewAsyncAppender$Worker illegally accessing "protected" member of class org/apache/log4j/AppenderSkeleton
at org.apache.log4j.NewAsyncAppender$Worker.run(NewAsyncAppender.java:292)

It seems, the IBM JVM does not like accessing the protected field parent.closed from the inner Worker class.
Would you be willing to restructure the code a little to workaround that problem?
In case it simplifies things for you I could raise a pull request as an alternative.

Btw. the worker's thread name is based on the appender name. That might be expected behavior, that's different from AsyncAppender - just for your information.

Thanks for your efforts regardless of this issue and have a happy new year 🎆

Java Runtime on z/OS

Java(TM) SE Runtime Environment (build 8.0.8.25 - pmz6480sr8fp25-20240328_01(SR8 FP25))
IBM J9 VM (build 2.9, JRE 1.8.0 z/OS s390x-64-Bit Compressed References 20240305_66992 (JIT enabled, AOT enabled)
OpenJ9   - e3126d7
OMR      - f2f50a8
IBM      - b81b1e2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant